Chained exceptions from container cannot always be deserialized
---------------------------------------------------------------
Key: ARQ-366
URL:
https://issues.jboss.org/browse/ARQ-366
Project: Arquillian
Issue Type: Bug
Components: Weld Containers
Affects Versions: 1.0.0.Alpha4
Environment: JBoss 6.0.0
Reporter: Elias Ross
This is an example:
org.jboss.arquillian.impl.event.FiredEventException: java.lang.IllegalStateException:
Error launching test com.acme.cache.NamedCacheTest public void
com.acme.cache.NamedCacheTest.testThis()
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)
at
org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
at
org.jboss.arquillian.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:157)
at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:244)
at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:207)
at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:225)
at
org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:221)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)
at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186)
at
org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.IllegalStateException: Error launching test
com.acme.cache.NamedCacheTest public void com.acme.cache.NamedCacheTest.testThis()
at
org.jboss.arquillian.protocol.servlet_3.ServletMethodExecutor.invoke(ServletMethodExecutor.java:61)
at
org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:50)
at
org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:40)
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
... 26 more
Caused by: java.lang.ClassNotFoundException:
org.jboss.weld.exceptions.IllegalArgumentException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:603)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at
org.jboss.arquillian.protocol.servlet_3.ServletMethodExecutor.execute(ServletMethodExecutor.java:88)
at
org.jboss.arquillian.protocol.servlet_3.ServletMethodExecutor.invoke(ServletMethodExecutor.java:57)
... 29 more
As you can see here, "org.jboss.weld.exceptions.IllegalArgumentException"
isn't in the classpath of the client.
It shouldn't be necessary to include the Weld jarfiles in my build path to receive
this exception. Instead, Arquillian could convert these exceptions into more generic ones.
(On the server, logging something useful would be appreciated.)
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira