geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Łukasz Budnik" <lukasz.bud...@gmail.com>
Subject SLSB transactions: First invocation throws exception, successive calls don't
Date Sat, 29 Mar 2008 09:47:24 GMT
Hi All!

I have a very simple EntityFacade SLSB. It basically provide
EntityManager methods plus some additional useful operations,
and logging.

I have a method EntityFacade.executeNamedQueryAsList() which works
fine except one case - in whole system I have one backing bean which
behaves quite weird.

During invocation of EntityFacade.executeNamedQueryAsList() I have a
transaction exception. The exception occurs only during the very first
call to the SLSB! When for example I reload page, my backing bean
invokes SLSB and retrieves
the results without any exception.

Note, that EntityFacade.executeNamedQueryAsList() does not
insert/update/delete records, it simply fetches some data from DB.

This is the stack trace:


08:35:48,203 ERROR [Transaction] Unexpected exception rolling back
org.apache.geronimo.connector.outbound.LocalXAResource@11
4d1d; continuing with rollback
javax.transaction.xa.XAException
        at org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:88)
        at org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:581)
        at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:475)
        at org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:258)
        at org.apache.openejb.core.transaction.TransactionPolicy.rollbackTransaction(TransactionPolicy.java:181)
        at org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:77)
        at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
        at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
        at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
        at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
        at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
        at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
        at org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
        at $Proxy62.executeNamedQueryAsList(Unknown Source)
        at org.xh.nuntius.web.controllers.docs.FaqController.init(FaqController.java:24)
        at org.xh.utils.web.lifecycle.phaselisteners.ControllersInitializerPhaseListener.afterPhase(ControllersInitializerPh
seListener.java:28)
        at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:92)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:107)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:148)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.xh.nuntius.web.filters.SecurityAbuseDetectorFilter.doFilter(SecurityAbuseDetectorFilter.java:26)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.xh.nuntius.web.filters.CharsetFilter.doFilter(CharsetFilter.java:45)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:51)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
        at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:396)
        at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.resource.spi.LocalTransactionException: Unable to rollback
        at org.tranql.connector.jdbc.ManagedXAConnection.localTransactionRollback(ManagedXAConnection.java:123)
        at org.tranql.connector.AbstractManagedConnection$LocalTransactionImpl.rollback(AbstractManagedConnection.java:197)
        at org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:86)
        ... 45 more
Caused by: com.ibm.db2.jcc.c.SqlException:
[ibm][db2][jcc][10114][10307] Niepoprawna operacja: jawne wywołanie
instrukcji CO
MIT lub ROLLBACK nie jest dozwolone w trybie zatwierdzania
automatycznego (auto-commit).


^^^^^ in English it says something like this:

incorrect operation: explicit COMMIT or ROLLBACK is not allowed in
auto-commit mode

        at com.ibm.db2.jcc.c.p.rollback(p.java:752)
        at com.ibm.db2.jcc.c.gc.rollback(gc.java:162)
        at org.tranql.connector.jdbc.ManagedXAConnection.localTransactionRollback(ManagedXAConnection.java:121)
        ... 47 more
08:35:48,453 ERROR [OpenEJB] The TransactionManager reported an
exception while attempting to rollback the transaction: null
08:35:48,453 ERROR [PhaseListenerManager] Exception in PhaseListener
RESTORE_VIEW(1) afterPhase

any idea what might be wrong?

best regards
Łukasz
Mime
View raw message