jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From colte <co...@passagen.se>
Subject JackRabbit with container managed transactions in Jboss 4.0.5
Date Tue, 20 Feb 2007 15:55:06 GMT

I've deployed JackRabbit 1.2.1 with JCA as in

http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss

In a stateless session bean (CMT) I have the following method:

public void testRabbit() throws Exception {

        InitialContext ctx = new InitialContext();
        Repository repository = (Repository) ctx.lookup("java:jcr/local");

        Session session = repository.login();

        String user = session.getUserID();
            
        Node n = session.getRootNode();
        n.addNode("MyFolder");
        session.save();
        session.logout();

}
	
This results in the trace below.
Seems there are some compability issue with jboss transactionhandling...any
hints on this? Am I the only one with this problem?

2007-02-20 16:14:17,712 ERROR [org.apache.jackrabbit.core.XASessionImpl]
Resource not associated with a transaction.
2007-02-20 16:14:17,722 WARN  [org.jboss.tm.TransactionImpl] XAException:
tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=xx/26, BranchQual=,
localId=26] errorCode=XAER_PROTO
javax.transaction.xa.XAException
	at org.apache.jackrabbit.core.XASessionImpl.end(XASessionImpl.java:279)
	at
org.apache.jackrabbit.jca.TransactionBoundXAResource.end(TransactionBoundXAResource.java:46)
	at
org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2143)
	at
org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2118)
	at org.jboss.tm.TransactionImpl.endResources(TransactionImpl.java:1462)
	at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1116)
	at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
	at
org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:501)
	at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:361)
	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
	at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
	at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
	at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
	at org.jboss.ejb.Container.invoke(Container.java:954)
	at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
	at
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
	at $Proxy93.testRabbit(Unknown Source)
	at xxx.ProjectAction.save(ProjectAction.java:164)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
	at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
	at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
	at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)
2007-02-20 16:14:17,742 ERROR [org.jboss.ejb.plugins.LogInterceptor]
TransactionRolledbackLocalException in method: public abstract void
xxx.ProjectManagerLocal.testRabbit() throws java.lang.Exception, causedBy:
org.jboss.tm.JBossRollbackException: Unable to commit,
tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=xx/26, BranchQual=,
localId=26] status=STATUS_NO_TRANSACTION; - nested throwable:
(javax.transaction.xa.XAException)
	at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
	at
org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:501)
	at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:361)
	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
	at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
	at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
	at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
	at org.jboss.ejb.Container.invoke(Container.java:954)
	at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
	at
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
	at $Proxy93.testRabbit(Unknown Source)
	at xxx.ProjectAction.save(ProjectAction.java:164)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
	at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
	at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
	at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)
Caused by: javax.transaction.xa.XAException
	at org.apache.jackrabbit.core.XASessionImpl.end(XASessionImpl.java:279)
	at
org.apache.jackrabbit.jca.TransactionBoundXAResource.end(TransactionBoundXAResource.java:46)
	at
org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2143)
	at
org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2118)
	at org.jboss.tm.TransactionImpl.endResources(TransactionImpl.java:1462)
	at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1116)
	at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
	... 44 more
2007-02-20 16:14:17,912 WARN  [org.apache.struts.action.RequestProcessor]
Unhandled Exception thrown: class
org.jboss.tm.JBossTransactionRolledbackLocalException
2007-02-20 16:14:17,912 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/apps/project].[action]]
Servlet.service() for servlet action threw exception
org.jboss.tm.JBossTransactionRolledbackLocalException: - nested throwable:
(org.jboss.tm.JBossRollbackException: Unable to commit,
tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=xx/26, BranchQual=,
localId=26] status=STATUS_NO_TRANSACTION; - nested throwable:
(javax.transaction.xa.XAException))
	at
org.jboss.ejb.plugins.TxInterceptorCMT.throwJBossException(TxInterceptorCMT.java:565)
	at
org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:506)
	at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:361)
	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
	at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
	at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
	at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
	at org.jboss.ejb.Container.invoke(Container.java:954)
	at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
	at
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
	at $Proxy93.testRabbit(Unknown Source)
	at xxx.ProjectAction.save(ProjectAction.java:164)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
	at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
	at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
	at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.tm.JBossRollbackException: Unable to commit,
tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=xx/26, BranchQual=,
localId=26] status=STATUS_NO_TRANSACTION; - nested throwable:
(javax.transaction.xa.XAException)
	at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
	at
org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:501)
	... 43 more
Caused by: javax.transaction.xa.XAException
	at org.apache.jackrabbit.core.XASessionImpl.end(XASessionImpl.java:279)
	at
org.apache.jackrabbit.jca.TransactionBoundXAResource.end(TransactionBoundXAResource.java:46)
	at
org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2143)
	at
org.jboss.tm.TransactionImpl$Resource.endResource(TransactionImpl.java:2118)
	at org.jboss.tm.TransactionImpl.endResources(TransactionImpl.java:1462)
	at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1116)
	at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
	... 44 more


-- 
View this message in context: http://www.nabble.com/JackRabbit-with-container-managed-transactions-in-Jboss-4.0.5-tf3261383.html#a9064463
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Mime
View raw message