Uploaded image for project: 'ShrinkWrap Resolvers'
  1. ShrinkWrap Resolvers
  2. SHRINKRES-258

java.io.StreamCorruptedException when using EmbeddedGradleImporter

XMLWordPrintable

    • Icon: Support Request Support Request
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 3.0.0-alpha-1, 2.2.4
    • gradle
    • None

      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

      
      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
      

      If I change from

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

      back to

          @Deployment
          public static WebArchive createDeployment() {
              return ShrinkWrap.create(WebArchive.class)
                      .addClass(Greeter.class)
                      .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
          }
      

      the Greeter test runs successfully.

            mjobanek Matous Jobanek
            michael_mclean Michael McLean (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: