jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: [jira] Commented: (JCR-648) NullpointerException in SessionItemStateManager
Date Wed, 29 Nov 2006 17:02:29 GMT
Hi,

Just an idea... transientStore could be null. It is initialized after
addListener is called:

        stateMgr.addListener(this);
...
        transientStore = new ItemStateMap();


Thomas




On 11/29/06, Stefan Guggisberg (JIRA) <jira@apache.org> wrote:
>     [ http://issues.apache.org/jira/browse/JCR-648?page=comments#action_12454351 ]
>
> Stefan Guggisberg commented on JCR-648:
> ---------------------------------------
>
> very strange indeed...
>
> according to the stack trace the NPE is thrown on the following line
> in SessionItemStateManager:
>
>     public void nodeModified(NodeState state) {
> ==>        if (state.getContainer() == this || !transientStore.contains(state.getId()))
{
>             dispatcher.notifyNodeModified(state);
>         }
>     }
>
>
> the 'state' variable must be null in this case ('transientStore' can't be null).
>
> looking at the preceeding stack frames, 'state' can't be possibly null,
> or i am missing something here...
>
> LocalItemStateManager:
>  [...]
>        } else if (modified.isNode()) {
>             // if the state is not ours (and is not cached) it could have
>             // vanished from the weak-ref cache due to a gc. but there could
>             // still be some listeners (e.g. CachingHierarchyManager) that want
>             // to get notified.
>             dispatcher.notifyNodeModified((NodeState) modified);
>         }
>  [...]
>
> if 'modified' would be null, the NPE would be thrown earlier (=> modified.isNode()
)
>
> i have no idea what can possibly lead to the above stack trace...
>
>
>
> > NullpointerException in SessionItemStateManager
> > -----------------------------------------------
> >
> >                 Key: JCR-648
> >                 URL: http://issues.apache.org/jira/browse/JCR-648
> >             Project: Jackrabbit
> >          Issue Type: Bug
> >          Components: core
> >    Affects Versions: 1.1.1, 1.2
> >         Environment: jackrabbit trunk in rev 479646
> > spring-modules-jcr 0.6 (probably not relevant)
> >            Reporter: Christoph Kiehl
> >
> > I got the following exception which is not reproducible and occured during a large
batch of write operations. Unfortunately I got no idea how this happened. May be someone has
an idea?
> > [2006-11-27 21:43:53,065, WARN ] {} support.RemoteInvocationTraceInterceptor:80:
Processing of RmiServiceExporter remote call resulted in fatal exception: com.subshell.sophora.content.server.IContentManager.importDocument
> > org.springframework.transaction.TransactionSystemException: Could not commit JCR
transaction; nested exception is java.lang.NullPointerException Caused by:
> > java.lang.NullPointerException
> >         at org.apache.jackrabbit.core.state.SessionItemStateManager.nodeModified(SessionItemStateManager.java:878)
> >         at org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyNodeModified(StateChangeDispatcher.java:143)
> >         at org.apache.jackrabbit.core.state.LocalItemStateManager.stateModified(LocalItemStateManager.java:426)
> >         at org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyStateModified(StateChangeDispatcher.java:85)
> >         at org.apache.jackrabbit.core.state.SharedItemStateManager.stateModified(SharedItemStateManager.java:388)
> >         at org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyStateModified(StateChangeDispatcher.java:85)
> >         at org.apache.jackrabbit.core.state.SharedItemStateManager.stateModified(SharedItemStateManager.java:388)
> >         at org.apache.jackrabbit.core.state.ItemState.notifyStateUpdated(ItemState.java:241)
> >         at org.apache.jackrabbit.core.state.ChangeLog.persisted(ChangeLog.java:271)
> >         at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:691)
> >         at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:169)
> >         at org.apache.jackrabbit.core.version.XAVersionManager.commit(XAVersionManager.java:478)
> >         at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:172)
> >         at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:315)
> >         at org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction.commit(JackRabbitUserTransaction.java:104)
> >         at org.springmodules.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:192)
> >         at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:540)
> >         at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:510)
> >         at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:310)
> >         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117)
> >         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
> >         at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
> >         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
> >         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
> >         at $Proxy14.importDocument(Unknown Source)
> >         at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
> >         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:203)
> >         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)
> >         at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:70)
> >         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
> >         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
> >         at $Proxy15.importDocument(Unknown Source)
> >         at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:181)
> >         at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38)
> >         at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:76)
> >         at org.springframework.remoting.rmi.RmiBasedExporter.invoke(RmiBasedExporter.java:72)
> >         at org.springframework.remoting.rmi.RmiInvocationWrapper.invoke(RmiInvocationWrapper.java:62)
> >         at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
> >         at sun.rmi.transport.Transport$1.run(Transport.java:153)
> >         at java.security.AccessController.doPrivileged(Native Method)
> >         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
> >         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
> >         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
> >         at java.lang.Thread.run(Thread.java:595)
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

Mime
View raw message