Getting a connection from a Sybase datasource in WAS 6.1 fails with message "User name property miss

Posted by Abel Morelos on Stack Overflow See other posts from Stack Overflow or by Abel Morelos
Published on 2010-04-13T15:09:47Z Indexed on 2010/04/23 2:33 UTC
Read the original article Hit count: 350

I have a standalone application that needs to connect to a Sybase database via a datasource, I'm trying to connect using getConnection() and get the connection from this Sybase datasource which is hosted in WAS 6.1, sadly I'm getting an error JZ004 -> Sybase(R) jConnect for JDBC(TM) Programmer's Reference: SQL Exception and Warning Messages

JZ004 error message is:
User name property missing in DriverManager.getConnection(..., Properties) Action: Provide the required user property.

As you can see, this is not a connectivity (so we can discard JNDI or lookup problems), but rather a configuration problem. For my Sybase datasource in WAS 6.1 I have set up the proper authentication alias (Component-managed Authentication Alias), and I know the credentials are alright, "Test Connection" is successful for this datasource. Somebody had a similar problem and was because of the authentication alias-> http://forum.springsource.org/showthread.php?t=39915

Next, I tried calling getConnection() but now I provided the credentials like getConnection(user, password)... and this time it worked!!! So I suspect that somehow WAS 6.1 is not picking or taking the authentication info I set in the datasource as mentioned before.

If you think that maybe getConnection(user, password) should be OK for my case, well, that's not the case since I have a requirement to keep the credentials in the server, the standalone application only needs to know the JNDI information to lookup the datasource.

Please let me know if have faced a similar problem, or what would you suggest me to do.

Thanks.

© Stack Overflow or respective owner

Related posts about websphere

Related posts about websphere-6.1