Page 1 of 1

dbcp no suitable driver

Posted: Thu Oct 22, 2009 7:19 am
by slp
Hi,

I'm getting an exception when trying the demo site after I finally built it.

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'http://localhost:3306/mydb'
...
Caused by: java.sql.SQLException: No suitable driver

the driver is available (I've put the jar in WEB-INF/lib, then in my tomcat's lib, then in both still facing the same problem). And when I remove it I've got another (and more expected) exception (ClassNotFoundException). So the driver class is found. This looks like a classloader issue, maybe?

It might not be coming from your side, but any help would be appreciated...

Thanx!

Re: dbcp no suitable driver

Posted: Thu Oct 22, 2009 10:53 am
by jefffischer
It looks like your jdbc url is not formatted properly. In build.properties, for the demo, you should have a jdbc url that looks something like "jdbc:mysql://localhost:3306/mydb" (given that mydb is the database you want to use). The url you specified below is "http://localhost:3306/mydb" and I'm sure all the available drivers are responding adversely to requests to handle this url.

Re: dbcp no suitable driver

Posted: Fri Oct 23, 2009 11:55 am
by slp
Oups! Sorry for that one. Shameful mistake...
Thank you very much Jeff for taking time to reply though, you potentially saved me hours of frustrating search.
I've got it up and running now, and might use it as the basis for my website.
As I will therefore be testing it, is there any tracking system or email adress where bugs can be reported? (I found a small one in a JSP but a forum doesn't seem to me like the appropriate place to report it)

Have a nice week-end,

Said

Re: dbcp no suitable driver

Posted: Mon Oct 26, 2009 3:31 pm
by jefffischer
If you click the "view tickets" button at the top of the screen in the wiki, it should take you to the bug tracking system. Here's a quick link: http://broadleafcommerce.org/trac/report/1