Re: R: How to start Connector/MXJ ?
Eric Herman <[email protected]>
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <1158586903.4724.7.camel@localhost> |
Hello Roberto Regazzoni, On Mon, 2006-09-18 at 14:52 +0200, tech wrote: > Yes, Eric. Both files are in the CLASSPATH environment variable as follows: > > C:\connector-mxj\connector-mxj\connector-mxj.jar;C:\connector-mxj\connector- > mxj\lib\aspectjrt.jar > > Please note that the first directory called connector-mxj includes two > directories: > 1) connector-mxj > 2) META-INF > > > As I read at the end of paragraph 23.4.3.1 of the online manual ( > http://dev.mysql.com/doc/refman/5.0/en/connector-mxj-configuration-driver-la > unched.html ) I also tried to add to the CLASSPATH the Connector/J as > follows: > > C:\Programmi\MySQL\mysql-connector-java-5.0.3\mysql-connector-java-5.0.3-bin > .jar > > but I still get the previous errors. Okay, so far that all sounds right. Can you please try again and record the entire console output, including the display of the classpath? I've attached an example of the what I'm looking for generated from my Windows XP SP2 machine. > > > Please note that the path to MySQL Server is not in the CLASSPATH, but in > the Path environment variable, as follows: > C:\Programmi\MySQL\MySQL Server 5.0\bin For the record, that should not make a difference what other MySQL servers you have installed because Connector/MXJ uses its own "mysqld-nt.exe" for launching the mysql server. Cheers, - Eric > > > My setup is the following: > Windows XP Service Pack 2 > Java 1.5.0_06 > MySQL 5.0.24a > Connector/J 5.0.3 > Connector/MXJ 5.0.3 beta > > > I'm open to any suggestion, even to go back to previous releases of MySQL, > Connector/J, Connector/MXJ. > > Thanks in advance > > Roberto Regazzoni > > > > > -----Messaggio originale----- > Da: Eric Herman [mailto:[email protected]] > Inviato: lunedì 18 settembre 2006 13.22 > A: tech > Cc: [email protected] > Oggetto: Re: How to start Connector/MXJ ? > > Hello Roberto Regazzoni, > > On Mon, 2006-09-18 at 11:21 +0200, tech wrote: > > I developed a simple java application based on MySQL 5.0.24a and > > Connector/J 5.0.3. It works. > > > > I read I could deploy such an application to other clients by means of > > Connector/MXJ. > > > > I downloaded Connector/MXJ 5.0.3 beta on my development pc and tried to > > install it following the online manual step by step. > > > > > > > > Following chapter 23.4.2.3 Connector/MXJ Quick Start Guide, > > > http://dev.mysql.com/doc/refman/5.0/en/connector-mxj-install-quickstart.html > > > > > > > > > > I tried to run ConnectorMXJUrlTestExample. Unfortunately I got the > following > > messages: > > > > 1) Mysqld is not running > > > > 2) There is no file MysqldResource.pid > > > > 3) Could not create socket factory > > 'com.mysql.management.driverlaunched.ServerLauncherSocketFactory' because > > the class was not found. > > > > > > > > Can anyone give me some help ? > > Sure. I'd be glad to try to help. > > On the surface it looks like a classpath issue. > > What the CLASSPATH set to? > Is connector-mxj.jar in classpath? > What about aspectjrt.jar (found in the connector-mxj "lib" directory)? > > Cheers, > -Eric > > > > > > > > > Thanks in advance > > > > Roberto Regazzoni > > > > > > > > > > > > > > > > > > > > > > > > Below you can see the error log: > > > > > > > > > > > > > jdbc:mysql:mxj://localhost:3336/test?server.basedir=C:\DOCUME~1\Roberto\IMPO > > ST~1\Temp\test-mxj > > > > [MysqldResource] Mysqld not running. No file: C:\Documents and > > Settings\Roberto\Impostazioni locali\Temp\test-mxj\data\MysqldResource.pid > > > > Exception in thread "main" > > com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Could not > > create socket factory > > 'com.mysql.management.driverlaunched.ServerLauncherSocketFactory' due to > > underlying exception: java.lang.ClassNotFoundException: > > com.mysql.management.driverlaunched.ServerLauncherSocketFactory > > > > > > > > ** BEGIN NESTED EXCEPTION ** > > > > > > > > java.lang.ClassNotFoundException > > > > MESSAGE: com.mysql.management.driverlaunched.ServerLauncherSocketFactory > > > > > > > > STACKTRACE: > > > > > > > > java.lang.ClassNotFoundException: > > com.mysql.management.driverlaunched.ServerLauncherSocketFactory > > > > at java.net.URLClassLoader$1.run(Unknown Source) > > > > at java.security.AccessController.doPrivileged(Native Method) > > > > at java.net.URLClassLoader.findClass(Unknown Source) > > > > at java.lang.ClassLoader.loadClass(Unknown Source) > > > > at java.lang.ClassLoader.loadClass(Unknown Source) > > > > at java.lang.ClassLoader.loadClassInternal(Unknown Source) > > > > at java.lang.Class.forName0(Native Method) > > > > at java.lang.Class.forName(Unknown Source) > > > > at com.mysql.jdbc.MysqlIO.createSocketFactory(MysqlIO.java:2167) > > > > at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:274) > > > > 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 > > ConnectorMXJUrlTestExample.main(ConnectorMXJUrlTestExample.java:30) > > > > > > > > > > > > ** END NESTED EXCEPTION ** > > > > > > > > > > > > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888) > > > > at com.mysql.jdbc.MysqlIO.createSocketFactory(MysqlIO.java:2170) > > > > at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:274) > > > > 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 > > ConnectorMXJUrlTestExample.main(ConnectorMXJUrlTestExample.java:30) > > > > > > > > > > > > > > > > > > -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/[email protected]
Connector_MXJ_console_output.txt
(text/plain, 2.2 KB)
C:\>java -version java version "1.5.0_08" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03) Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing) C:\>SET CLASSPATH=C:\apps\mysql-connector-java-5.0.3\mysql-connector-java-5.0.3- bin.jar;C:\apps\connector-mxj\connector-mxj.jar;C:\apps\connector-mxj\lib\aspect jrt.jar C:\>java ConnectorMXJUrlTestExample jdbc:mysql:mxj://localhost:3336/test?server.basedir=C:\DOCUME~1\user\LOCALS~1\Te mp\test-mxj [MysqldResource] launching mysqld (getOptions) [C:\Documents and Settings\user\Local Settings\Temp\test-mxj\bin\mysqld-nt.exe][ --no-defaults][--console][--pid-file=C:\Documents and Settings\user\Local Settin gs\Temp\test-mxj\data\MysqldResource.pid][--socket=mysql.sock][--datadir=C:\Docu ments and Settings\user\Local Settings\Temp\test-mxj\data][--port=3336][--basedi r=C:\Documents and Settings\user\Local Settings\Temp\test-mxj] [MysqldResource] launching mysqld (driver_launched_mysqld_1) InnoDB: The first specified data file .\ibdata1 did not exist: InnoDB: a new database to be created! 060918 13:23:16 InnoDB: Setting file .\ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 060918 13:23:16 InnoDB: Log file .\ib_logfile0 did not exist: new to be created InnoDB: Setting log file .\ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 060918 13:23:16 InnoDB: Log file .\ib_logfile1 did not exist: new to be created InnoDB: Setting log file .\ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 060918 13:23:17 InnoDB: Started; log sequence number 0 0 060918 13:23:17 [Note] C:\Documents and Settings\user\Local Settings\Temp\test-m xj\bin\mysqld-nt.exe: ready for connections. Version: '5.0.22-community-nt' socket: '' port: 3336 MySQL Community Edition (GPL) [MysqldResource] mysqld running as process: 2824 ------------------------ 5.0.22-community-nt ------------------------ [MysqldResource] stopping mysqld (process: 2824) [MysqldResource] clearing options [MysqldResource] shutdown complete C:\>