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

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


    [ https://issues.jboss.org/browse/SHRINKRES-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13319934#comment-13319934 ] 

Michael McLean commented on SHRINKRES-258:
------------------------------------------

Thanks for taking a look. I exported the war file with

{code:java}
    	war.as(ZipExporter.class).exportTo(
    		    new File("c:\\temp\\test.zip"), true);
{code}

I compared to the war file from the usual build and it is identical. So not a SHRINKRES issue.

I haven't been able to google up anything else relevant. Any pointers on forums to try would be appreciated.

Thanks for your time.

> 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: 3.0.0-alpha-1, 2.2.4
>         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