Topic
2 replies Latest Post - ‏2011-10-06T16:30:23Z by logzyy
logzyy
logzyy
6 Posts
ACCEPTED ANSWER

Pinned topic WLTC0017E:Resources rolled back due to setRollbackOnly() being called error

‏2011-10-06T09:46:35Z |
Hi all,

Dear users(great) of this forum, I am having issue with a restful web service deployed on websphere 7. Each time i try to access a url i get this error message. "WLTC0017E: Resources rolled back due to setRollbackOnly() being called".

I am suspecting my indirect lookups as the cause of the problem. I have my look up code like this

try {
this.em = (EntityManager) new InitialContext().lookup("java:comp/env/persistence/BACPOnlineAPPPU);
this.utx = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
} catch (NamingException ex) {
throw new RuntimeException(ex);

}

Apart from this i have created my datasource and tested successfully with websphere. What is the evil i am doing wrong?

Here is my stack trace
10/6/11 10:21:26:888 WAT 0000001d LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
10/6/11 10:21:26:888 WAT 0000001d webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: Servlet Error-ServletAdaptor: java.lang.RuntimeException: javax.transaction.RollbackException
at com.tavia.service.PersistenceService.commitTx(PersistenceService.java:83)
at com.tavia.service.GltmMisCodesResource.get(GltmMisCodesResource.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:149)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:259)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:990)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:941)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:932)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:384)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:451)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:632)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by: javax.transaction.RollbackException
at com.ibm.tx.jta.TransactionImpl.stage3CommitProcessing(TransactionImpl.java:1224)
at com.ibm.tx.jta.TransactionImpl.processCommit(TransactionImpl.java:998)
at com.ibm.tx.jta.TransactionImpl.commit(TransactionImpl.java:919)
at com.ibm.ws.tx.jta.TranManagerImpl.commit(TranManagerImpl.java:436)
at com.ibm.tx.jta.TranManagerSet.commit(TranManagerSet.java:161)
at com.ibm.ws.tx.jta.UserTransactionImpl.commit(UserTransactionImpl.java:293)
at com.tavia.service.PersistenceService.commitTx(PersistenceService.java:81)
... 41 more

Thanks
Updated on 2011-10-06T16:30:23Z at 2011-10-06T16:30:23Z by logzyy
  • sutter
    sutter
    94 Posts
    ACCEPTED ANSWER

    Re: WLTC0017E:Resources rolled back due to setRollbackOnly() being called error

    ‏2011-10-06T14:02:57Z  in response to logzyy
    Hi,
    There are several areas to look at for a problem like this. For the most part, the WLTC0017E message is just informational. It's telling you that resource activity was rolled back because somebody called setRollbackOnly. You need to determine what processing caused the rollback processing. The log snippet you provided does not relay that information. I would guess there are other entries in your log that can help pinpoint the cause of the rollback.

    Since there are so many different aspects of this scenario and problem that still need to be discovered, have you considered opening a WebSphere PMR to help drive the problem resolution? The people in the support queues have a wealth of information to help decipher problems like this.

    Good luck,
    Kevin Sutter, JPA Architect, IBM WebSphere
    • logzyy
      logzyy
      6 Posts
      ACCEPTED ANSWER

      Re: WLTC0017E:Resources rolled back due to setRollbackOnly() being called error

      ‏2011-10-06T16:30:23Z  in response to sutter
      Ok Thanks. I'd give it a try