Topic
  • 5 replies
  • Latest Post - ‏2013-04-05T11:34:12Z by SystemAdmin
SystemAdmin
SystemAdmin
938 Posts

Pinned topic SQL error -530 on new extension

‏2010-10-04T13:17:41Z |
Hi

i'm getting an SQL error 530, on a new developed extension. 530 is referential integrity error.

Here is the servers stack trace: (request attached)

10-10-04 10:40:49:332 CEST 00000012 SystemOut O ERROR - 92000013 INSERR 92000009 Insert of the following failed: NTPProductRel.
com.ibm.pdq.runtime.exception.DataRuntimeException: SQLException DB2 SQL Error: SQLCODE=-530, SQLSTATE=23503, SQLERRMC=DB2ADMIN.NTPPRODUCTREL.SQL100928104452270, DRIVER=3.50.152 Localized Message: "DB2 SQL Error: SQLCODE=-530, SQLSTATE=23503, SQLERRMC=DB2ADMIN.NTPPRODUCTREL.SQL100928104452270, DRIVER=3.50.152" ErrorCode: -530 SQLState: 23503
at com.ibm.pdq.runtime.internal.db.JdbcData.update_(JdbcData.java:307) at com.ibm.pdq.runtime.internal.db.DataImpl.update(DataImpl.java:378) at com.ibm.pdq.runtime.generator.BaseData.update(BaseData.java:158) at com.nordea.ntp.mdm.extensions.productrel.entityObject.EObjNTPProductRelExtDataImpl.createEObjNTPProductRelExt(EObjNTPProductRelExtDataImpl.java:93) at com.nordea.ntp.mdm.extensions.productrel.component.NTPProductRelBObjExt.addRecord(NTPProductRelBObjExt.java:722) at com.dwl.base.DWLCommonComponent.doFinalSteps(DWLCommonComponent.java:1843) at com.dwl.base.DWLCommonComponent.executeTx(DWLCommonComponent.java:1744) at com.ibm.mdm.product.component.ProductComponent.addProductInstanceRelationship(ProductComponent.java:823) at com.ibm.mdm.product.component.ProductComponent.processAddProductChildren(ProductComponent.java:5207) at com.ibm.mdm.product.component.ProductComponent.handleAddProductInstance(ProductComponent.java:270) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at com.dwl.base.DWLCommonComponent.processTransactionObject(DWLCommonComponent.java:2269) at com.dwl.base.DWLCommonComponent.executeTargetMethod(DWLCommonComponent.java:1997) at com.dwl.base.DWLCommonComponent.executeTx(DWLCommonComponent.java:1732) at com.ibm.mdm.product.component.ProductComponent.addProductInstance(ProductComponent.java:228) at com.ibm.mdm.product.controller.ProductTxnBean.handleAddProductInstance(ProductTxnBean.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at com.dwl.base.DWLCommonComponent.processTransactionObject(DWLCommonComponent.java:2264) at com.dwl.base.DWLCommonComponent.executeTargetMethod(DWLCommonComponent.java:1997) at com.dwl.base.DWLCommonComponent.executeTx(DWLCommonComponent.java:1732) at com.ibm.mdm.product.controller.ProductTxnBean.addProductInstance(ProductTxnBean.java:133) at com.ibm.mdm.product.controller.EJSLocalStatelessProductTxn_0188ab97.addProductInstance(EJSLocalStatelessProductTxn_0188ab97.java:219) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at com.dwl.base.requestHandler.DWLTxnBP.processPersistentObject(DWLTxnBP.java:348) at com.dwl.base.requestHandler.DWLTxnBP.execute(DWLTxnBP.java:120) at com.dwl.base.requestHandler.DWLTxnProcessor.processTx(DWLTxnProcessor.java:118) at com.dwl.unifi.tx.manager.CTxRxFacade.processTxNormal(CTxRxFacade.java:771) at com.dwl.unifi.tx.manager.CTxRxFacade.processTx(CTxRxFacade.java:579) at com.dwl.base.requestHandler.DWLRequestHandler.processTransaction(DWLRequestHandler.java:838) at com.dwl.base.requestHandler.DWLRequestHandler.processTx(DWLRequestHandler.java:465) at com.dwl.base.requestHandler.DWLServiceControllerBase.processRequest(DWLServiceControllerBase.java:219) at com.dwl.base.requestHandler.beans.DWLServiceControllerBean.processRequest(DWLServiceControllerBean.java:136) at com.dwl.base.requestHandler.beans.EJSRemoteStatelessDWLServiceController_2ecdcec0.processRequest(EJSRemoteStatelessDWLServiceController_2ecdcec0.java:29) at com.dwl.base.requestHandler.beans._EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.processRequest(_EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.java:166) at com.dwl.base.requestHandler.beans._EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie._invoke(_EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.java:106) at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613) at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466) at com.ibm.rmi.iiop.ORB.process(ORB.java:503) at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552) at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673) at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551) at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62) at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
10-10-04 10:40:49:317 CEST 00000012 SystemErr R com.dwl.tcrm.exception.TCRMReadException:
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.nordea.ntp.mdm.extensions.productrel.component.NTPProductRelBObjExt.addRecord(NTPProductRelBObjExt.java:734)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.DWLCommonComponent.doFinalSteps(DWLCommonComponent.java:1843)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.DWLCommonComponent.executeTx(DWLCommonComponent.java:1744)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.mdm.product.component.ProductComponent.addProductInstanceRelationship(ProductComponent.java:823)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.mdm.product.component.ProductComponent.processAddProductChildren(ProductComponent.java:5207)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.mdm.product.component.ProductComponent.handleAddProductInstance(ProductComponent.java:270)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at java.lang.reflect.Method.invoke(Method.java:615)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.DWLCommonComponent.processTransactionObject(DWLCommonComponent.java:2269)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.DWLCommonComponent.executeTargetMethod(DWLCommonComponent.java:1997)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.DWLCommonComponent.executeTx(DWLCommonComponent.java:1732)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.mdm.product.component.ProductComponent.addProductInstance(ProductComponent.java:228)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.mdm.product.controller.ProductTxnBean.handleAddProductInstance(ProductTxnBean.java:156)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at java.lang.reflect.Method.invoke(Method.java:615)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.DWLCommonComponent.processTransactionObject(DWLCommonComponent.java:2264)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.DWLCommonComponent.executeTargetMethod(DWLCommonComponent.java:1997)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.DWLCommonComponent.executeTx(DWLCommonComponent.java:1732)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.mdm.product.controller.ProductTxnBean.addProductInstance(ProductTxnBean.java:133)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.mdm.product.controller.EJSLocalStatelessProductTxn_0188ab97.addProductInstance(EJSLocalStatelessProductTxn_0188ab97.java:219)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at java.lang.reflect.Method.invoke(Method.java:615)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.requestHandler.DWLTxnBP.processPersistentObject(DWLTxnBP.java:348)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.requestHandler.DWLTxnBP.execute(DWLTxnBP.java:120)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.requestHandler.DWLTxnProcessor.processTx(DWLTxnProcessor.java:118)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.unifi.tx.manager.CTxRxFacade.processTxNormal(CTxRxFacade.java:771)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.unifi.tx.manager.CTxRxFacade.processTx(CTxRxFacade.java:579)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.requestHandler.DWLRequestHandler.processTransaction(DWLRequestHandler.java:838)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.requestHandler.DWLRequestHandler.processTx(DWLRequestHandler.java:465)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.requestHandler.DWLServiceControllerBase.processRequest(DWLServiceControllerBase.java:219)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.requestHandler.beans.DWLServiceControllerBean.processRequest(DWLServiceControllerBean.java:136)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.requestHandler.beans.EJSRemoteStatelessDWLServiceController_2ecdcec0.processRequest(EJSRemoteStatelessDWLServiceController_2ecdcec0.java:29)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.requestHandler.beans._EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.processRequest(_EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.java:166)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.dwl.base.requestHandler.beans._EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie._invoke(_EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.java:106)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
10-10-04 10:40:49:332 CEST 00000012 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
Updated on 2013-04-05T11:34:12Z at 2013-04-05T11:34:12Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: SQL error -530 on new extension

    ‏2010-10-04T15:05:20Z  
    Hi,

    I would suggest that you set a breakpoint in NTPProductRelBObjExt.addRecord and check which field in the record is causing the problem.

    Data extensions - if stored in their own table - have a foreign key to the base entity. It's likely this is the column that has the problem but you may have other foreign keys.

    There was a bug in the code generation pattern for data extensions, which only affects some base entities, where the primary key of the base entity does not get passed on correctly. Check the primary key value being set on the extension EObj.

    Hope that helps, Catherine.
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: SQL error -530 on new extension

    ‏2010-10-04T20:46:11Z  
    Hi,

    I would suggest that you set a breakpoint in NTPProductRelBObjExt.addRecord and check which field in the record is causing the problem.

    Data extensions - if stored in their own table - have a foreign key to the base entity. It's likely this is the column that has the problem but you may have other foreign keys.

    There was a bug in the code generation pattern for data extensions, which only affects some base entities, where the primary key of the base entity does not get passed on correctly. Check the primary key value being set on the extension EObj.

    Hope that helps, Catherine.
    Hi Catherine.

    Thanks for your answer. And yes, while debugging i can see that the primary key of the base entity does not get passed on. The foregin key is null when calling the update method. Is there a workaround for this bug ??

    \Brian
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: SQL error -530 on new extension

    ‏2010-10-05T10:17:39Z  
    Hi Catherine.

    Thanks for your answer. And yes, while debugging i can see that the primary key of the base entity does not get passed on. The foregin key is null when calling the update method. Is there a workaround for this bug ??

    \Brian
    Hi,

    You need to modify the generated code in the BObjExt class: search for calls to getIdPk() on the base EObj, change to getPrimaryKey() instead.

    Remember to mark modified methods with @generated NOT

    I think that should do it...

    Catherine.
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: SQL error -530 on new extension

    ‏2010-10-05T10:56:12Z  
    Hi,

    You need to modify the generated code in the BObjExt class: search for calls to getIdPk() on the base EObj, change to getPrimaryKey() instead.

    Remember to mark modified methods with @generated NOT

    I think that should do it...

    Catherine.
    Hi Catherine

    Thanks, it worked.

    \Brian
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: SQL error -530 on new extension

    ‏2013-04-05T11:34:12Z  
    Hi,

    You need to modify the generated code in the BObjExt class: search for calls to getIdPk() on the base EObj, change to getPrimaryKey() instead.

    Remember to mark modified methods with @generated NOT

    I think that should do it...

    Catherine.
    Hi Catherine,
    We are getting following error while executing getContract inside businessProxy. This is happening while other thread also trying to read. Can you help us resolve this.

    com.dwl.tcrm.exception.TCRMReadException: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-913, SQLSTATE=57033, SQLERRMC=00C90088;00000302;MDMZCNTR.TS000148.X'00002C', DRIVER=3.63.75