lemonzone2010 / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

tomcat starts with 'no suitable driver' #381

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. start tomcat with webapp that has javamelody jar
2. view catalina.out

What is the expected output? 
No errors logged

What do you see instead?
java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:279)
    at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at net.bull.javamelody.JdbcWrapper$3.invoke(JdbcWrapper.java:750)
    at net.bull.javamelody.JdbcWrapper$DelegatingInvocationHandler.invoke(JdbcWrapper.java:277)
    at sun.proxy.$Proxy6.getConnection(Unknown Source)
    at net.bull.javamelody.JavaInformations.buildDataBaseVersion(JavaInformations.java:377)
    at net.bull.javamelody.JavaInformations.<init>(JavaInformations.java:186)

What version of the product are you using? 
1.48.0

On what application server
Tomcat 7.0.26

JDK
OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

operating system
Ubuntu 12.04.3 LTS

Original issue reported on code.google.com by mmartin2...@gmail.com on 14 Feb 2014 at 5:25

GoogleCodeExporter commented 9 years ago
The web app works fine and javamelody works fine (including the sql monitoring 
of our datasources) regardless of the logged messages.  But if there is a way 
to suppress this error from being logged it would be helpful.

Original comment by mmartin2...@gmail.com on 14 Feb 2014 at 5:29

GoogleCodeExporter commented 9 years ago
There is no such exception in general.
Can you enable the debbuging logs and give the logs?
https://code.google.com/p/javamelody/wiki/UserGuideAdvanced#Debugging_logs

Original comment by evernat@free.fr on 20 Feb 2014 at 8:51

GoogleCodeExporter commented 9 years ago
And I forgot to ask:
Is there a jdbc datasource that is defined but not used by your application in 
this environment, and that does not have the correct driver to be initialized?

In any case, the logWriter in org.apache.commons.dbcp.BasicDataSource is 
probably printing that stack-trace, not javamelody.

Original comment by evernat@free.fr on 21 Feb 2014 at 5:34

GoogleCodeExporter commented 9 years ago
Is there a jdbc datasource that is defined but not used by your application in 
this environment, and that does not have the correct driver to be initialized?

This might be the case -there is a datasource in web.xml that is not in our 
server.xml or context.xml.  We will make the files consistent and see if that 
addresses the issue.

Original comment by mmartin2...@gmail.com on 21 Feb 2014 at 5:48

GoogleCodeExporter commented 9 years ago
Hi mmartin29AToreillyauto,
Any news?

Original comment by evernat@free.fr on 28 Feb 2014 at 10:16

GoogleCodeExporter commented 9 years ago
we made the change and I have not seen any errors in our testing builds at this 
time.  we are probably a couple weeks away from rolling it out to more servers.

Original comment by mmartin2...@gmail.com on 28 Feb 2014 at 10:23

GoogleCodeExporter commented 9 years ago
Hi mmartin29AToreillyauto,
Is it ok now?

Original comment by evernat@free.fr on 13 Apr 2014 at 1:12

GoogleCodeExporter commented 9 years ago
Yes thank you

Original comment by mmartin2...@gmail.com on 16 Apr 2014 at 3:30

GoogleCodeExporter commented 9 years ago
ok, thanks

Original comment by evernat@free.fr on 16 Apr 2014 at 5:17