• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

First Connection Fails after Server Reboot

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am Sys Admin so won't know about app itself but here is my env

OS: Ubuntu 10.4
Tomcat Ver: 6.0.24
Apache: Ver 2
mysql: 5.1.63
JDBC Driver: 5.1.18 copied in /var/lib/tomcat6/lib/

App works just fine. Issue is that when I reboot server and access app the first attempt always fails
catalina.out shows bunch of JDBC driver errors "No suitable drive found"
If I try same app again second time it starts working fine with no error. No JDBC error, all good

What is wrong? I have tried restarting tomcat after server reboot is complete. If I undeploy app and deploy it again then it does not work at all because undeploy make JDBC drive to de-register and it does not register again unless tomcat is restarted.

Any ideas?

Thanks
Kamal
 
Saloon Keeper
Posts: 28711
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Kamal!

If you look more closely, I think that the message is "No suitable driver found". Meaning that the JDBC connection factory could not find a driver class that matches the connection parameters.

Normally that means that the connection parameters were mis-configured. However, normally, this message isn't something that comes and goes, it's either there or it isn't.

My best guess is that you are either attempting to obtain connection parameters through some sort of unreliable connection mechanism or you have the driver jar in an unreliable place. I've seen problems with WARs on network drives, for example.

Note that the JDBC driver jar must be located in the TOMCAT_HOME/lib directory and NOT in any of the application WARs.
 
K Kamal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

Thanks for your reply.

Everything is running local. Web Server, Tomcat, mysql

JDBC connector jar file is in /var/lib/tomcat6/lib. WAR file is under /var/lib/tomcat6/webapps

Kamal
 
Tim Holloway
Saloon Keeper
Posts: 28711
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you supply us with a copy of your JDBC connection pool configuration?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In addition to what Tim asked for, posting the entire exception stacktrace that you see might give us a hint on what's going on.
 
reply
    Bookmark Topic Watch Topic
  • New Topic