users@glassfish.java.net

No PasswordCredential found

From: <glassfish_at_javadesktop.org>
Date: Tue, 09 Feb 2010 13:27:51 PST

All

I am using Sun ONE Application Server 8.2 and trying to make my connection pool more resilient. I have Connection Validation turned on (required) and I have "Close All Connections" checked for "On Failure".

Initially my server sets up the connection pool just fine and my web service can connect, no problems. However, if I try to change the database instance I go against, then I get the following exception:
 
Could not get JDBC Connection; nested exception is java.sql.SQLException: Error in allocating a connection. Cause: No PasswordCredential found...

The Application Server does not indicate that I need to restart the instance and a Ping verifies that the database connection details are correct. So I would think when it tried again and got a failure, it should reconnect. But is the problem that there is nothing "wrong" with the original connections in the pool - just that they are now pointing at a different instance than what the server is pointing at. It could be that a restart is required in this case but I am just trying to find out for sure as it would be convenient if it weren't.

is there any way to release all connections from a pool and then populate - this would solve the problem too.
[Message sent by forum member 'bcoulson220' (bcoulson220_at_cox.net)]

http://forums.java.net/jive/thread.jspa?messageID=385752