1 Reply Latest reply: Mar 16, 2012 8:18 AM by Patrick Taylor RSS

    Business service failed to insert the data in DB2

    924244
      Hi I have developed a business service through OSB and deployed in to SOB in my local. The business service is trying to insert data in to DB2 table where the primary key column is auto generated in DB2.
      When i am testing the business service, in the XML i have removed that tag out of it and tried the execute the service and I end up with the following error. Please let me know where I am going wrong in this.

      <Mar 15, 2012 1:35:19 PM CDT> <Error> <JCA_FRAMEWORK_AND_ADAPTER> <BEA-000000> <servicebus:/WSDL/IIRSearch/adapter/IIRA
      apterServices/AuditInputDataService [ AuditInputDataService_ptt::insert(SearchAuditIirCollection) ] - Could not invoke
      peration 'insert' due to:

      BINDING.JCA-11616
      DBWriteInteractionSpec Execute Failed Exception.
      insert failed. Descriptor name: [AuditInputDataService.SearchAuditIir].
      Caused by java.sql.BatchUpdateException: [IBM][CLI Driver][DB2/LINUXX8664] SQL0798N A value cannot be specified for co
      umn "SEARCH_ID" which is defined as GENERATED ALWAYS. SQLSTATE=428C9
      .
      Please see the logs for the full DBAdapter logging output prior to this exception. ConnectionFactory property platform
      lassName was set to org.eclipse.persistence.platform.database.oracle.Oracle10Platform but the database you are connecti
      g to is DB2/LINUXX8664. Please validate your platformClassName setting. This mismatch can cause the adapter to trigge
      runtime exceptions or execute SQL that is invalid for the database you are connected to. This exception is considered
      not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCo
      es with value "--798" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these
      omposite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties ar
      integers.

      at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:68
      )
      at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:648)
      at oracle.tip.adapter.db.exceptions.DBResourceException.outboundWriteException(DBResourceException.java:696)
      at oracle.tip.adapter.db.transaction.DBTransaction.commit(DBTransaction.java:236)
      at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:544)
      at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeOperation(WSIFOperation_JCA.java:353)
      at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.j
      va:312)
      at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:29
      )
      at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.invokeWsifProvider(JCABindingReferenceImpl.java:345)
      at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.post(JCABindingReferenceImpl.java:195)
      at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invokeOneWay(JCATransp
      rtOutboundOperationBindingServiceImpl.java:109)
      at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendOneWay(JCATransportEndpoint.java:191)
      at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:168)
      at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:598)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
      at $Proxy128.sendMessageAsync(Unknown Source)
      at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
      at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.
      ava:603)
      at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:
      38)
      at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:558)
      at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:426)
      at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:380)
      at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:79)
      at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:137)
      at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:135)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
      at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
      at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:140)
      at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
      at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
      at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
      at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.__WL_invoke(Unknown Source)
      at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
      at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(Unknown Source)
      at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
      at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
      at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
      at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
      at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
      at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
        • 1. Re: Business service failed to insert the data in DB2
          Patrick Taylor
          I am assuming that the primary key that you were referring to is the SEARCH_ID.
          Caused by java.sql.BatchUpdateException: [IBM][CLI Driver][DB2/LINUXX8664] SQL0798N A value cannot be specified for column "SEARCH_ID" which is defined as GENERATED ALWAYS. SQLSTATE=428C9
          Looks like when you generated the JCA DBAdapter WSDL, all the columns were selected. And hence the insert queries that were generated to be used by the JCA DBAdapter have this field.
          Can you reconfigure the DBAdapter with a custom query to insert in to the table, without the primary key column selected. This should resolve your issue.

          If this still does not solve your issue. Lets start to debug further by capturing the exact SQL query being executed.
          Enable the debug mode for the JCA framework. Edit the alsbdebug.xml file in the domain directory and set the category alsb-jca-framework-adapter-debug flag to true. Then restart the servers.

          Refer - http://download.oracle.com/docs/html/E15867_01/app_debugging.htm for more details.

          Hope this helps.

          Thanks,
          Patrick