If the errors described in the previous articles do not match the errors you see:
See Viewing JVM logs. By default, these files are install_root/server_name/SystemErr.log and SystemOut.log.
If none of these steps fixes your problem, see if the problem is identified and documented in available online support (hints and tips, technotes, and fixes). If none of the online resources listed in the topic describes your problem, see Troubleshooting help from IBM.
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:
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 is missing or disabled. last participant support allows a one-phase capable resource and a two-phase capable resource to enlist within the same transaction. Last participant support is only available if the following are true:
java.lang.UnsatisfiedLinkError:xaConnect exception when attempting a database operation This problem has two main causes:
When specifying the location of the driver file, it is recommended to that you specify the path and file name of the target DB2 installation, rather than simply copying the file to a local directory, if possible. Otherwise, you may be exposed to problems if the target DB2 installation is upgraded and the driver used by WebSphere Application Server is not. If you choose DB2 Legacy CLI-based type 2 JDBC Driver when defining a JDBC provider in WebSphere Application Server, then still follow the steps to ensure that you have the correct version of the db2java.zip file (see instructions for DB2 7.2 or earlier).
If you are using DB2 The native library is libdb2jdbc.so. The best way to ensure that this library is accessed correctly by WebSphere is to call the db2profile script supplied with DB2 from the .profile script of the account (such as "root") under which WebSphere runs.
If you are using a CLI driver or a Universal JDBC T2 driver, WebSphere Application Server does support interaction with a DB2 UDB 64-bit server, but it must be through a DB2 UDB 32-bit client. The WebSphere Application Server environment (CLASSPATH and so on) must use the 32-bit client code to ensure correct function.
With a Universal JDBC T4 driver, you do not need the 32-bit DB2 client. You need only configure the CLASSPATH to include db2jcc.jar and its license files in the WebSphere Application Server environment.
Note: For general help in configuring JDBC drivers and data sources in WebSphere Application Server, see the topic Accessing data from applications.
"J2CA0114W: No container-managed authentication alias found for connection factory or datasource datasource" when attempting a database operation
This error might occur in the SystemOut.log file when you run an application to access a data source after creating the data source using JACL script. The error message occurs because the JACL script did not set container-managed authentication alias for CMP connection factory. The JACL is missing the following line:
$AdminConfig create MappingModule $cmpConnectorFactory "{mappingConfigAlias DefaultPrincipalMapping} {authDataAlias $authDataAlias}
To correct this problem, add the missing line to the JACL script and run the script again. See Example: Creating a JDBC provider and data source using Java Management Extensions API and the scripting tool for a sample JACL script.
An error is thrown if you use the ws_ant command to perform the database customization for Structured Query Language in Java on HP platformsIf you use the ws_ant command to perform the database customization for Structured Query Language in Java (SQLJ) on HP platforms, you can receive an error similar to the following:
[java] [ibm][db2][jcc][sqlj] [java] [ibm][db2][jcc][sqlj] Begin Customization [java] [ibm][db2][jcc][sqlj] encoding not supported!!The cause of this error might be that your databases were created using the HP default character set. The Java Common Client (JCC) driver depends on the software development kit (SDK) to perform the codepage conversions. The SDK shipped with this product, however, does not support the HP default codepage. You need to set your LANG to the ISO locale before creating the databases. It should be similar to the following:
export LANG=en_US.iso88591 Refer to the DB2 Tech Notes at http://www-3.ibm.com/software/data/db2/udb/ad/v8/bldg/t0004877.htm for details.
Container-managed persistence (CMP) cannot successfully obtain the database access function as defined.
When WebSphere Application Server is caching certain generated code that is accessed in the database on the connection factory, and if any changes in the Java archive (JAR) file require regeneration of the database access, the changes are not effective until you stop and restart the server. Examples of when this failure might occur include:
In summary, if you add or update an enterprise bean that contains a custom finder method, stop and then restart the server.
Related tasks
Troubleshooting by task
Troubleshooting by component
Example: Accessing data using IBM extended APIs to share connections between container-managed and bean-managed persistence beans
Related reference
Extensions to data access APIs
Searchable topic ID: rtrb_dsaccess