Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MySql 'Cannot create JDBC driver of class '' for connect URL 'jdbc:mysql://

843840Sep 26 2007 — edited Oct 3 2007
Hello everyone,

I have a small app developing with Struts and MyEclipse (3.1). Before above error came out, I used Tomcat 5.5 and 'apache2triad1.5.4' which includes Apache/PHP/MySql. The data source configuration is set up in struts-config.xml. Everything was fine. Couple days ago, I uninstalled 'apache2triad1.5.4' since MySql in it doesn't support the type InnoDB. And then I install MySQL 4.1, Apache2.2 & PHP, individually, and still use same Tomcat5.5. When I start Tomcat inside MyEclipse, I get below error message:
......

ERROR: 2007-09-26 00:38:16,783 [main] ActionServlet - Initializing application data source org.apache.struts.action.DATA_SOURCE
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'jdbc:mysql://localhost:3306/xxx?autoReconnect=true'

I am able to access database inside Eclipse via 'MyEclipse Database Explorer'. But it is failed to start the Tomcat service inside Eclipse.

The only thing I have changed was installing MySQL, Apache and PHP one by one rather than using 'apache2triad1.5.4'.

Does anyone know what may cause the problem?

Thanks in advance.

northcloud

There is 'mysql-connector-java-3.1.11-bin.jar' under 'E:\Tomcat5.5\common\lib' on my computer.

Here is a part of struts-config.xml.

....
<data-sources>
<data-source type="org.apache.commons.dbcp.BasicDataSource">
<set-property property="description" value="Database"/>
<set-property property="driverClass" value="com.mysql.jdbc.Driver"/>
<set-property property="url" value="jdbc:mysql://localhost:3306/xxx?autoReconnect=true"/>
<set-property property="username" value="root"/>
<set-property property="password" value="xxxxxx"/>
<set-property property="maxActive" value="1000" />
<set-property property="maxWait" value="5000" />
<set-property property="defaultAutoCommit" value="false" />
<set-property property="defaultReadOnly" value="false" />

</data-source>
......
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2007
Added on Sep 26 2007
7 comments
434 views