JDBC Adapter Error: Error closing connection

Hi
I have a JDBC adapter. I have an insertSQL service using the adapter.
If I run it separately it works.

I am using LOCAL_TRANSACTION type.

When I call the adapter service from a process model step (Modeler) it throws the following error. The insert is also not successful:

BasicData:errorResourceBundleName=com.wm.pkg.art.i18n.resources.AdapterRuntimeResourceBundle,errorMessageArgs=[0][ART.117.4015] Adapter Runtime (Adapter Service): Error(s) occurred while closing adapter connections. [ART.117.4015] Adapter Runtime (Adapter Service): Error(s) occurred while closing adapter connections.,errorCode=117.4018,pipeline=null,exceptionDetail=>>>BasicData:message=null,date=Mon Oct 27 17:13:49 EDT 2008,reason=[ART.117.4015] Adapter Runtime (Adapter Service): Error(s) occurred while closing adapter connections.,exceptionClass=com.wm.pkg.art.error.MultiReasonException,stack=com.wm.pkg.art.error.MultiReasonException: [ART.117.4015] Adapter Runtime (Adapter Service): Error(s) occurred while closing adapter connections. at com.wm.pkg.art.transaction.ConnectionState.closeAllConnections(ConnectionState.java:361) at com.wm.pkg.art.transaction.ServiceListener.commit(ConnectionState.java:629) at com.wm.pkg.art.transaction.ServiceListener.serviceSucceeded(ConnectionState.java:437) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.serviceCompleted(ServiceCompletionImpl.java:167) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:252) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:199) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:39) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:408) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:503) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:325) at com.wm.app.b2b.server.dispatcher.trigger.Trigger.invokeService(Trigger.java:291) at com.wm.app.b2b.server.dispatcher.trigger.Trigger.processMessage(Trigger.java:215) at com.wm.app.b2b.server.dispatcher.trigger.DefaultTriggerTaskHelper.process(DefaultTriggerTaskHelper.java:206) at com.wm.app.b2b.server.dispatch ebzwisd1.eadv.na.jnj.com:5566 2008-10-27 17:13:49.509 EDT


Any help is appreciated.
Thanks
Sathish.

We ran into this once before, but we just switched the adapter to No Transaction (since we didn’t mind the implicit commit after every insert) and it resolved the problem.

If you are on 6.x (implied since you said modeler), I seem to recall there was a fix released for this problem. You might want to search Advantage for “closing transactions”.

Thanks for the reply. I will try to use “NO_TRANSACTION”.
But is there any way to make it work with “LOCAL_TRANSACTION”??

Avoid using more than one local transaction with explicit transaction in a flow service. Always a single transaction context can contain any number of XA_TRANSACTION connections but not more than one LOCAL_TRANSACTION connection.

Hi all,

i am using a JDBC Adapter with Transaction Type XA_TRANSACTION to do a select dynamic query.
The jdbs adapter service ends without errors but its wrapper flow ends with the following error.
Can you please help me to find a solution for this problem ?

Best Regards,
Fiorald

com.ibm.db2.jcc.b.ym: [jcc][t4][10401][12066][3.50.152] Eccezione XA: XAER_RMFAIL : [jcc][t4][10335][11391][3.50.152] Operazione non valida: la connessione è stata terminata. ERRORCODE=-4470, SQLSTATE=08003 ERRORCODE=-4228, SQLSTATE=null at com.ibm.db2.jcc.b.wc.c(wc.java:402) at com.ibm.db2.jcc.t4.ac.a(ac.java:1680) at com.ibm.db2.jcc.t4.ac.a(ac.java:1567) at com.ibm.db2.jcc.t4.ac.e(ac.java:2512) at com.ibm.db2.jcc.t4.ac.rollback(ac.java:1015) at com.wm.app.b2b.server.jca.transactions.TranBase.rollbackResources(TranBase.java:628) at com.wm.app.b2b.server.jca.transactions.Tran.commit(Tran.java:306) at com.wm.app.b2b.server.jca.transactions.Tran.delistResource(Tran.java:559) at com.wm.app.b2b.server.jca.transactions.TransactionImpl.delistResource(TransactionImpl.java:85) at com.wm.app.b2b.server.jca.WmXAConnectionEventListener.connectionClosed(WmXAConnectionEventListener.java:57) at com.wm.adk.connection.WmManagedConnection.fireConnectionEvent(WmManagedConnection.java:416) at com.wm.adk.connection.WmManagedConnection.processConnectionHandleCloseEvent(WmManagedConnection.java:231) at com.wm.adk.cci.connection.WmConnection.close(WmConnection.java:179) at com.wm.pkg.art.transaction.ConnectionState.closeAllConnections(ConnectionState.java:436) at com.wm.pkg.art.transaction.ServiceListener.commit(ConnectionState.java:886) at com.wm.pkg.art.transaction.ServiceListener.serviceSucceeded(ConnectionState.java:723) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.serviceCompleted(ServiceCompletionImpl.java:178) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:266) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51) at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:276) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:363) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:547) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386) at com.wm.app.b2b.server.HTTPInvokeHandler._process(HTTPInvokeHandler.java:255) at com.wm.app.b2b.server.InvokeHandler.process(InvokeHandler.java:110) at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:186) at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:366) at com.wm.util.pool.PooledThread.run(PooledThread.java:131) at java.lang.Thread.run(Thread.java:662) Caused by: com.ibm.db2.jcc.b.qm: [jcc][t4][10335][11391][3.50.152] Operazione non valida: la connessione è stata terminata. ERRORCODE=-4470, SQLSTATE=08003 at com.ibm.db2.jcc.b.wc.a(wc.java:566) at com.ibm.db2.jcc.b.wc.a(wc.java:57) at com.ibm.db2.jcc.b.wc.a(wc.java:119) at com.ibm.db2.jcc.t4.ac.e(ac.java:2509) … 27 more com.wm.util.BasisException: [9144] runtime exception occured. see error log for details. com.ibm.db2.jcc.b.ym: [jcc][t4][10401][12066][3.50.152] Eccezione XA: XAER_RMFAIL : [jcc][t4][10335][11391][3.50.152] Operazione non valida: la connessione è stata terminata. ERRORCODE=-4470, SQLSTATE=08003 ERRORCODE=-4228, SQLSTATE=null at com.wm.util.BasisRuntimeException.(BasisRuntimeException.java:185) at com.wm.app.b2b.server.ISRuntimeException.(ISRuntimeException.java:237) at com.wm.app.b2b.server.jca.transactions.Tran.commit(Tran.java:323) at com.wm.app.b2b.server.jca.transactions.Tran.delistResource(Tran.java:559) at com.wm.app.b2b.server.jca.transactions.TransactionImpl.delistResource(TransactionImpl.java:85) at com.wm.app.b2b.server.jca.WmXAConnectionEventListener.connectionClosed(WmXAConnectionEventListener.java:57) at com.wm.adk.connection.WmManagedConnection.fireConnectionEvent(WmManagedConnection.java:416) at com.wm.adk.connection.WmManagedConnection.processConnectionHandleCloseEvent(WmManagedConnection.java:231) at com.wm.adk.cci.connection.WmConnection.close(WmConnection.java:179) at com.wm.pkg.art.transaction.ConnectionState.closeAllConnections(ConnectionState.java:436) at com.wm.pkg.art.transaction.ServiceListener.commit(ConnectionState.java:886) at com.wm.pkg.art.transaction.ServiceListener.serviceSucceeded(ConnectionState.java:723) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.serviceCompleted(ServiceCompletionImpl.java:178) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:266) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51) at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:276) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:363) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:547) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386) at com.wm.app.b2b.server.HTTPInvokeHandler._process(HTTPInvokeHandler.java:255) at com.wm.app.b2b.server.InvokeHandler.process(InvokeHandler.java:110) at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:186) at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:366) at com.wm.util.pool.PooledThread.run(PooledThread.java:131) at java.lang.Thread.run(Thread.java:662)

Hi,

Can you please elaborate steps what’s in the wrapper/child flow steps logic?

I believe it is failing at Rollback transaction step and may be the transactionName is not being passed properly from the pipeline or some other logic ssue.

HTH,
RMG

Hi rmg,

it is a simple select dynamic query. The logical steps of the parent/child flow are as following:
1-check input parameters
2-call child flow
2.1-build the query
2.2-call JDBC Adapter service
2.3-Map the output
3-Loop the results and build a document to be pubblished to Trading Network
4-Exit from flow.

I changed the child flow as follow:

1-build the query
2-start transaction
3-call JDBC Adapter service
4-commit transaction
5-Map the output

In this way seems it is working and i’m not receiving the error
Best Regards,
Fiorald

Yes your changed logic make sense and you test proved it :smiley:

HTH,
RMG