1 Reply Latest reply on Jun 16, 2010 5:28 PM by Snjezana Peco

    TestNG problems with Seam project, Ecilpse, and Maven

    Tom Bryan Newbie

      Has anyone had success with generating a Seam project using JBoss Tools In Eclipse and enabling the Maven support? 


      I'm having trouble getting unit tests working.  Here is my environment:



      • JDK 1.6.0_20

      • Eclipse 3.5

      • JBoss Tools 3.1

      • m2eclipse 0.10

      • TestNG

      • WTP patch - 2010 04 13



      I create a new Seam Web project using Eclipse and JBoss Tools.  I modified the Configuration during project creation to enable the JBoss Maven Integration facet.


      Everything seems to work fine locally (compile, run from the Servers view, etc.) except for the test project.  I create a new action (Ping.java), which generates a PingTest.java class.  I'm trying to run the test in PingTest using the TestNG Eclipse plug-in.  On the Arguments tab of the TestNG run configuration, I specify a VM argument of -Dsun.lang.ClassLoader.allowArraySyntax=true.  Running this TestNG run configuration generates a ton of errors like this:


      ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Instantiated: name=FileStructure state=Described
      java.lang.NoSuchMethodError: javassist.scopedpool.ScopedClassPool.<init>(Ljava/lang/ClassLoader;Ljavassist/ClassPool;Ljavassist/scopedpool/ScopedClassPoolRepository;Z)V
              at org.jboss.aop.classpool.AOPClassPool.<init>(AOPClassPool.java:69)
              at org.jboss.aop.classpool.AOPClassPool.<init>(AOPClassPool.java:59)
              at org.jboss.aop.classpool.AOPClassPoolFactory.create(AOPClassPoolFactory.java:40)
              at javassist.scopedpool.ScopedClassPoolRepositoryImpl.createScopedClassPool(ScopedClassPoolRepositoryImpl.java:99)
              at javassist.scopedpool.ScopedClassPoolRepositoryImpl.registerClassLoader(ScopedClassPoolRepositoryImpl.java:125)
              at org.jboss.aop.classpool.AOPClassPoolRepository.registerClassLoader(AOPClassPoolRepository.java:158)
              at org.jboss.aop.AspectManager.registerClassLoader(AspectManager.java:721)
              at org.jboss.aop.AspectManager.findClassPool(AspectManager.java:709)
              at org.jboss.aop.proxy.container.ContainerProxyFactory.createProxyCtClass(ContainerProxyFactory.java:187)
              at org.jboss.aop.proxy.container.ContainerProxyFactory.createProxyCtClass(ContainerProxyFactory.java:171)
              at org.jboss.aop.proxy.container.ContainerProxyFactory.generateProxy(ContainerProxyFactory.java:143)
              at org.jboss.aop.proxy.container.ContainerProxyFactory.getProxyClass(ContainerProxyFactory.java:133)
              at org.jboss.aop.proxy.container.GeneratedAOPProxyFactory.generateProxy(GeneratedAOPProxyFactory.java:130)
              at org.jboss.aop.proxy.container.GeneratedAOPProxyFactory.getProxy(GeneratedAOPProxyFactory.java:116)
              at org.jboss.aop.proxy.container.GeneratedAOPProxyFactory.createAdvisedProxy(GeneratedAOPProxyFactory.java:85)
              at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.dispatch(AOPConstructorJoinpoint.java:87)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:214)
              at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:45)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:108)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:69)
              at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:53)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:135)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:46)
              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:574)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:398)
              at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:309)
              at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:279)
              at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)
              at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)
              at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:130)
              at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:142)
              at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:183)
              at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:195)
              at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
              at org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1024)
              at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:915)
              at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:643)
              at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:446)
              at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:162)
              at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:92)
              at org.testng.SuiteRunner.privateRun(SuiteRunner.java:301)
              at org.testng.SuiteRunner.run(SuiteRunner.java:195)
              at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:903)
              at org.testng.TestNG.runSuitesLocally(TestNG.java:872)
              at org.testng.TestNG.run(TestNG.java:780)
              at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:75)
              at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:127)
      



      or this


      ERROR [org.jboss.embedded.DeploymentScanner] Failed to deploy
      org.jboss.deployers.spi.DeploymentException: No deployer recognised the structure of vfsfile:/home/tbryan/Eclipse/Workspaces/workspace-outsourcesmart/mvnexp-test/bootstrap/conf/jboss-service.xml
              at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:219)
              at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:77)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:743)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:280)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:237)
              at org.jboss.embedded.DeploymentGroup.add(DeploymentGroup.java:153)
              at org.jboss.embedded.DeploymentGroup.add(DeploymentGroup.java:166)
              at org.jboss.embedded.DeploymentGroup.addResource(DeploymentGroup.java:326)
              at org.jboss.embedded.DeploymentScanner.start(DeploymentScanner.java:81)
              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.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:56)
              at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:110)
              at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:214)
              at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:45)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:108)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:69)
              at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:135)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:46)
              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:574)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:398)
              at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:309)
              at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:279)
              at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)
              at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)
              at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:130)
              at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:142)
              at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:183)
              at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:195)
              at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
              at org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1024)
              at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:915)
              at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:643)
              at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:446)
              at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:162)
              at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:92)
              at org.testng.SuiteRunner.privateRun(SuiteRunner.java:301)
              at org.testng.SuiteRunner.run(SuiteRunner.java:195)
              at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:903)
              at org.testng.TestNG.runSuitesLocally(TestNG.java:872)
              at org.testng.TestNG.run(TestNG.java:780)
              at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:75)
              at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:127)
      



      I searched the forums, but most of the errors like this seem to be from a couple of years ago, and most of the recommendations are already taken care of now by the JBoss Tools Maven integration. 


      Either I'm missing something simple, or there's a bug in the generation of a Seam Web Project with Maven integration inside of Eclipse.  I considered posting no the JBoss Tools forum, but it looks like they often bump Seam-based questions over here. 


      Any help or pointers would be appreciated. 


      Thanks.