-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: java.sql.SQLException: No suitable driver - tomcat7+C3P0
PostPosted: Sat Jul 05, 2014 1:44 am 
Newbie

Joined: Fri Jul 04, 2014 3:46 pm
Posts: 1
I've built my app using eclipse. I now want to run it directly on tomcat on a production server without eclipse.
I have exported a war file, and managed to deploy it, it runs the non db part of the code but fails on establishnig a db connection
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:278)

The only advice I can find is
1. check the connection URL
2. check you've got the database connector jar in the right place.

i have checked the connection URL, indeed I have written a stanalone version to run on the command line and that works running the same code my Rest stuff calls. i.e I compiled and ran it using the classpath for my "Gee" app /var/lib/tomcat7/webapps/Gee/WEB-INF/lib and classes.
But it wont run in tomcat. I have stuck the mysql-connect jar file in every likely directory. I have also moved it away from the above directories and recomplied my standalone, unsuccessfuly, to prove to myself that that is where the code is coming from.
It's definetely not the conenction URL, the DB is there, I even ran my test program as user tomcat7.

What diagnostics can I stick in my program before trying to open a hibernate session to see where C3P0 (I assume) is looking for db connectors.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


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

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.