R: R: App + Connector/MXJ deployment
"tech" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Organization | edoss consulenze |
| Message-ID | <[email protected]> |
Hi Eric, Now on the deployment pc I have: 1) mysql-connector-java-5.0.3-bin.jar in the $JAVA_HOME/jre/lib/ext directory 2) MySQLTest.jar (my Java application) 3) connector-mxj.jar (my own connector-mxj.jar with the pre-configured DB for the above application, created following paragraph 27.4.5.1 and 27.4.5.2 of the online manual) 4) aspectjrt.jar (copied and pasted from my development pc). All of the paths to the above four jar files are in the CLASSPATH of the deployment pc. I tried to launch my Java app, but I get the attached Console output. Should I maybe first extract directories and files from connector-mxj.jar and run something ? Thanks for your help. Roberto -----Messaggio originale----- Da: Eric Herman [mailto:[email protected]] Inviato: mercoledì 20 settembre 2006 13.46 A: tech Cc: [email protected] Oggetto: Re: R: App + Connector/MXJ deployment Hello Roberto, On Wed, 2006-09-20 at 12:18 +0200, tech wrote: > Yes, Eric. My question is: what about Connector/J ? Oh, I apologize. I did not understand your question the first time. > > On my development pc I had copied mysql-connector-java-5.0.3-bin.jar to my > $JAVA_HOME/jre/lib/ext directory and it worked properly. > > Now, on the target pc I have the JRE and two jars: > 1) my Java application > 2) my own connector-mxj.jar with the pre-configured DB for the above > application. > > But what about Connector/J ? Oh, yes. You will need Connector/J as well ... both for Connector/MXJ to contact the MySQL server, as well well as for your own application to create database connections. Just to be complete, the deployment machine's CLASSPATH will need: (1) your java application (2) mysql-connector-java-5.0.3-bin.jar (3) connector-mxj.jar (4) aspectjrt.jar (5) any other 3rd party libraries that your application relies upon Cheers, -Eric > > Cheers > Roberto > > > > > -----Messaggio originale----- > Da: Eric Herman [mailto:[email protected]] > Inviato: martedì 19 settembre 2006 19.49 > A: tech > Cc: [email protected] > Oggetto: Re: App + Connector/MXJ deployment > > On Tue, 2006-09-19 at 18:04 +0200, tech wrote: > > Hi Eric, > > > > > > > > here is my situation. I have created: > > > > > > > > 1) MySQLTest.jar (my Java application which queries properly the > > MySQL Server on my development pc) > > > > > > > > 2) connector-mxj.jar (my own connector-mxj.jar with the > > pre-configured DB for the above application, created following > > paragraph 27.4.5.1 and 27.4.5.2 of the online manual) > > > > > > > > Now, I have another pc with the Java runtime environment and no > > MySQL. > > > > > > > > Can you tell me how to proceed to deploy my Java application with its > > own database on the second pc ? > > Okay, sounds great. Provided the re-packaging of the connector.mxj jar > is correct, it should be as simple as making certain that each of the > jar files are in the CLASSPATH and starting your application. > > You may wish to specify the "basedir" for the Connector/MXJ to use to > write the database files to, because the default basedir is a > subdirectory "java.io.tmpdir". > > Do you have a more specific question? > > Cheers, > -Eric > > > P.S.: Please keep us posted on how it goes for you. > > > > Thanks > > > > > > > > Roberto Regazzoni > > > > > > > > > > > > > -- > Eric Herman, Software Developer > MySQL AB, www.mysql.com > VoIP Ext: 6594 US: +1 408 213 6540 Europe: +46 18 174 400 > Mobile: +31 [0]6-20719662 > Are you MySQL certified? www.mysql.com/certification > > -- Eric Herman, Software Developer MySQL AB, www.mysql.com VoIP Ext: 6594 US: +1 408 213 6540 Europe: +46 18 174 400 Mobile: +31 [0]6-20719662 Are you MySQL certified? www.mysql.com/certification __________ Informazione NOD32 1.1763 (20060919) __________ Questo messaggio è stato controllato dal Sistema Antivirus NOD32 http://www.nod32.it -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/[email protected]
Console_Output_20060920_1.txt
(text/plain, 4.8 KB)
Microsoft Windows XP [Versione 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
E:\myTestApp>SET CLASSPATH
CLASSPATH=E:\Programmi\Java\jre1.5.0_08\lib\ext\mysql-connector-java-5.0.3-bin.j
ar;E:\myTestApp\aspectjrt.jar;E:\myTestApp\connector-mxj.jar;E:\myTestApp\TestMy
SQL.jar
E:\myTestApp>java -jar TestMySQL.jar
com.mysql.jdbc.CommunicationsException: Communications link failure due to under
lying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect
STACKTRACE:
java.net.SocketException: java.net.ConnectException: Connection refused: connect
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
va:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2641)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at packageAntiriciclaggio.AmministrazioneDB.apriConnessione(Amministrazi
oneDB.java:44)
at packageAntiriciclaggio.AmministrazioneDB.<init>(AmministrazioneDB.jav
a:19)
at packageAntiriciclaggio.LogonAntiriciclaggio$GestoreEventi.windowOpene
d(LogonAntiriciclaggio.java:276)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
** END NESTED EXCEPTION **
Last packet sent to the server was 90 ms ago.
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2707)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at packageAntiriciclaggio.AmministrazioneDB.apriConnessione(Amministrazi
oneDB.java:44)
at packageAntiriciclaggio.AmministrazioneDB.<init>(AmministrazioneDB.jav
a:19)
at packageAntiriciclaggio.LogonAntiriciclaggio$GestoreEventi.windowOpene
d(LogonAntiriciclaggio.java:276)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at packageAntiriciclaggio.LogonAntiriciclaggio$GestoreEventi.windowOpene
d(LogonAntiriciclaggio.java:279)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)