R: How to start Connector/MXJ ?

"tech" <[email protected]>
Newsgroups gmane.comp.db.mysql.java
Organization edoss consulenze
Message-ID <[email protected]>
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. 


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


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)
> 
>  
> 
> 
> 
> 
> 
> 
> 
-- 
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.1760 (20060918) __________

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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.