Bug #3920 "No database selected" when using ConnectionPoolDataSource
Submitted: 27 May 2004 18:31 Modified: 28 May 2004 14:34
Reporter: Mark Matthews Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:3.0.12 OS:
Assigned to: Mark Matthews CPU Architecture:Any

[27 May 2004 18:31] Mark Matthews
Description:
Hi,

We have problems using Connector/J 3.0.12-production with WebSphere 5.x. Gets "No database selected". But when  just replacing the driver with the version 3.0.9-stable it works just fine. Something have changed that makes it not-working.

See thread: http://www-106.ibm.com/developerworks/forums/dw_thread.jsp?forum=267&thread=49891&cat=9

Using:
- WebSphere Application Server 5.02 and 5.1
- Version 5 datasource with JAAS
- Class: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource and Data source helper: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
- Properties: 'databaseName' and 'serverName'.

How to repeat:
See thread: http://www-106.ibm.com/developerworks/forums/dw_thread.jsp?forum=267&thread=49891&cat=9
[27 May 2004 18:34] Mark Matthews
This version of Connector/J uses the changeUser() functionality, but wasn't sending the database along with the re-auth request.

This is now fixed and will be in 3.0.13 (and the nightly snapshots after 00:00 GMT this evening at http://downloads.mysql.com/snapshots.php)
[28 May 2004 7:59] Joacim Jarkeborn
Well, seems not to be ok afterall. Now I get:

Cannot get a connection from the database, configuration may be corrupt; java.sql.SQLException: Cannot load connection class because of underlying exception: 'java.lang.NumberFormatException: localhost'.  minor code: 0  completed: No

I have a property 'serverName' of type 'java.lang.String' that contains 'localhost'.

BR Joacim
[28 May 2004 14:34] Mark Matthews
This is fixed in 3.0.14