Q
Problem solve Get help with specific problems with your technologies, process and projects.

WAS 5 error message

We are getting an error message on a WAS 5 server running on zOS. We are not getting this message when the developer runs the code locally off of his PC (WASD, V5R1). The message says the database is in read-only, but it's not. The code and SQL are the same. The difference is WAS on ZOS vs. WAS on the developer's PC.

Here's the message:

java.sql.SQLException: DB2JDBCSQLCompiler Received Error in Method compileSQL -> Insert/Update/Delete not honored. Database is readOnly.

COM.ibm.db2os390.sqlj.jdbc.DB2JDBCSQLCompiler.compileSQL(DB2JDBCSQLCompiler.java:205)

It sounds like the SQLJ connection is opening the database in read-only mode for some reason. When running from WSAD, you're probably using a different SQLJ Compiler because the driver is different than when you're running in WebSphere.

I don't know if the properties for the database connection are defined as read-only in WebSphere but that's a possibility. Review the resource configuration for the connection. Here's some information on where the read-only property for the connection can be set (below). With WebSphere, the admin console exposes pre-defined resources like database connections. They can also be created dynamically in your code and, therefore, not defined in WebSphere.

Properties for the DB2 Universal JDBC Driver

Properties define how the connection to a particular data source should be made. Unless otherwise noted, properties can be set for a DataSource object or for a Connection object. Properties can be set in one of the following ways:

  • Using setXXX methods
  • Properties are applicable to the following DB2-specific implementations that inherit from com.ibm.db2.jcc.DB2BaseDataSource:

  • com.ibm.db2.jcc.DB2SimpleDataSource
  • com.ibm.db2.jcc.DB2DataSource
  • com.ibm.db2.jcc.DB2ConnectionPoolDataSource
  • com.ibm.db2.jcc.DB2XADataSource
  • See Summary of DB2 Universal JDBC Driver extensions to JDBC for a summary of the property names and data types.

  • In a java.util.Properties value in the info parameter of a DriverManager.getConnection call, as shown in Connecting to a data source using the DriverManager interface with the DB2 Universal JDBC Driver.
  • In a java.lang.String value in the url parameter of a DriverManager.getConnection call, as shown in Connecting to a data source using the DriverManager interface with the DB2 Universal JDBC Driver.

  • This was last published in July 2004

    Dig Deeper on Web Development

    Have a question for an expert?

    Please add a title for your question

    Get answers from a TechTarget expert on whatever's puzzling you.

    You will be able to add details on the next page.

    Start the conversation

    Send me notifications when other members comment.

    Please create a username to comment.

    -ADS BY GOOGLE

    SearchDataCenter

    Close