You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Florian Desbois <fl...@wiztivi.com> on 2012/02/08 16:06:20 UTC

Re: java.sql.SQLException: No suitable driver found for in tomcat 6.0.35, is the class loading changed?

Hello,

I have the same issue with c3p0 0.9.1.2. Even if i put the mysql-connector
inside the webapp (instead of CATALINA_HOME/lib), the issue appears.

I also tried to put both c3p0 and mysql-connector in CATALINA_HOME/lib but
the same problem occurs. There is no issue when using tomcat 6.0.33.

I notice that using JNDI is a best practice, but it's a little bit of work
to do it now (lots of projects). Do you have any idea, why it doesn't work
anylonger ?

--- stackTrace ---

8 févr. 2012 15:58:37
com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
ATTENTION:
com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@c77d0d6
-- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending
tasks!
8 févr. 2012 15:58:37
com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
ATTENTION:
com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@c77d0d6
-- APPARENT DEADLOCK!!! Complete Status: 
	Managed Threads: 3
	Active Threads: 3
	Active Tasks: 
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7423c7f5
(com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@591ce164
(com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@771199f0
(com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
	Pending Tasks: 
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@249198a2
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@52bbc66f
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@25e0cbd8
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4966e555
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@25a5519
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7888dd83
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@61870147
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@66650e56
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7490649e
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@33bdfcdb
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7e23a866
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@5705013c
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@99436c6
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@61980613
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@43b6fb73
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@22365dc0
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1f44f9cc
Pool thread stack traces:

Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
		java.lang.Thread.sleep(Native Method)
	
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
	
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
		java.lang.Thread.sleep(Native Method)
	
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
	
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
		java.lang.Thread.sleep(Native Method)
	
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
	
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)


8 févr. 2012 15:58:46
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask run
ATTENTION:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7423c7f5 --
Acquisition Attempt Failed!!! Clearing pending acquires. While trying to
acquire a needed new resource, we failed to succeed more than the maximum
number of allowed acquisition attempts (30). Last acquisition attempt
exception: 
java.sql.SQLException: No suitable driver
	at java.sql.DriverManager.getDriver(DriverManager.java:264)
	at
com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:223)
	at
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
	at
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
	at
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
	at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
	at
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
	at
com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
	at
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
	at
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)


--
View this message in context: http://tomcat.10.n6.nabble.com/java-sql-SQLException-No-suitable-driver-found-for-in-tomcat-6-0-35-is-the-class-loading-changed-tp2111551p4376238.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: java.sql.SQLException: No suitable driver found for in tomcat 6.0.35, is the class loading changed?

Posted by Florian Desbois <fl...@wiztivi.com>.
Thanks, it was that ! I missed the mysql driverClass in the dataSource.

Strange that with tomcat 6.0.33 i haven't the problem.

> its about the driver....u have to provide the correct driver available
> for connection
> for eg
>
> com.mysql.jdbc.Driver
>
> and the url for connection


--
View this message in context: http://tomcat.10.n6.nabble.com/java-sql-SQLException-No-suitable-driver-found-for-in-tomcat-6-0-35-is-the-class-loading-changed-tp2111551p4376572.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: java.sql.SQLException: No suitable driver found for in tomcat 6.0.35, is the class loading changed?

Posted by Anshul katta <an...@gmail.com>.
its about the driver....u have to provide the correct driver available
for connection
for eg

com.mysql.jdbc.Driver

and the url for connection

On 2/8/12, Florian Desbois <fl...@wiztivi.com> wrote:
> Hello,
>
> I have the same issue with c3p0 0.9.1.2. Even if i put the mysql-connector
> inside the webapp (instead of CATALINA_HOME/lib), the issue appears.
>
> I also tried to put both c3p0 and mysql-connector in CATALINA_HOME/lib but
> the same problem occurs. There is no issue when using tomcat 6.0.33.
>
> I notice that using JNDI is a best practice, but it's a little bit of work
> to do it now (lots of projects). Do you have any idea, why it doesn't work
> anylonger ?
>
> --- stackTrace ---
>
> 8 févr. 2012 15:58:37
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
> ATTENTION:
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@c77d0d6
> -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending
> tasks!
> 8 févr. 2012 15:58:37
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
> ATTENTION:
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@c77d0d6
> -- APPARENT DEADLOCK!!! Complete Status:
> 	Managed Threads: 3
> 	Active Threads: 3
> 	Active Tasks:
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7423c7f5
> (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@591ce164
> (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@771199f0
> (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
> 	Pending Tasks:
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@249198a2
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@52bbc66f
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@25e0cbd8
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4966e555
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@25a5519
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7888dd83
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@61870147
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@66650e56
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7490649e
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@33bdfcdb
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7e23a866
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@5705013c
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@99436c6
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@61980613
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@43b6fb73
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@22365dc0
> 		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1f44f9cc
> Pool thread stack traces:
>
> Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
> 		java.lang.Thread.sleep(Native Method)
> 	
> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
> 	
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
>
> Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
> 		java.lang.Thread.sleep(Native Method)
> 	
> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
> 	
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
>
> Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
> 		java.lang.Thread.sleep(Native Method)
> 	
> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
> 	
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
>
>
> 8 févr. 2012 15:58:46
> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask run
> ATTENTION:
> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7423c7f5 --
> Acquisition Attempt Failed!!! Clearing pending acquires. While trying to
> acquire a needed new resource, we failed to succeed more than the maximum
> number of allowed acquisition attempts (30). Last acquisition attempt
> exception:
> java.sql.SQLException: No suitable driver
> 	at java.sql.DriverManager.getDriver(DriverManager.java:264)
> 	at
> com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:223)
> 	at
> com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
> 	at
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
> 	at
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
> 	at
> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
> 	at
> com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
> 	at
> com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
> 	at
> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
> 	at
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
>
>
> --
> View this message in context:
> http://tomcat.10.n6.nabble.com/java-sql-SQLException-No-suitable-driver-found-for-in-tomcat-6-0-35-is-the-class-loading-changed-tp2111551p4376238.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org