Cannot access a data source

What kind of database are you trying to access?

If the errors described in the previous articles do not match the errors you see:

  1. Browse the SYSPRINT or SYSOUT log fileof the application server for clues.
  2. Browse the Helper Class property of the data source to verify that it is correct and that it is on the WebSphere Application Server class path. Mysterious errors or behavior might result from a missing or misnamed Helper Class name. If WebSphere Application Server cannot load the specified class, it uses a default helper class that might not function correctly with your database manager.

General data access problems

IllegalConnectionUseException

This error can occur because a connection obtained from a WAS40DataSource is being used on more than one thread. This usage violates the J2EE 1.3 programming model, and an exception generates when it is detected on the server. This problem occurs for users accessing a data source through servlets or bean-managed persistence (BMP) enterprise beans.

To confirm this problem, examine the code for connection sharing. Code can inadvertently cause sharing by not following the programming model recommendations, for example by storing a connection in an instance variable in a servlet, which can cause use of the connection on multiple threads at the same time.

WTRN0062E: An illegal attempt to enlist multiple one phase capable resources has occurred

This error can occur because:

To correct this error:

ConnectionWaitTimeoutException accessing a data source or resource adapter

If your application receives exceptions like a com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException or com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException when attempting to access a WebSphere Application Server data source or JCA-compliant resource adapter, respectively, some possible causes are:

To correct these problems, either:

com.ibm.websphere.ce.cm.StaleConnectionException: [IBM][CLI Driver] SQL1013N The database alias name or database name "NULL" could not be found. SQLSTATE=42705

This error occurs when a data source is defined but the databaseName attribute and the corresponding value are not added to the custom properties panel.

To add the databaseName property:

  1. Click Resources>Manage JDBC Providers link in the administrative console.
  2. Select the JDBC provider that supports the problem data source.
  3. Select Data Sources and then select the problem data source.
  4. Under Additional properties click Custom Properties.
  5. Select the databaseName property, or add one if it does not exist, and enter the actual database name as the value.
  6. Click Apply or OK, and then click Save from the action bar.
  7. Access the data source again.

java.sql.SQLException: java.lang.UnsatisfiedLinkError:

This error indicates that the directory containing the binary libraries which support a database are not included in the LIBPATH environment variable for the environment in which the WebSphere Application Server starts.

The path containing the DBM vendor libraries vary by dbm. One way to find them is by scanning for the missing library specified in the error message. Then you can correct the LIBPATH variable to include the missing directory, either in the .profile of the account from which WebSphere Application Server is executed, or by adding a statement in a .sh file which then executes the startServer program.

"J2CA0030E: Method enlist caught java.lang.IllegalStateException" wrapped in error "WTRN0063E: An illegal attempt to enlist a one phase capable resource with existing two phase capable resources has occurred" when attempting to execute a transaction.

This error can occur when last participant support (LPS) is missing or disabled. LPS allows a one-phase capable resource and a two-phase capable resource to enlist within the same transaction.

LPS is only available if the following are true:

java.lang.UnsatisfiedLinkError:xaConnect exception when attempting a database operation

This problem has two main causes:


Related tasks
Troubleshooting by task: What are you trying to do?
Related reference
Problems accessing an Oracle data source
Problems accessing a DB2 database
Problems accessing a SQL server data source
Problems accessing a Cloudscape database
Problems accessing a Sybase data source



Searchable topic ID:   rtrb_dsaccess
Last updated: Jun 21, 2007 9:56:50 PM CDT    WebSphere Application Server for z/OS, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/rtrb_dsaccess.html

Library | Support | Terms of Use | Feedback