commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <dirk.verbe...@pandora.be>
Subject Re: [dbcp] Connection pooling error w/MySQL
Date Mon, 13 Oct 2003 20:15:47 GMT
Jon

I looked at the mysql driver source and I'm still betting on a network 
issue.
Are you sure you don't have any firewall software running locally that 
can cause problems.
Or are you running tomcat with the security manager enabled? (-security 
command line parameter)

One last test, can you run your test code

private Connection getConnection() {//load driver	try{
	Class.forName(driverClassName);	} catch
(ClassNotFoundException cnfe) {		log(driverClassName +
" is not in the classpath");		System.exit(1);	}
Connection conn = null;	try {		conn =
DriverManager.getConnection(dbURL, dbUser,dbPwd);	
conn.setAutoCommit(false);	} catch (Exception e) {	
log("getConnection failed to connect to '" + dbURL +
"' with user '" + dbUser + "'", e);		System.exit(1);	}
return conn;}


from inside a servlet or jsp page and see what happens?


Dirk
 

Jon Wilmoth wrote:

>Sorry about the delay.  Here's everything you've asked
>for:
>
>There is a servlet that is loaded at application
>startup that performs a db connection test.  Calls to
>getConnection() on the DataSource after the webapp has
>been deployed also fail with the same error.  Since
>Tomcat doesn't support external jvm access to the JNDI
>implementation, I'm including the code for a struts
>action used to test datasource health.
>  
>
<example removed>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message