Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes Help with Determining Cause of Error Messages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Help with Determining Cause of Error Messages" Watch "Help with Determining Cause of Error Messages" New topic
Author

Help with Determining Cause of Error Messages

Elle Atechsy
Ranch Hand

Joined: Jan 23, 2004
Posts: 96
Hi All,

I have started to see a new error in our application. In this application, we spawn new threads for each MQ message received, and the steps provided below is what we do on each thread. During my research, I found that this may be a thread safe issue. A brief description of what we do in the class that is generating this error:

1.Begin DB transaction
2.Insert/Update to DB
3.If Successful, Commit DB transaction
4.If Failure, Rollback DB transaction
5.Finally clause, whether an error occurs or not, we call a connection cleanup class that should close the connection. (This is the section which throws the following error regardless of previous DB transaction failure or success)

Have anyone seen this issue before, and if so, please advise what could be causing this.

Thanks,
Lulu
***********************************************************************
[4/14/05 1:12:41:325 CDT] 189856ab
MCWrapper E J2CA0081E: Method cleanup
failed while trying to execute method cleanup
on ManagedConnection
com.ibm.ws.rsadapter.spi.WSRdbManagedConnection
Impl@6fecd6a7 from resource
jdbc/TMTPDataSource. Caught exception:
com.ibm.ws.exception.WsException: DSRA0080E:
An exception was received by the Data Store
Adapter. See original exception message:
Cannot call 'cleanup' on a ManagedConnection
while it is still in a transaction..
Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
If you can provide the stacktrace, then it would be easy to trace the problem.

Anyway following piece of code will work.




Naseem
[ September 07, 2006: Message edited by: Naseem Khan ]

Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Elle Atechsy
Ranch Hand

Joined: Jan 23, 2004
Posts: 96
Yes. I am already doing what you suggested.

Here is the stack trace:

Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
Here is one article on ibm, just go through it and let us know if this works.

http://www-1.ibm.com/support/docview.wss?rs=493&context=SWK90&uid=swg1IY71886

Naseem
Elle Atechsy
Ranch Hand

Joined: Jan 23, 2004
Posts: 96
Unfortunately, I don't have access to the environment. So, I will post back as soon as I can get another group in our company to implement this update.

Thanks!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help with Determining Cause of Error Messages
 
Similar Threads
Connection pool issue
HTTP 500 - Internal server error
The most bizarre java error ever
Transaction time out problem on WAS 5.1.1
the most bizarre java error ever