5 Replies Latest reply on Feb 12, 2012 10:15 PM by Alper Akture

    Can not find a valid marshaller for data type: invocation

    Alper Akture Newbie

      I started getting this error while running arquillian 1.0.0.Alpha5 with jboss-6-1.1.0.Final in eclipse using junit. I have a mutli module maven project and it only fails on on one of the modules, the parent pom contains all the dependencies, and arqullian tests do work in the other modules. I broke the test down to the simplest form, just to isolate any issues:

       

      @RunWith(Arquillian.class)

      public class AdmissionsTest {

       

        @Deployment

                public static Archive<?> createTestArchive() {

                          return ShrinkWrap.create(WebArchive.class, "test.war");

                }

       

        @Test

                public void testGetClaims() throws Exception {

                          assertEquals(1, 1);

       

                }

      }

       

      Trace:

       

      org.jboss.arquillian.spi.client.container.LifecycleException: Could not connect to container

                at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.start(JBossASRemoteContainer.java:83)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$5.perform(ContainerLifecycleController.java:145)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$5.perform(ContainerLifecycleController.java:135)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:183)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:134)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

                at org.jboss.arquillian.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:78)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

                at org.jboss.arquillian.impl.core.EventImpl.fire(EventImpl.java:67)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:83)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:76)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.forEachContainer(ContainerLifecycleController.java:176)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.startContainers(ContainerLifecycleController.java:75)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

                at org.jboss.arquillian.impl.core.EventImpl.fire(EventImpl.java:67)

                at org.jboss.arquillian.impl.client.ContainerEventController.execute(ContainerEventController.java:55)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

                at org.jboss.arquillian.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

                at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:58)

                at org.jboss.arquillian.junit.Arquillian.<init>(Arquillian.java:86)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

                at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)

                at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)

                at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

                at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)

                at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

                at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Caused by: org.jboss.remoting.marshal.InvalidMarshallingResource: Can not find a valid marshaller for data type: invocation

                at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:98)

                at org.jboss.remoting.Client.invoke(Client.java:1961)

                at org.jboss.remoting.Client.invoke(Client.java:804)

                at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at AOPProxy$0.getDeploymentManager(AOPProxy$0.java)

                at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.initDeploymentManager(JBossASRemoteContainer.java:199)

                at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.start(JBossASRemoteContainer.java:79)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$5.perform(ContainerLifecycleController.java:145)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$5.perform(ContainerLifecycleController.java:135)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:183)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:134)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

                at org.jboss.arquillian.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:78)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

                at org.jboss.arquillian.impl.core.EventImpl.fire(EventImpl.java:67)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:83)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:76)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.forEachContainer(ContainerLifecycleController.java:176)

                at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.startContainers(ContainerLifecycleController.java:75)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

                at org.jboss.arquillian.impl.core.EventImpl.fire(EventImpl.java:67)

                at org.jboss.arquillian.impl.client.ContainerEventController.execute(ContainerEventController.java:55)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

                at org.jboss.arquillian.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

                at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:58)

                at org.jboss.arquillian.junit.Arquillian.<init>(Arquillian.java:86)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

                at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)

                at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)

                at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

                at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)

                at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

                at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

                at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at AOPProxy$0.getDeploymentManager(AOPProxy$0.java)

                at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.initDeploymentManager(JBossASRemoteContainer.java:199)

                at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.start(JBossASRemoteContainer.java:79)

                ... 72 more

        • 1. Re: Can not find a valid marshaller for data type: invocation
          Bartosz Majsak Master

          Hi Alper,

           

          I would recommend updating Arquillian Core to CR7. Alpha 5 is quite old version.

           

          Let us know if it helped.

           

          Cheers,

          Bartosz

          1 of 1 people found this helpful
          • 2. Re: Can not find a valid marshaller for data type: invocation
            Alper Akture Newbie

            Thanks Bartosz. I did upddate to CR7 as described here and also changed from using a remote jboss instance to the weld embedded instance as described there. I was able to get that sample GreeterTest to work in my project. That test uses a shrinkwrap jar file. My tests though use a war (I'm adding joda as a jar dependencies using MavenArtifactResolver, so I think I have to use a war) by calling

             

            ShrinkWrap.create(WebArchive.class, "test.war")

              .addAsLibraries(MavenArtifactResolver.resolveAll("joda-time:joda-time:2.0"))

              //etc..

             

            I also tried using:

             

            .addAsLibrary(new File("/Users/aakture/.m2/repository/joda-time/joda-time/2.0/joda-time-2.0.jar"));

             

            When I try to run as a war, I am getting this error:

             

            java.lang.NoClassDefFoundError: org/jboss/shrinkwrap/impl/base/asset/ArchiveAsset

                      at org.jboss.arquillian.container.weld.ee.embedded_1_1.Utils.findBeansXml(Utils.java:71)

                      at org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer.deploy(WeldEEMockContainer.java:93)

                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:156)

                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:123)

                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:266)

                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:122)

                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                

                       ...

             

            Caused by: java.lang.ClassNotFoundException: org.jboss.shrinkwrap.impl.base.asset.ArchiveAsset

                      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

                      at java.security.AccessController.doPrivileged(Native Method)

                      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

                      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

                      ... 89 more

             

            It should get this dependency from the this entry in the pom, right?

             

              <dependency>

                  <groupId>org.jboss.arquillian</groupId>

                  <artifactId>arquillian-bom</artifactId>

                  <version>1.0.0.CR7</version>

                  <scope>import</scope>

                  <type>pom</type>

              </dependency>

             

            Maybe i can't use war with embedded weld?

             

            Thanks for any help.

            • 3. Re: Can not find a valid marshaller for data type: invocation
              Alper Akture Newbie

              It looks like if I go back to version 1.0.0.CR5, I don't get the above error. Maybe something changed in CR6?

              • 4. Re: Can not find a valid marshaller for data type: invocation
                Aslak Knutsen Master

                You need to update your weld contianer to 1.0.0.CR3. It was depending on some internals in ShrinkWrap that changed.

                • 5. Re: Can not find a valid marshaller for data type: invocation
                  Alper Akture Newbie

                  thanks, it's all working now with embedded weld.