[jboss-jira] [JBoss JIRA] Commented: (JBAS-7588) Investigate org.jboss.test.ejb.lifecycle.test failures
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Fri Jan 29 09:34:19 EST 2010
[ https://jira.jboss.org/jira/browse/JBAS-7588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12509266#action_12509266 ]
jaikiran pai commented on JBAS-7588:
------------------------------------
This one is taking more time than i initially though it would :(
The real issue isn't with this testcase org.jboss.test.ejb.lifecycle.test.IndependentJarLifeCycleUnitTestCase itself. This test (and the other similar testcase org.jboss.test.cts.test.IndependentJarsUnitTestCase) run fine for the first time. For example, consider the following scenario:
1) Start the server
2) Run IndependentJarLifeCycleUnitTestCase (or IndependentJarsUnitTestCase)
[jpai at localhost testsuite]$ ./build.sh one-test -Dtest=org.jboss.test.ejb.lifecycle.test.IndependentJarLifeCycleUnitTestCase
Searching for build.xml ...
Buildfile: /NotBackedUp/jpai/business/jboss/wc/jbossas/trunk/testsuite/build.xml
...
one-test:
[junit] Running org.jboss.test.ejb.lifecycle.test.IndependentJarLifeCycleUnitTestCase
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 20.26 sec
Runs successfully.
Now run the same test (or the other one) again (without restarting the server). They fail with a CCE on the server side:
18:06:05,854 ERROR [org.jboss.test.cts.ejb.CallerSessionBean] Unexpected error: java.lang.ClassCastException: $Proxy256 cannot be cast to org.jboss.test.cts.interfaces.CallerSessionHome
at org.jboss.test.cts.ejb.CallerSessionBean.lookupHome(CallerSessionBean.java:284)
at org.jboss.test.cts.ejb.CallerSessionBean.simpleCall(CallerSessionBean.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:597)
at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:233)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:654)
at org.jboss.ejb.Container.invoke(Container.java:1072)
at sun.reflect.GeneratedMethodAccessor332.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)
at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:897)
at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:768)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:721)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:575)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
The QA Hudson environment too is experiencing the same thing as above. It first runs the org.jboss.test.cts.test.IndependentJarsUnitTestCase testcase, which passes and then it runs the org.jboss.test.ejb.lifecycle.test.IndependentJarLifeCycleUnitTestCase which fails:
[junit] Running org.jboss.test.cts.test.IndependentJarsUnitTestCase
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.393 sec
[junit] Running org.jboss.test.cts.test.LongWaitStatefulSessionUnitTestCase
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 6.942 sec
... (some more tests removed from the log)
[junit] Running org.jboss.test.ejb.lifecycle.test.IndependentJarLifeCycleUnitTestCase
[junit] Tests run: 2, Failures: 0, Errors: 8, Time elapsed: 4.002 sec
[junit] Test org.jboss.test.ejb.lifecycle.test.IndependentJarLifeCycleUnitTestCase FAILED
While looking into this, i notice that for some reason, the second run uses the proxy which was loaded by the previous run's classloader, and tries to cast it to the CallerSessionHome which was loaded by this test run's classloader. The logs further indicate that after the first test completes (successfully), the classloader is unregistered/shutdown. So ideally, it shouldn't come into play during the next run of a testcase. But the logs of the second test run do show that the JNDI proxy was indeed loaded through the first run's classloader.
I don't yet have a complete grasp of what's going on. Have been digging through the classloading logs and the testcase to understand the flow. I'll continue looking into the logs to see what the root cause is.
> Investigate org.jboss.test.ejb.lifecycle.test failures
> ------------------------------------------------------
>
> Key: JBAS-7588
> URL: https://jira.jboss.org/jira/browse/JBAS-7588
> Project: JBoss Application Server
> Issue Type: Sub-task
> Security Level: Public(Everyone can see)
> Reporter: jaikiran pai
> Assignee: jaikiran pai
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list