PMGR6022E error occurs when inserting data to tables with foreign key relationship
 Technote (troubleshooting)
 
Problem(Abstract)
If a container-managed persistence (CMP) entity bean is used to insert data into database tables that have a foreign key relationship in WebSphere Application Server V5.0, a PMGR6022E error, caused by a SQLException that indicates a failure to update the foreign key, may occur. The exact SQLException will be different depending on the database and JDBC driver that you're using. The example here is for the DB2 Universal JDBC driver:

com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@1ff10076
at com.ibm.ws.ejbpersistence.dataaccess.DataAccessRequestImpl.execute(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.PMBeanDUManager.flushUnBatch(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.PMBeanDUManager.flush(Unknown Source)
...
Caused by: java.sql.SQLException: THE INSERT OR UPDATE VALUE OF FOREIGN KEY ID$INT$2 IS INVALIDDSRA0010E: SQL State = 23503, Error Code = -530
at com.ibm.db2.jcc.b.zc.d(zc.java:1351)
at com.ibm.db2.jcc.a.db.l(db.java:366)...
 
Cause
The problem occurs because the EJB container's persistence manager submits multiple insert statements together as a batch. This can cause the child table in the foreign key relationship to be updated before the parent table. This occurs because the following JVM argument is set for the application server:
-Dcom.ibm.ws.pm.batch=true
 
Resolving the problem
The solution is to remove the JVM argument. To do this:
  • Open the administrative console.
  • Expand Servers.
  • Select Application Servers.
  • Select the server you want to configure.
  • In the Additional Properties area, select Process Definition.
  • In the Additional Properties area, select Java Virtual Machine.
  • Remove -Dcom.ibm.ws.pm.batch=true from the Generic JVM arguments field.
  • Click OK.
  • Save the changes to your configuration and restart the application server.

After making this change, the problem will no longer occur.
 
 
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 > EJB Container
Operating system(s): Windows
Software version: 5.1.1.6
Software edition:
Reference #: 1215887
IBM Group: Software Group
Modified date: Aug 31, 2005