jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1953) Jackrabbit on JBoss: ItemStateCache seems to be invalid
Date Mon, 09 Feb 2009 12:47:00 GMT

    [ https://issues.apache.org/jira/browse/JCR-1953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671835#action_12671835
] 

Marcel Reutegger commented on JCR-1953:
---------------------------------------

Moritz, can you please check if this is still an issue, now that JCR-1554 is fixed? Thank
you.

> Jackrabbit on JBoss: ItemStateCache seems to be invalid 
> --------------------------------------------------------
>
>                 Key: JCR-1953
>                 URL: https://issues.apache.org/jira/browse/JCR-1953
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jca
>    Affects Versions: 1.5.0
>         Environment: JBoss 4.2.2.GA
>            Reporter: Moritz Rebbert
>         Attachments: item-state-ear-SNAPSHOT.ear, ItemTestBean.java, Main.java
>
>
> I notice problems while removing nodes within EJB methods using the JCA-Adapter.
> I've created a test to reproduce the bug. But it only occueres some times.
> What i try to do is:
>  1. create a node "a"
>  2. add a child "a/b"
>  3. remove node "a"
> Each of this steps runs in a new transaction.
> In my test-case i use container managed transactions but noticed a similay behavior 
> with bean managed transaction.
> The Error occures in the 3. step. The jboss startup logs shows the following Exception[0]
> The jboss log shows  the message :
> 41bcdd97-3589-4095-a32e-aa1f60867744 has been modified externally[1]
> This is the id of node "a".
> I was also able to get the Exception causes the Transaction to fail:[2]
> Also i extracted the modCount of the given ItemState and its overlayItemState of node
a before i try to remove it:                                                             
                                        
> 15:16:33,401 INFO  [STDOUT] state.modCount: 0 state.overlay.getModeCount: 1
> The "solution" i found was to do something like that before every new login:
>   JCASessionHandle handle = (JCASessionHandle)session;                              
                                                                                         
     
>   ItemManager itemManager=((XASessionImpl)handle.getManagedConnection().getSession(handle)).getItemManager();
                                                                    
>   Method m = itemManager.getClass().getDeclaredMethod("dispose");                   
                                                                                         
     
>   m.setAccessible(true);                                                            
                                                                                         
     
>   m.invoke(itemManager);
> So the ItemStates seems to be out of sync or the ItemStateCache unvalid instances.
> [0]
> ERROR: java.lang.RuntimeException: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted]
                                     [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted]
Can't commit because the transaction is in aborted state; nested exception is: java.lang.RuntimeException:
 
> javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted]
[com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] 
> Can't commit because the transaction is in aborted state 
> [1]
> 2009-01-20 15:16:33,464 DEBUG [org.apache.jackrabbit.core.state.SharedItemStateManager]
41bcdd97-3589-4095-a32e-aa1f60867744 has been modified externally 
> [2]
> 16:20:13,463 ERROR [STDERR] javax.transaction.xa.XAException                        
                                                                                         
     
> 16:20:13,464 ERROR [STDERR]     at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:155)
                                                              
> 16:20:13,464 ERROR [STDERR]     at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:337)
                                                                         
> 16:20:13,465 ERROR [STDERR]     at org.apache.jackrabbit.jca.TransactionBoundXAResource.commit(TransactionBoundXAResource.java:39)
                                                 
> 16:20:13,465 ERROR [STDERR]     at org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.commit(JcaXAResourceWrapper.java:53)
                                               
> 16:20:13,465 ERROR [STDERR]     at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:636)
                             
> 16:20:13,465 ERROR [STDERR]     at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2619)
                                                             
> 16:20:13,465 ERROR [STDERR]     at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1779)
                                                                        
> 16:20:13,465 ERROR [STDERR]     at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:88)
                                                          
> 16:20:13,466 ERROR [STDERR]     at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
                                                                                
> 16:20:13,466 ERROR [STDERR]     at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
                           
> 16:20:13,466 ERROR [STDERR]     at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
                                             
> 16:20:13,466 ERROR [STDERR]     at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
                                           
> 16:20:13,466 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
                                                                                 
> 16:20:13,466 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
                                                                                   
> 16:20:13,466 ERROR [STDERR]     at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
                                                                      
> 16:20:13,466 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:13,467 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
                                                          
> 16:20:13,467 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:13,467 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
                                                 
> 16:20:13,467 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:13,468 ERROR [STDERR]     at org.jboss.aspects.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:166)
                                 
> 16:20:13,478 ERROR [STDERR]     at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:115)
                                    
> 16:20:13,478 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:13,479 ERROR [STDERR]     at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                                                  
> 16:20:13,479 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
                                            
> 16:20:13,496 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:13,496 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
                                                              
> 16:20:13,496 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:13,496 ERROR [STDERR]     at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                                                    
> 16:20:13,496 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:13,496 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:335)
                                                             
> 16:20:13,497 ERROR [STDERR]     at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
                                                                                         
  
> 16:20:13,497 ERROR [STDERR]     at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
                                            
> 16:20:13,497 ERROR [STDERR]     at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
                                                                                 
> 16:20:13,511 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
                                                       
> 16:20:13,512 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
                                                                   
> 16:20:13,512 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
                                                                     
> 16:20:13,513 ERROR [STDERR] Caused by: org.apache.jackrabbit.core.TransactionException:
Unable to prepare transaction. 
> 16:20:13,513 ERROR [STDERR] Caused by: org.apache.jackrabbit.core.TransactionException:
Unable to prepare transaction.                                                           
  
> 16:20:13,513 ERROR [STDERR]     at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:155)
                                                        
> 16:20:13,513 ERROR [STDERR]     at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:138)
                                                              
> 16:20:13,514 ERROR [STDERR]     ... 36 more                                         
                                                                                         
     
> 16:20:13,514 ERROR [STDERR] Caused by: org.apache.jackrabbit.core.state.StaleItemStateException:
b0a65dc6-5180-4fe9-8f77-d09f0870b2cb has been modified externally                  
> 16:20:13,514 ERROR [STDERR]     at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:644)
                                           
> 16:20:13,515 ERROR [STDERR]     at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1054)
                                           
> 16:20:13,515 ERROR [STDERR]     at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:149)
                                                        
> 16:20:13,515 ERROR [STDERR]     ... 37 more                                         
                                                                                         
     
> 16:20:22,241 ERROR [STDERR] javax.transaction.xa.XAException                        
                                                                                         
     
> 16:20:22,241 ERROR [STDERR]     at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:155)
                                                              
> 16:20:22,241 ERROR [STDERR]     at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:337)
                                                                         
> 16:20:22,241 ERROR [STDERR]     at org.apache.jackrabbit.jca.TransactionBoundXAResource.commit(TransactionBoundXAResource.java:39)
                                                 
> 16:20:22,241 ERROR [STDERR]     at org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.commit(JcaXAResourceWrapper.java:53)
                                               
> 16:20:22,241 ERROR [STDERR]     at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:636)
                             
> 16:20:22,241 ERROR [STDERR]     at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2619)
                                                             
> 16:20:22,242 ERROR [STDERR]     at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1779)
                                                                        
> 16:20:22,242 ERROR [STDERR]     at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:88)
                                                          
> 16:20:22,242 ERROR [STDERR]     at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
                                                                                
> 16:20:22,242 ERROR [STDERR]     at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
                           
> 16:20:22,242 ERROR [STDERR]     at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
                                             
> 16:20:22,243 ERROR [STDERR]     at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
                                           
> 16:20:22,243 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
                                                                                 
> 16:20:22,243 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
                                                                                   
> 16:20:22,243 ERROR [STDERR]     at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
                                                                      
> 16:20:22,243 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:22,243 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
                                                          
> 16:20:22,244 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:22,244 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
                                                 
> 16:20:22,244 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:22,244 ERROR [STDERR]     at org.jboss.aspects.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:166)
                                 
> 16:20:22,244 ERROR [STDERR]     at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:115)
                                    
> 16:20:22,244 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:22,244 ERROR [STDERR]     at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                                                  
> 16:20:22,244 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
                                            
> 16:20:22,284 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:22,284 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
                                                              
> 16:20:22,284 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:22,284 ERROR [STDERR]     at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                                                    
> 16:20:22,284 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 
> 16:20:22,284 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                                                                  
> 16:20:22,284 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:335)
                                                             
> 16:20:22,285 ERROR [STDERR]     at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
                                                                                         
  
> 16:20:22,285 ERROR [STDERR]     at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
                                            
> 16:20:22,285 ERROR [STDERR]     at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
                                                                                 
> 16:20:22,285 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
                                                       
> 16:20:22,285 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
                                                                   
> 16:20:22,285 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
                                                                     
> 16:20:22,286 ERROR [STDERR] Caused by: org.apache.jackrabbit.core.TransactionException:
Unable to prepare transaction.                                                           
  
> 16:20:22,286 ERROR [STDERR]     at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:155)
                                                        
> 16:20:22,286 ERROR [STDERR]     at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:138)
                                                              
> 16:20:22,286 ERROR [STDERR]     ... 36 more                                         
                                                                                         
     
> 16:20:22,286 ERROR [STDERR] Caused by: org.apache.jackrabbit.core.state.StaleItemStateException:
b0a65dc6-5180-4fe9-8f77-d09f0870b2cb has been modified externally                  
> 16:20:22,286 ERROR [STDERR]     at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:644)
                                           
> 16:20:22,287 ERROR [STDERR]     at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1054)
                                           
> 16:20:22,287 ERROR [STDERR]     at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:149)
                                                        
> 16:20:22,287 ERROR [STDERR]     ... 37 more       

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message