 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
jgro
Joined: 09 Oct 2008 Posts: 16 Country: United States |
|
Cannot connect to the database: com.mysql.jdbc.Driver. |
|
I'm trying out the 24x7 scheduler on a Debian Etch 2.6.18-6-486 system. I'm using Multi-platform Edition Version 4.1 Build 273 with JVM Version 1.4.2_18-b06.
I set up a Database profile for a MySQL 5.0 database but for some reason it doesn't work. When I "test connection" I get the error "Cannot connect to the database: com.mysql.jdbc.Driver."
I can connect to the database from the same system using the mysql command line utility and the MySQL Query Browser.
I'm using Database URL jdbc:mysql://192.168.1.155:3306/testdb and the same user name and password I used with the MySQL tools. As far as I can tell they are both using the 5.0.4 version of the MySQL JDBC driver.
How can I fix or even troubleshoot this problem further?
|
|
Fri Oct 10, 2008 4:39 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
The URL looks ok. If you are using graphical mode, please enable tracing options in Tools/Options menu; Log tab; 'Trace enable' option. Retry 'Test connect' and then review debug.log file and jdbc.log files which should be created in the 24x7 home directory. Please let us know if you see any exceptions recorded in these files.
Note that the jdbc driver for MySQL is preinstalled with 24x7. I'm not sure which version is exactly is preinstalled but it should be compatible with MySQL 4.x, 5.x and somewhat with 6.x
|
|
Fri Oct 10, 2008 5:01 pm |
|
 |
jgro
Joined: 09 Oct 2008 Posts: 16 Country: United States |
|
|
|
I was using the standard out-of-the box configuration which, as you say, does include the 5.0.4 MySQL JDBC driver.
Here's the relevant bit of what showed up in debug.log (no jdbc.log file was created)
 |
 |
2008-10-10 14:20:42,029 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.F.B - loadDriver() driverPath=.\drivers\my\mysql-connector-java-5.0.4-bin.jar driverClass=com.mysql.jdbc.Driver
2008-10-10 14:20:42,030 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.F.B - parsed urls: 1
2008-10-10 14:20:42,031 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.F.B - url #0 file:/usr/local/jscheduler/.\drivers\my\mysql-connector-java-5.0.4-bin.jar
2008-10-10 14:20:42,040 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.F.B - java.net.URLClassLoader@10a5314
2008-10-10 14:20:42,040 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.F.B - java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
2008-10-10 14:20:42,215 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.ui.Object.I.String - testConnection():
com.softtreetech.jscheduler.common.SchedException: com.mysql.jdbc.Driver
at com.softtreetech.jscheduler.business.F.B.o00000(Unknown Source)
at com.softtreetech.jscheduler.ui.Object.I.String.ôoO000(Unknown Source)
at com.softtreetech.jscheduler.ui.Object.I.String.access$100(Unknown Source)
at com.softtreetech.jscheduler.ui.Object.I.String$2.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
|
(rest of stack trace omitted)
So it's clear that the default path to the driver is in Windows file system format and it is not being converted to Unix file system format by the URL parser. Changing the MySQL Driver's path property from .\drivers\my\mysql-connector-java-5.0.4-bin.jar to ./drivers/my/mysql-connector-java-5.0.4-bin.jar got the test to succeed.
Thank you for your help.
|
|
Fri Oct 10, 2008 5:41 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
Thanks for the status update. I'm glad you could quickly figure out where to change the driver path.
|
|
Fri Oct 10, 2008 5:58 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|