6 Replies Latest reply on Jul 26, 2011 6:18 PM by Aslak Knutsen

    Arquillian Tomcat 6.0.32

    mnaman Newbie

      I keep getting this error:

      java.lang.NoClassDefFoundError: org/apache/catalina/Service

          at java.lang.Class.getDeclaredConstructors0(Native Method)

          at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)

          at java.lang.Class.getConstructor0(Class.java:2699)

          at java.lang.Class.getConstructor(Class.java:1657)

          at org.jboss.arquillian.impl.SecurityActions$1.run(SecurityActions.java:77)

          at org.jboss.arquillian.impl.SecurityActions$1.run(SecurityActions.java:74)

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

          at org.jboss.arquillian.impl.SecurityActions.getConstructor(SecurityActions.java:73)

          at org.jboss.arquillian.impl.DynamicServiceLoader.createInstance(DynamicServiceLoader.java:268)

          at org.jboss.arquillian.impl.DynamicServiceLoader.onlyOne(DynamicServiceLoader.java:94)

          at org.jboss.arquillian.impl.DynamicServiceLoader.onlyOne(DynamicServiceLoader.java:79)

          at org.jboss.arquillian.impl.client.container.ContainerRegistryCreator.createRegistry(ContainerRegistryCreator.java:87)

          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.ManagerImpl.bindAndFire(ManagerImpl.java:221)

          at org.jboss.arquillian.impl.core.InstanceImpl.set(InstanceImpl.java:74)

          at org.jboss.arquillian.impl.bootstrap.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.java:58)

          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.ManagerImpl.<init>(ManagerImpl.java:91)

          at org.jboss.arquillian.impl.core.ManagerBuilder.create(ManagerBuilder.java:74)

          at org.jboss.arquillian.impl.DeployableTestBuilder.build(DeployableTestBuilder.java:97)

          at org.jboss.arquillian.impl.DeployableTestBuilder.build(DeployableTestBuilder.java:67)

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

          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.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:33)

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

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

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

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

          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: java.lang.ClassNotFoundException: org.apache.catalina.Service

          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)

          ... 57 more

       

      Jul 26, 2011 2:24:01 PM org.jboss.arquillian.impl.client.container.ContainerRegistryCreator getActivatedConfiguration

      INFO: Could not read active container configuration: null

       

       

      Seems like it can't find the tomcat service? What do I do to fix this?

        • 1. Re: Arquillian Tomcat 6.0.32
          mnaman Newbie

          Also, I'm using Ant and JUnit

          • 2. Re: Arquillian Tomcat 6.0.32
            Aslak Knutsen Master

            which dependencies do you use ?

            • 3. Re: Arquillian Tomcat 6.0.32
              mnaman Newbie
              <classpathentry kind="lib" path="lib/junit-4.8.2.jar"/>
              <classpathentry kind="lib" path="lib/arquillian-api-1.0.0.Alpha5.jar"/>
              <classpathentry kind="lib" path="lib/arquillian-impl-base-1.0.0.Alpha5.jar"/>
              <classpathentry kind="lib" path="lib/arquillian-junit-1.0.0.Alpha5.jar"/>
              <classpathentry kind="lib" path="lib/arquillian-spi-1.0.0.Alpha5.jar"/>
              <classpathentry kind="lib" path="lib/arquillian-tomcat-embedded-6-1.0.0.Alpha5.jar"/>
              <classpathentry kind="lib" path="lib/arquillian-testenricher-resource-1.0.0.Alpha5.jar"/>
              <classpathentry kind="lib" path="lib/arquillian-testenricher-cdi-1.0.0.Alpha5.jar"/>
              <classpathentry kind="lib" path="lib/arquillian-protocol-servlet-1.0.0.Alpha5.jar"/>
              <classpathentry kind="lib" path="lib/shrinkwrap-api-1.0.0-alpha-12.jar"/>
              <classpathentry kind="lib" path="lib/shrinkwrap-impl-base-1.0.0-alpha-12.jar"/>
              <classpathentry kind="lib" path="lib/shrinkwrap-spi-1.0.0-alpha-12.jar"/>
              <classpathentry kind="lib" path="lib/shrinkwrap-resolver-api-1.0.0-alpha-12.jar"/>
              <classpathentry kind="lib" path="lib/shrinkwrap-extension-tomcat-6-1.0.0-alpha-12.jar"/>
              <classpathentry kind="lib" path="lib/shrinkwrap-descriptors-api-0.1.4.jar"/>
              <classpathentry kind="lib" path="lib/weld-servlet-1.0.1-Final.jar"/>

              Thats what I'm using right now

              • 4. Re: Arquillian Tomcat 6.0.32
                Aslak Knutsen Master

                What about Tomcat ?

                 

                See the Maven example from the documentation: https://docs.jboss.org/author/display/ARQ/Tomcat+6.0+-+Embedded

                • 5. Re: Arquillian Tomcat 6.0.32
                  mnaman Newbie

                  I put them in there, now I get this:

                  java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;

                      at org.apache.catalina.core.StandardHost$MemoryLeakTrackingListener.lifecycleEvent(StandardHost.java:561)

                      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

                      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4625)

                      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

                      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

                      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)

                      at org.jboss.arquillian.container.tomcat.embedded_6.TomcatContainer.deploy(TomcatContainer.java:199)

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

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

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

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

                      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.createDeploymentContext(ContainerDeploymentContextHandler.java:100)

                      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.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.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:51)

                      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.ContainerDeployController$1.perform(ContainerDeployController.java:86)

                      at org.jboss.arquillian.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:79)

                      at org.jboss.arquillian.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:217)

                      at org.jboss.arquillian.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.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.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:69)

                      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.createClassContext(TestContextHandler.java:68)

                      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.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.beforeClass(EventTestRunnerAdaptor.java:70)

                      at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:170)

                      at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:303)

                      at org.jboss.arquillian.junit.Arquillian.access$300(Arquillian.java:45)

                      at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:187)

                      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

                      at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)

                      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)

                      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

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

                      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)

                  • 6. Re: Arquillian Tomcat 6.0.32
                    Aslak Knutsen Master

                    your missing the javax.servlet apis..