jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Dengusiak <Andrzej.Dengus...@pbpolsoft.com.pl>
Subject NoSuchItemStateException when concurrently adding nodes with JCA and XA transactions
Date Fri, 16 Feb 2007 17:47:06 GMT
Hi!
We're using Jackrabbit 1.2.1 with JCA, versioning and XA transactions on
JBoss 4.0.3SP1.
Everything works fine as long as there is only one user accessing repository
and adding nodes at a given time.
But sometimes if there are more users concurrently adding nodes under the
same node, following error occurs:

2007-02-16 17:39:30,545 INFO  [STDOUT] Caused by:
javax.jcr.RepositoryException: 14fad421-1276-47b2-b667-50b2013944e3:
14fad421-1276-47b2-b667-50b2013944e3
2007-02-16 17:39:30,545 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.version.NodeStateEx.store(NodeStateEx.java:504)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.version.AbstractVersionManager.createVersionHisto
ry(AbstractVersionManager.java:306)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.version.XAVersionManager.createVersionHistory(XAV
ersionManager.java:144)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.ItemImpl.initVersionHistories(ItemImpl.java:771)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1181)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:821)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.apache.jackrabbit.jca.JCASessionHandle.save(JCASessionHandle.java:178)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
xxx.dms.helpers.DmsHelper.saveSession(DmsHelper.java:131)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
xxx.dms.ejb.DmsSessionBean.addDocumentMetadata(DmsSessionBean.java:173)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
java.lang.reflect.Method.invoke(Method.java:324)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.jboss.invocation.Invocation.performCall(Invocation.java:359)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(Stateles
sSessionContainer.java:237)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(Cach
edConnectionInterceptor.java:158)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSe
ssionInstanceInterceptor.java:169)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterce
ptor.java:64)
2007-02-16 17:39:30,595 INFO  [STDOUT] 	at
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterce
ptor.java:63)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:121)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:350)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:16
8)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinde
rInterceptor.java:136)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
org.jboss.ejb.Container.invoke(Container.java:954)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
2007-02-16 17:39:30,655 INFO  [STDOUT] 	at
java.lang.reflect.Method.invoke(Method.java:324)
2007-02-16 17:39:30,665 INFO  [STDOUT] 	at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java
:155)
2007-02-16 17:39:30,665 INFO  [STDOUT] 	at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
2007-02-16 17:39:30,665 INFO  [STDOUT] 	at
org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
2007-02-16 17:39:30,665 INFO  [STDOUT] 	at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:26
4)
2007-02-16 17:39:30,665 INFO  [STDOUT] 	at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
2007-02-16 17:39:30,665 INFO  [STDOUT] 	at
org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPIn
voker.java:819)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
java.lang.reflect.Method.invoke(Method.java:324)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
sun.rmi.transport.Transport$1.run(Transport.java:148)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
java.security.AccessController.doPrivileged(Native Method)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
sun.rmi.transport.Transport.serviceCall(Transport.java:144)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7
01)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	... 1 more
2007-02-16 17:39:30,715 INFO  [STDOUT] Caused by:
org.apache.jackrabbit.core.state.NoSuchItemStateException:
14fad421-1276-47b2-b667-50b2013944e3
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedI
temStateManager.java:261)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState(LocalIte
mStateManager.java:95)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState(LocalIte
mStateManager.java:150)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.state.XAItemStateManager.getItemState(XAItemState
Manager.java:226)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.version.NodeStateEx.store(NodeStateEx.java:532)
2007-02-16 17:39:30,715 INFO  [STDOUT] 	at
org.apache.jackrabbit.core.version.NodeStateEx.store(NodeStateEx.java:502)
2007-02-16 17:39:30,775 INFO  [STDOUT] 	... 48 more


Code causing above exception can be simplified to such EJB method with CMT:

Repository repository = (Repository) context.lookup("java:/jcr/jackrabbit");
Session session = repository.login(new SimpleCredentials("system",
"".toCharArray()));
session.getRootNode().getNode("documents"); // "documents" node is
versionable
Node documentNode = rootNode.addNode(someuniquename, "xxx:document");
session.save();
documentNode.checkin();


We're using org.apache.jackrabbit.core.fs.local.LocalFileSystem
and org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager with
external BLOBs

Are we doing something wrong or is it a bug? This issue is blocking
production use of Jackrabbit for us.

regards,
Andrzej Dengusiak

Mime
View raw message