Test Connection fails with 'java.sql.SQLException: invalid arguments in call' when using Version 5 datasource
 Technote (troubleshooting)
 
Problem(Abstract)
Each datasource configuration panel in the administrative console includes a Test Connection button.

Test Connection is successful when using a Version 4 datasource, but fails when using Version 5 datasource with the following exception:

DataSourceCon E DSRA8040I: Failed to connect to the DataSource. Encountered : java.lang.Exception: java.sql.SQLException: invalid arguments in call
at com.ibm.ws.rsadapter.DSConfigurationHelper.testConnectionForGUI(DSConfigurationHelper.java:1755)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.management.DataSourceConfigHelperMBean.testConnectionToDataSource2(DataSourceConfigHelperMBean.java:461)
 
Symptom
 
Cause
This message occurs if there is no user ID and password configured for the datasource. For a Version 5 datasource, the J2C Authentication alias contains the user ID and password, and is component managed or container managed.
 
Resolving the problem
From the administrative console, in your Version 5 datasource Configuration Panel, create a new J2C Authentication Data Entries providing the database user ID and password:


You must restart the server after creating the new alias.

In your Datasource Configuration, select the new J2C Authentication Alias from either the Component-managed Authentication Alias or Container-managed Authentication Alias drop down list:


Apply and Save the changes, then retry the Test Connection.

Note: EJB™s and Message-Driven Beans are configured to use Per Resource or Container Resource authentication. This information is located on the CMP Resource Bindings tab for beans in the Application Assembly Tool. If the object is configured with Per Resource, the datasource used by that object must be configured with a Component-managed Authentication Alias. If the object is configured with Container, the datasource must be configured with Container-managed Authentication Alias.

 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java 2 Connectivity (J2C)
Operating system(s): Windows
Software version: 5.0
Software edition:
Reference #: 1116116
IBM Group: Software Group
Modified date: Jul 13, 2004