Lukas Eichler created ARQ-1564:
----------------------------------
Summary: TestClass not inserted into ClassPool
Key: ARQ-1564
URL:
https://issues.jboss.org/browse/ARQ-1564
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Extension - Warp
Affects Versions: 1.0.0.Alpha5
Environment: Windows 8 64 Bit SunJDK 1.7
Reporter: Lukas Eichler
TransformedInspection.transfom() tries to access and rename the Testclass from the
ClassPool but the Testclass was never inserted into the ClassPool.
TestClass:
@RunWith(Arquillian.class)
@WarpTest
@RunAsClient
public class StudentTest {
private static final String webDir = "web/";
@Deployment
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class,
"student.war").addClass(Student.class)
.addAsWebResource(new File(webDir, "index.xhtml"))
.addAsWebInfResource(new File(webDir, "WEB-INF/beans.xml"))
.addAsWebInfResource(new File(webDir, "WEB-INF/web.xml"))
.addAsWebInfResource(new File(webDir,
"WEB-INF/faces-config.xml"));
}
@Drone
private WebDriver browser;
@ArquillianResource
private URL deploymentUrl;
@Test
public void test() {
new ClassPool().insertClassPath(new ClassClassPath(this.getClass()));
Warp
.initiate(new Activity() {
public void perform() {
browser.navigate().to(deploymentUrl + "index.jsf");
}
})
.inspect(new Inspection() {
private static final long serialVersionUID = 1L;
@AfterPhase(RENDER_RESPONSE)
public void initial_state_havent_changed_yet() {
assertEquals("John", "John");
}
}
);
}
}
Stacktrace:
org.jboss.arquillian.warp.exception.ClientWarpExecutionException: enriching request
failed; caused by:
javassist.NotFoundException: StudentTest$1
at
org.jboss.arquillian.warp.impl.client.execution.DefaultHttpRequestEnrichmentService.enrichRequest(DefaultHttpRequestEnrichmentService.java:133)
at
org.jboss.arquillian.warp.impl.client.execution.EnrichmentObserver.enrichRequest(EnrichmentObserver.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at
org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
at
org.jboss.arquillian.warp.impl.client.execution.EnrichmentObserver.tryEnrichRequest(EnrichmentObserver.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at
org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
at
org.jboss.arquillian.warp.impl.client.execution.DefaultHttpRequestEnrichmentFilter.filter(DefaultHttpRequestEnrichmentFilter.java:50)
at
org.jboss.arquillian.warp.impl.client.proxy.DefaultProxyService$2.performInContext(DefaultProxyService.java:99)
at
org.jboss.arquillian.warp.impl.client.proxy.DefaultProxyService$2.performInContext(DefaultProxyService.java:96)
at
org.jboss.arquillian.warp.impl.client.context.operation.Contextualizer$2.performInContext(Contextualizer.java:54)
at
org.jboss.arquillian.warp.impl.client.proxy.DefaultProxyService$3.filter(DefaultProxyService.java:108)
at org.littleshoot.proxy.ProxyHttpRequestEncoder.encode(ProxyHttpRequestEncoder.java:75)
at
org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:66)
at
org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
at
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
at
org.jboss.netty.channel.SimpleChannelHandler.writeRequested(SimpleChannelHandler.java:292)
at
org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:254)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at
org.littleshoot.proxy.HttpRequestHandler$1OnConnect.onConnect(HttpRequestHandler.java:407)
at
org.littleshoot.proxy.HttpRequestHandler$1LocalChannelFutureListener.operationComplete(HttpRequestHandler.java:488)
at
org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427)
at
org.jboss.netty.channel.DefaultChannelFuture.addListener(DefaultChannelFuture.java:145)
at org.littleshoot.proxy.HttpRequestHandler.processRequest(HttpRequestHandler.java:539)
at org.littleshoot.proxy.HttpRequestHandler.messageReceived(HttpRequestHandler.java:276)
at
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at
org.jboss.netty.channel.SimpleChannelHandler.messageReceived(SimpleChannelHandler.java:142)
at
org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88)
at
org.jboss.netty.handler.timeout.IdleStateAwareChannelHandler.handleUpstream(IdleStateAwareChannelHandler.java:36)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at
org.jboss.netty.handler.timeout.IdleStateHandler.messageReceived(IdleStateHandler.java:294)
at
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
at
org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459)
at
org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)
at
org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
at
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at
org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
at
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: Could not transform and replicate class class
java.util.Arrays$ArrayList:
Unable to transform inspection StudentTest$1:
StudentTest$1
at
org.jboss.arquillian.warp.impl.shared.RequestPayload.writeExternal(RequestPayload.java:113)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1443)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1414)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
at
org.jboss.arquillian.warp.impl.utils.SerializationUtils.serializeToBytes(SerializationUtils.java:38)
at
org.jboss.arquillian.warp.impl.utils.SerializationUtils.serializeToBase64(SerializationUtils.java:59)
at
org.jboss.arquillian.warp.impl.client.execution.DefaultHttpRequestEnrichmentService.enrichRequest(DefaultHttpRequestEnrichmentService.java:125)
... 76 more
Caused by:
org.jboss.arquillian.warp.impl.client.transformation.InspectionTransformationException:
Unable to transform inspection StudentTest$1:
StudentTest$1
at
org.jboss.arquillian.warp.impl.client.transformation.TransformedInspection.transform(TransformedInspection.java:90)
at
org.jboss.arquillian.warp.impl.client.transformation.TransformedInspection.<init>(TransformedInspection.java:57)
at
org.jboss.arquillian.warp.impl.client.transformation.TransformedInspection.<init>(TransformedInspection.java:49)
at
org.jboss.arquillian.warp.impl.shared.RequestPayload.writeExternal(RequestPayload.java:107)
... 83 more
Caused by: javassist.NotFoundException: StudentTest$1
at javassist.ClassPool.getAndRename(ClassPool.java:387)
at
org.jboss.arquillian.warp.impl.client.transformation.TransformedInspection.transform(TransformedInspection.java:65)
... 86 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira