Torna indietro   Hardware Upgrade Forum > Software > Programmazione

ASUS Zenbook 14 (UX3480AA): tanta autonomia con uno chassis bello e robusto
ASUS Zenbook 14 (UX3480AA): tanta autonomia con uno chassis bello e robusto
Lo chassis in Ceraluminium è il cuore di questo notebook in edizione 2026, un modello pensato per garantire produttività con le tipiche applicazioni di produttività personale e capace di offrire un'autonomia di funzionamento lontano dalla presa di corrente da riferimento. Potenza, facilità di trasporto e costruzione robusta tutto in un notebook compatto.
Samsung Micro RGB R95H, il primo LCD a LED rossi, verdi e blu di Samsung alla prova del banco di misura
Samsung Micro RGB R95H, il primo LCD a LED rossi, verdi e blu di Samsung alla prova del banco di misura
Il primo Micro RGB di Samsung per il salotto è il 65 pollici da 2.749 euro. Sul banco di misura abbiamo rilevato 2.000 nit di picco, nero assoluto con il local dimming e il 91,4% del BT.2020, il colore più ampio che abbiamo misurato su un LCD
iPhone 18 Pro: la recensione del miglior iPhone compatto di sempre
iPhone 18 Pro: la recensione del miglior iPhone compatto di sempre
Apple ha rinnovato iPhone 18 Pro soprattutto dentro: chip A20 Pro a 2 nm con memoria affiancata al SoC, camera di vapore tre volte più ampia, Dynamic Island più piccola del 25% grazie a Face ID sotto il display e fotocamera principale con diaframma variabile da f/1.48 a f/4. Lo abbiamo misurato al colorimetro e nei benchmark, usato con iOS 27 e messo alla prova in fotografia tra laghi, borghi e interni poco illuminati
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 08-11-2009, 19:29   #1
elect
Senior Member
 
L'Avatar di elect
 
Iscritto dal: Dec 2003
Città: Hamburg/Torino
Messaggi: 2758
[JAVA] Non si connette al database

Come da titolo. Quello che devo fare è questo:

First, you have to create an ANT build.xml file. Write two ANT tasks: One for starting the
database server and another one for stopping it. Later in the course, you will use these ANT
tasks to start and stop the database server for the web application.
Your task is to write two SQL-scripts. One in order to create the database structure with its
tables and relations. And another one which fills your newly created tables with test data.
Create an ANT task for each SQL-script, which executes that script.


Questo è il mio build.xml:

Codice:
<?xml version="1.0" encoding="UTF-8"?>

<project name="FirstLab">
	<path id="derby.classpath">
		<fileset dir="lib">
			<include name="**/*.jar" />
		</fileset>
	</path>

	<target name="server_start">
		<java classname="org.apache.derby.drda.NetworkServerControl" classpathref="derby.classpath" fork="true">
			<arg value="start" />
		</java>
	</target>
	
	<target name="server_stop">
		<java classname="org.apache.derby.drda.NetworkServerControl" classpathref="derby.classpath" fork="true">
			<arg value="shutdown" />
		</java>
	</target>
	
	<target name="test">
		<property name="DBURL" value="jdbc:derby:test" />
		<property name="DRIVER" value="lib/org.apache.derby.jdbc.EmbeddedDriver" />
		<property name="USERID" value="" />
		<property name="PASSWORD" value="" />
		<property name="USERS" value="users" />
		<property name="IMAGES" value="images" />
		<property name="COMMENTS" value="comments" />
		<property name="FRIENDSHIP" value="friendship" />
		<sql driver="${DRIVER}" url="${DBURL}" userid="${USERID}" password="${PASSWORD}" autocommit="yes" onerror="continue" caching="yes">
		      DROP TABLE USERS;
		 	  DROP TABLE IMAGES;
		 	  DROP TABLE COMMENTS;
		 	  DROP TABLE FRIENDSHIP;
		      CREATE TABLE USERS (userid int not null generated always as 
		      identity (start with 1, increment by 1), username char(255) not null, 
		      password char(255), firstname char(255) not null, lastname char(255) not null, city char(255),
		 	country char(255), text char(255), birthdate DATE not null, photofilename char(255), UNIQUE (username) );
		 	CREATE TABLE IMAGES (imageid int not null generated always as 
		      identity (start with 1, increment by 1), userid int not null, filename char(255) not null, insertdate timestamp not null,
		 	CONSTRAINT userid_fk FOREIGN KEY(userid) REFERENCES USERS(userid) ON DELETE CASCADE);
		 	CREATE TABLE COMMENTS (commentid int not null generated always as 
		      identity (start with 1, increment by 1) PRIMARY KEY, fromuserid int, touserid int,
		 	insertdate TIMESTAMP, text char(255),
		 	CONSTRAINT fromuserid_fk FOREIGN KEY (fromuserid) REFERENCES USERS(userid) ON DELETE CASCADE,
		 	CONSTRAINT touserid_fk FOREIGN KEY (touserid) REFERENCES USERS(userid) ON DELETE CASCADE);
		 	CREATE TABLE FRIENDSHIP (fromuserid int, touserid int, state int, CONSTRAINT
		 	fromuserid_fk FOREIGN KEY (fromuserid) REFERENCES USERS(userid) ON DELETE CASCADE,
		 	CONSTRAINT touserid_fk FOREIGN KEY (touserid) REFERENCES USERS(userid) ON DELETE CASCADE);
		    </sql>
	</target> 
	
</project>
Runnando solo lo start o lo stop_server vedo che tutto fila liscio, ma quando lancio il test mi restituisce questo:


Codice:
Buildfile: C:\Documents and Settings\elect\workspace\FirstLab\build.xml
test:

BUILD FAILED
C:\Documents and Settings\elect\workspace\FirstLab\build.xml:31: Class Not Found: JDBC driver lib/org.apache.derby.jdbc.EmbeddedDriver could not be loaded

Total time: 986 milliseconds
Ho googlato un pò, ma non ho trovato niente che facesse al caso mio.. ^^

Ho la strana sensazione che la soluzione sia molto semplice e veloce, ma non c'arrivo @.@, voi avete qualche idea?
elect è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


ASUS Zenbook 14 (UX3480AA): tanta autonomia con uno chassis bello e robusto ASUS Zenbook 14 (UX3480AA): tanta autonomia con ...
Samsung Micro RGB R95H, il primo LCD a LED rossi, verdi e blu di Samsung alla prova del banco di misura Samsung Micro RGB R95H, il primo LCD a LED rossi...
iPhone 18 Pro: la recensione del miglior iPhone compatto di sempre iPhone 18 Pro: la recensione del miglior iPhone ...
Panasonic, 30 anni di Toughbook: la "Bibbia" di mille regole dietro i nuovi G3 e 34 Panasonic, 30 anni di Toughbook: la "Bibbia...
realme C100x, lo smartphone economico con la batteria da 7500 mAh. La recensione realme C100x, lo smartphone economico con la bat...
Spotifast sfida Spotify: il client open ...
Oltre i benchmark: le specifiche importa...
Euro digitale, la BCE fissa le date dei ...
Photopea, polemica con GitHub: le copie ...
Curiosity fotografa l'alba su Marte: le ...
Amazon Kids+ arriva in Italia: giochi, v...
Amazon svela i nuovi Alexa Tablet! Googl...
OPPO Find X10 Series sarà present...
Google e Zuckerberg puntano sulla cellul...
MSI Prestige N16 Flip AI+ disponibile su...
Proofpoint presenta Agentic Data and AI ...
Instagram porta i nuovi strumenti di edi...
NVIDIA, l'accordo da 20 miliardi con Gro...
Una macchina da caffè ha generato 1 TB i...
Samsung, vendere smartphone conviene sem...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 00:45.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v