1 Reply Latest reply on Jan 10, 2017 5:54 AM by Lonzak -

    Deployment of JavaArchive not supported by arquillian-was-remote-8?

    Dominik Kaspar Newbie

      Hi,

       

      I tried to use the Websphere container adapter (arquillian-was-remote-8) to deploy a simple Jar file by following the Getting Started · Arquillian Guides tutorial.

      However, I keep running into an exception that is caused by code in the arquillian-was-remote adapter itself (see line 205 in http://tinyurl.com/arquillian-was-remote).

       

      [junit]Caused an ERROR

          [junit] Unsupported archive type has been provided for deployment: org.jboss.shrinkwrap.impl.base.spec.JavaArchiveImpl

          [junit] org.jboss.arquillian.container.spi.client.container.DeploymentException: Unsupported archive type has been provided for deployment: org.jboss.shrinkwrap.impl.base.spec.JavaArchiveImpl

          [junit]at org.jboss.arquillian.container.was.remote_8.WebSphereRemoteContainer.deploy(WebSphereRemoteContainer.java:205)

       

      Does the arquillian-was-remote adapter only support WAR and EAR deployment? But not JAR deploment?

       

      Regards,

      Dominik

        • 1. Re: Deployment of JavaArchive not supported by arquillian-was-remote-8?
          Lonzak - Newbie

          I think so. I experienced the same and changed the createDeployment() method to return an EAR:

           

            @Deployment
            public static EnterpriseArchive createDeployment() {
              
                    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "application-ear.ear")
                                          .as(ZipImporter.class)
                                          .importFrom(new File("../folder/target/package-1.0.0-SNAPSHOT.ear"))
                                          .as(EnterpriseArchive.class);
          
                    JavaArchive testLibraryHelper = ShrinkWrap.create(JavaArchive.class)
                                                  .addClass(YourTestClass.class)
                                                  //for CDI 
                                                  .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                    ear.addAsLibrary(testLibraryHelper);
              return ear;
            }
          

           

          Since I had to import too much stuff into the EAR I used the existing EAR and just added the Test.jar afterwards...

          After that the error was gone...

          1 of 1 people found this helpful