JDBC closing connection error.. !!!

Hi
I am using the SelectJdbc Adapter services.When iam executing the main service it is throwing the below exception

com.wm.pkg.art.error.DetailedServiceException: [ART.117.4018] Adapter Runtime (Adapter Service): Error while closing transactions at service completion Error:[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.. 
[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. 
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:125) 
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:116) 
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:103) 
at com.wm.pkg.art.transaction.ServiceListener.serviceSucceeded(ConnectionState.java:460) 
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:198) 
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:39) 
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:407) 
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:195) 
at com.wm.app.b2b.server.dispatcher.trigger.DefaultTriggerTaskHelper.process(DefaultTriggerTaskHelper.java:206) 
at com.wm.app.b2b.server.dispatcher.trigger.TriggerTask.run(TriggerTask.java:228) 
at com.wm.util.pool.Pooled 
 

Connection details are

Enable Connection PoolingtrueMinimum Pool Size1Maximum Pool Size10Pool Increment Size1Block Timeout (msec)1000Expire Timeout (msec)1000Startup Retry Count0Startup Backoff Timeout (sec)10

Please help me out

Thanks and Regards
Rocky

Couple of things, first set your Minimum Pool size to 0, because minimum pool size 1 can end up in stale connection incase of database outage(restart) scenario. Have you checked if your adapter connection is running fine i.e. there isn’t a stale connection already ? Try performing any other transaction using the same adapter(but different adapter service) and see if it works.

You probably ought to increase the block and expire timeout values too. One second is too short.

Thanks Talha…
I tried setting the minimum pool size to 0, but the problem still persists.
Yes the adapter connection is working fine.

Reamon,
I would increase the block and expire timeout values and let you know.

Thanks for your help !

Tell me something, as you mention:

try running the adapter service by itself and see if you get the error ? At least this way we would know if there is something wrong with the adapter service or main calling service.

Hi Talha…

We have created a test case scenarios (say around 20 test cases). when i run the test cases serially (executing the main service serially 20 times with different test data) then i get the adapter connection closed error.
When i run the test cases parallely (executing the main service parallely 20 times with different test data) then I dont get the closed connection error.

My question is, doesnt wM close the adapter connection automatically when the service is executed ?? If no, then do we have a explicit service to close the adapter connection.
If yes, why do we get this error when the same thread is used and not when multiple threads are used ?

Thanks
Rocky

"My question is, doesnt wM close the adapter connection automatically when the service is executed ?? "

No. In a pool, connections are closed after they have been idle for the “Expire timeout” period of time.

“…then do we have a explicit service to close the adapter connection.”

No. You never need to explicitly close connections when using adapter services.

It’s hard to say what may be happening for sure but you’ll want to tweak your connection parameters (pool size, block and expire timeouts) until things work as expected. You might also enlist the help of a DB programmer to see what the DB is doing when the connection is reported closed. That may help identify what’s going on.

Rocky,

Our of curiosity: what database are you connecting to (vendor and version) and what JDBC driver are you using? This seems to be an unusual error so I’m wondering if you could be using the adapter with an unsupported database or driver.

  • Percio

Hmm. The exception stack seems odd. I would expect to see your service listed somewhere in there. And the “trigger” entries are unexpected. Do you have active notifications? Are the exceptions being thrown from there and not your service?

rocky_tocky,

I was just testing something unrelated and I ran across the error that you’re seeing. The error was caused because I purposely put two separate JDBC adapter calls in my flow service, with one adapter service pointing at one LOCAL_TRANSACTION connection and the other adapter service pointing at another LOCAL_TRANSACTION connection, with no explicit transactions defined. As we know from the JDBC User’s Guide, this isn’t allowed because…

[FONT=PalatinoLinotype-Roman][SIZE=2]

[/size][/font]Therefore, look at all the adapter services that are involved in your process. If more than one LOCAL_TRANSACTION connection is involved, this would explain why you’re seeing this error.

Hope this helps,
Percio

Thanks Percio

It solved my problem.

Thanks once again
Rocky

I’m running into the same issue. I have several NO TRANS adapters (WmART) calls and recently, we’ve added a WMDB connection in the mix. I believe this is the cause because the WMDB connection is explicit (within the code) and the other transactions are implicit (or that is how I view the NO TRANS).

Any ideas with this setup?

Here is the error I’m getting:

[ART.117.4018] Adapter Runtime (Adapter Service): Error while closing transactions at service completion Error:[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… [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.

I thought about change all my adapters to use LOCAL TRANS and then setting up EXPLICIT transactions but that is a large undertaking with this set of services.

Thoughts??

Hi Nigel,

I do not know if there is any other work around other than changing all your adapters to use the LOCAL TRANSACTION.
However you can create a simple flow service and use the following services to automate the change to LOCAL TRANSACTION

Use pub.art:listRegisteredAdapters – > to get the adapter Connection type
Use pub.art.service:listAdapterServices – > This service lists all your adapter services.
Then using loop,

Use pub.art.service:setAdapterServiceNodeConnection – > this changes the adapter connection to your newly created LOCAL TRANS adapter connection.

Thanks
Rocky

Hi,
I am using the Select Oracle Apps Adapter and Update JDBC Adapter services in the same flow service.When i am executing the same flow service it is throwing the below exception: But, data interfacing and STG table updates are happening successfully.
Code:
Message: [ART.117.4018] Adapter Runtime (Adapter Service): Error while closing transactions at service completion Error:[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…
[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.
Error Details: com.wm.pkg.art.error.DetailedServiceException: [ART.117.4018] Adapter Runtime (Adapter Service): Error while closing transactions at service completion Error:[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…
[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.
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:125)
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:116)
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:103)
at com.wm.pkg.art.transaction.ServiceListener.serviceSucceeded(ConnectionState.java:740)
,Etc

Can anyone help out on the same? to avoid this error.

I am not doing commit/Rollback and using the LOCAL Transaction.

Thanks,
Narayana

Thank you very much Percio I made similar mistake because of using two connections after reading your comment I able to fix it.
Thanks, JSree

try using No_Transaction…

-_Shaik