Problems accessing a Cloudscape database

 

What kind of problem are you having accessing

your Cloudscape database?

Tip: Cloudscape errorCodes (2000, 3000, 4000) indicate levels of severity, not specific error conditions. In diagnosing Cloudscape problems, pay attention to the given sqlState value.

 

Unexpected IOException wrapped in SQLException,

accessing Cloudscape database

This problem can occur because Cloudscape databases use a large number of files. Some operating systems, such as the Solaris Operating Environment, limit the number of files an application can open at one time. If the default is a low number, such as 64, one can get this exception.

If your operating system lets you configure the number of file descriptors, one can correct the problem by setting the number to a high value, such as 1024.

 

The "select for update" operation causes table

lock and deadlock when accessing Cloudscape

If a select for update operation on one row locks the entire table, which creates a deadlock condition, there might be undefined indexes on that table. The lack of an index on the columns you use in the where clause can cause Cloudscape to create a table lock rather than a row level lock.

To resolve this problem, create an index on the affected table.

 

ERROR XSDB6: Another instance of Cloudscape

may have already booted the database "database"

This problem occurs because Cloudscape embedded framework only allows one Java virtual machine (JVM) to access the database instance at a time.

To resolve this problem:

  1. Verify that you do not have other JDBC client programs, such as ij or cview running on that database instance, when WAS is running.

  2. Verify that you do not use the same instance of the database for more than one data source or use the networkServer framework, which doesn't have this limitation.

  3. If there are no connections to Cloudscape, delete the db.lck lock file. This file can be found in the directory where the Cloudscape database is mounted, under the schema directory. For example, if the database is mounted at /myCloudscapeDB, issue the command: rm /myCloudscapeDB/schemaName/db.lck

Error "The version of the IBM Universal JDBC driver in use is not licensed for connectivity to Cloudscape databases"

 

Error "The version of the IBM Universal JDBC

driver in use is not licensed for connectivity to Cloudscape databases"

At the client runtime, an error similar to the following occurs

The version of the IBM Universal JDBC driver in use is not 
licensed for connectivity to Cloudscape databases.  To connect 
to this DB2 server, please obtain a licensed copy of the IBM DB2 
Universal Driver for JDBC and SQLJ.  An appropriate license file 
db2jcc_license_*.jar for this target platform must be installed to 
the application classpath.  Connectivity to Cloudscape databases is 
enabled by any of the following license files: 
{ db2jcc_license_c.jar, b2jcc_license_cu.jar, db2jcc_license_cisuz.jar }
The problem occurs because an incorrect JDBC driver jar file name is specified in the class path for JDBC provider. For example, the jar file name may have an extra '_', as follows

${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license__cu.jar

To resolve the problem:

  1. Correct the UNIVERSAL_JDBC_DRIVER_PATH jar file name in the JACL script

  2. Restart the cluster.

  3. Rerun the client.

 

Run an application causes a runtime

exception which produces an unreadable message.

At client runtime, you may receive a message similar to the following: Caused by: com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -1, SQLSTATE: 42X05, SQLERRMC: ANNUITYHOLDER20^T42X05

The problem occurs because the property retrieveMessagesfromServerOnGetMessage, which is required by WebSphere Application Server, has not been set.

To resolve the problem, on the admininstrative console

  1. Click...

    Resources | JDBC Providers | Cloudscape provider

  2. Scroll down and click on Data Sources

  3. Select your data source (or add a new one)

  4. Scroll down and select Custom Properties

  5. If the property retrieveMessagesFromServerOnGetMessage already exists, set its value to true. If the property does not exist, select Newand add the property retrieveMessagesFromServerOnGetMessage with a value true

  6. Rerun the client

The SystemOut.log will now generate readable messages so that one can resolve the underlying problem.


 

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

 

See Also


Cannot access a data source
Problems accessing an Oracle data source
Problems accessing a DB2 database
Problems accessing a SQL server data source
Problems accessing a Sybase data source
Extensions to data access APIs