[shrinkwrap-issues] [JBoss JIRA] (SHRINKRES-258) java.io.StreamCorruptedException when using EmbeddedGradleImporter

Michael McLean (JIRA) issues at jboss.org
Wed Nov 9 06:48:00 EST 2016


Michael McLean created SHRINKRES-258:
----------------------------------------

             Summary: java.io.StreamCorruptedException when using EmbeddedGradleImporter
                 Key: SHRINKRES-258
                 URL: https://issues.jboss.org/browse/SHRINKRES-258
             Project: ShrinkWrap Resolvers
          Issue Type: Support Request
          Components: gradle
    Affects Versions: 2.2.4, 3.0.0-alpha-1
         Environment: Windows 7, Wildfly10, Gradle 2.11, JVM 1.8.0_73
            Reporter: Michael McLean


Started om the example  https://github.com/mmatloka/arquillian-gradle-sample/tree/master/single-module. Works fine.

I setup basically the same example code in a moderately complex app with about 25 dependencies in build.gradle.

With more complex dependencies running "gradle test" produces

{code:java}


java.lang.IllegalStateException: Error launching test com.capitalroad.arquillian.tests.PartyImportGradleImporter public void com.capitalroad.arquillian.tests.PartyImportGradleImporter.shouldCreateGreeting()
	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:104)
	at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...
Caused by: java.io.StreamCorruptedException: invalid stream header: 3C21444F
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:806)
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:194)
	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:121)
	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:99)
	... 96 more
{code}

If I change from 

{code:java}
    @Deployment
    public static WebArchive createDeployment() {
        return ShrinkWrap.create(EmbeddedGradleImporter.class)
                .forThisProjectDirectory()
                .importBuildOutput().as(WebArchive.class);
    }
{code}

back to


{code:java}
    @Deployment
    public static WebArchive createDeployment() {
        return ShrinkWrap.create(WebArchive.class)
                .addClass(Greeter.class)
                .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
    }
{code}
 
the Greeter test runs successfully.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the shrinkwrap-issues mailing list