-
Bug
-
Resolution: Done
-
Major
-
3.0.1.Final
-
None
We are still having some issues. I am not sure if it is related to the previous issue or not. The problem occurs when we start up two separate servers. When the second server comes up, it appears that the repository from the first server gets corrupted. I have attached another sample application that will exhibit the behavior. The class for the new sample app is com.pb.spring.Main and it takes an integer as a command line input as well as setting up the aspectj weaver. The main difference here is that we are using the atomikos transaction manager.
To run this, just execute one instance with ‘1’ as the command line value and let it run up until it starts looping and reading/creating nodes. Then start the second instance using ‘2’ as the command line value. It will need to run for a couple of minutes before you see the issue. If you look at the time stamps you can see that it appears to be happening on transactional boundaries.
Here is an example command line without the classpath since it is pretty long:
java -XX:MaxPermSize=192m -javaagent:aspectjweaver-1.7.1.jar -classpath ... com.pb.spring.Main 1
Here is the stack trace we are seeing:
Exception in thread "main" java.lang.NullPointerException
at org.modeshape.jcr.JcrSession.cachedNode(JcrSession.java:524)
at org.modeshape.jcr.JcrSession.node(JcrSession.java:547)
at org.modeshape.jcr.AbstractJcrNode.getNode(AbstractJcrNode.java:772)
at org.modeshape.jcr.AbstractJcrNode.getNode(AbstractJcrNode.java:107)
at com.pb.spring.Main.readNode(Main.java:40)
at com.pb.spring.Main.main(Main.java:82)
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:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)