1 Reply Latest reply on Dec 8, 2009 2:44 PM by sumit kumar

    SeamTest Errors

    Richard Brassell Newbie
      I'm having some fun getting SeamTest in embedded jboss up and running.  For some reason the tests do not see the SeamInterceptor class.

      Any Help here would be appreciated big time.

      I'm using ant 1.6.5 and jboss-seam-2.1.0.SP1.

      I checked and ant is using Java 1.5.0_16.

      Here is the error I see.

      `Buildfile: build.xml

      test:
         [testng] [Parser] Running:
         [testng]   /Users/rkbrasse/intervise/workspace-security-seam/ejb/target/test-classes/testng.xml

         [testng] ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Real: name=vfsjar:file:/Users/rkbrasse/intervise/workspace-security-seam/ejb/target/ejb.jar!/ state=PostClassLoader mode=Manual requiredState=Real
         [testng] org.jboss.deployers.spi.DeploymentException: Error deploying ejb.jar: Interceptor class not found:
         [testng]         org.jboss.seam.ejb.SeamInterceptor
         [testng]        in class loader sun.misc.Launcher$AppClassLoader@a9c85c
         [testng]      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:158)
         [testng]      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:88)
         [testng]      at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
         [testng]      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
         [testng]      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
         [testng]      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
         [testng]      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
         [testng]      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
         [testng]      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
         [testng]      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
         [testng]      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
         [testng]      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
         [testng]      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
         [testng]      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
         [testng]      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
         [testng]      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
         [testng]      at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:127)
         [testng]      at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
         [testng]      at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:15)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1025)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:916)
         [testng]      at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
         [testng]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         [testng]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         [testng]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         [testng]      at java.lang.reflect.Method.invoke(Method.java:585)
         [testng]      at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
         [testng]      at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
         [testng]      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
         [testng]      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
         [testng]      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:261)
         [testng]      at org.testng.SuiteRunner.run(SuiteRunner.java:190)
         [testng]      at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
         [testng]      at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
         [testng]      at org.testng.TestNG.run(TestNG.java:699)
         [testng]      at org.testng.TestNG.privateMain(TestNG.java:824)
         [testng]      at org.testng.TestNG.main(TestNG.java:802)
         [testng] Caused by: java.lang.RuntimeException: Interceptor class not found:
         [testng]         org.jboss.seam.ejb.SeamInterceptor
         [testng]        in class loader sun.misc.Launcher$AppClassLoader@a9c85c
         [testng]      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.loadClass(InterceptorInfoRepository.java:532)
         [testng]      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.getOrInitialiseFromAnnotations(InterceptorInfoRepository.java:438)
         [testng]      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.initialiseDefaultInterceptors(InterceptorInfoRepository.java:428)
         [testng]      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.initialise(InterceptorInfoRepository.java:114)
         [testng]      at org.jboss.ejb3.Ejb3HandlerFactory$DDFactory.<init>(Ejb3HandlerFactory.java:48)
         [testng]      at org.jboss.ejb3.Ejb3HandlerFactory.getInstance(Ejb3HandlerFactory.java:83)
         [testng]      at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:432)
         [testng]      at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:376)
         [testng]      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:145)
         [testng]      ... 36 more
         [testng] Caused by: java.lang.ClassNotFoundException:
         [testng]         org.jboss.seam.ejb.SeamInterceptor
         [testng]      
         [testng]      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         [testng]      at java.security.AccessController.doPrivileged(Native Method)
         [testng]      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         [testng]      at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
         [testng]      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
         [testng]      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         [testng]      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.loadClass(InterceptorInfoRepository.java:528)
         [testng]      ... 44 more
         [testng] FAILED CONFIGURATION: @BeforeSuite startSeam
         [testng] org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

         [testng] *** CONTEXTS IN ERROR: Name -> Error

         [testng] vfsjar:file:/Users/rkbrasse/intervise/workspace-security-seam/ejb/target/ejb.jar!/ -> java.lang.ClassNotFoundException:
         [testng]         org.jboss.seam.ejb.SeamInterceptor
         [testng]      


         [testng]      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
         [testng]      at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
         [testng]      at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:128)
         [testng]      at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
         [testng]      at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:15)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1025)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:916)
         [testng]      at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
         [testng] ... Removed 15 stack frames
         [testng] SKIPPED CONFIGURATION: @BeforeClass setupClass
         [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
         [testng] SKIPPED CONFIGURATION: @AfterMethod end
         [testng] SKIPPED CONFIGURATION: @AfterClass cleanupClass
         [testng] SKIPPED: testCreateAddressSuccess

         [testng] ===============================================
         [testng]     tests
         [testng]     Tests run: 1, Failures: 0, Skips: 1
         [testng]     Configuration Failures: 1, Skips: 4
         [testng] ===============================================


         [testng] ===============================================
         [testng] seam-security-ejb
         [testng] Total tests run: 1, Failures: 0, Skips: 1
         [testng] Configuration Failures: 1, Skips: 5
         [testng] ===============================================


      BUILD SUCCESSFUL
      `

      here is my build.xml for the tests


      `<?xml version="1.0"?>
      <project name="ejb" default="test" basedir=".">

              <property name="src.test.dir" value="src/test" />
              <property name="lib.dir" value="src/test/resources/lib" />
              <property name="endorsed.dir" value="${lib.dir}/endorsed" />
              <property name="test.dir" value="target/test-classes" />
              <property name="bootstrap.dir" value="src/test/resources/bootstrap" />
              <property name="testng.jar" value="src/test/resources/lib/testng.jar" />
              <property name="javac.debug" value="true" />
              <property name="javac.deprecation" value="false" />
              <property name="debug" value="false" />

              <fileset id="lib" dir="${lib.dir}">
                      <include name="*.jar" />
              </fileset>

              <target name="test" description="Run the tests">           
                  <taskdef resource="testngtasks" classpath="${testng.jar}" />
                   <path id="test.path">
                     <path path="${test.dir}" />
                     <pathelement location="${lib.dir}/test/jboss-embedded-all.jar" />
                     <pathelement location="${lib.dir}/test/hibernate-all.jar" />
                     <pathelement location="${lib.dir}/test/thirdparty-all.jar" />
                     <pathelement location="${lib.dir}/jboss-embedded-api.jar" />
                        <path path="${bootstrap.dir}" />
                     <pathelement location="${lib.dir}/jboss-seam.jar" />
                          <pathelement location="${lib.dir}/el-api.jar" />
                        <pathelement location="${lib.dir}/jboss-el.jar" />
                       <pathelement location="${lib.dir}/jsf-api.jar" />
                        <pathelement location="${lib.dir}/activation.jar" />
                     <pathelement location="target/ejb.jar" />
                   </path>
                  <testng outputdir="${basedir}/test-output">
                    <jvmarg line="-Djava.endorsed.dirs=${endorsed.dir}"/>
                    <jvmarg line="-Dsun.lang.ClassLoader.allowArraySyntax=true"/>
                    <classpath refid="test.path" />
                    <xmlfileset dir="${test.dir}" includes="testng.xml" />
                  </testng>
              </target>
      </project>`