Hello,
I've got a problem with the JBoss Application Server 4.0.3 RC1, EJB 3.0 and Hibernate.
I want to receive all child-nodes from a parent-node. I got all data from my
parent node withoud problems. But if I want to receive the child-node data
it works sometimes and sometimes it does not. The child-data were joined with an inner join fetch.
Code:
FROM ParentClass parent"
INNER JOIN FETCH parent.children"
WHERE parent.id = :myIdParam"
I guess that there is no fault in my annotations etc. because sometimes it works and I could receive the data from the database. But during certain periods of time this exception appears for the same function-call:
Code:
java.lang.NullPointerException
at mypackage.myJUnitTestMethod(MyClass.java:122)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
After restarting the JBoss it works, but I don't know why. Additionally I don't want to restart the JBoss AS all the time.
Is there anyone who could help me?
Thanks in advance,
Alex