2 Replies Latest reply on Jul 7, 2011 8:21 AM by José Luis Maieron

    Integration test for seam project

    heba fathy Newbie
      i try to run integration test by testng
      i copy the ds.xml file to deploy folder
      i set this variable in run configuration
      -Dsun.lang.ClassLoader.allowArraySyntax=true
      but i have this error

      [Parser] Running:
        /tmp/testng-eclipse/testng-customsuite.xml

      ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Real: name=vfsfile:/media/A2A61F29A61EFD8B/untitledfolder/myneweclipse/preprices_site-webapplication-test/bin/ state=PostClassLoader mode=Manual requiredState=Real
      org.jboss.deployment.DeploymentException: Error during install jboss.jca:service=ManagedConnectionFactory,name=prepriced_site-webapplicationDatasource
              at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:52)
              at org.jboss.system.ServiceController.install(ServiceController.java:277)
              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:98)
              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:874)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
              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.change(AbstractController.java:622)
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
              at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:127)
              at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
              at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:15)
              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:607)
              at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:417)
              at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:154)
              at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:88)
              at org.testng.SuiteRunner.privateRun(SuiteRunner.java:284)
              at org.testng.SuiteRunner.run(SuiteRunner.java:204)
              at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
              at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
              at org.testng.TestNG.run(TestNG.java:751)
              at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
              at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
      Caused by: java.lang.IllegalStateException: jboss.jca:name=prepriced_site-webapplicationDatasource,service=ManagedConnectionFactory is already installed.
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:525)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:398)
              at org.jboss.system.ServiceController.doInstall(ServiceController.java:641)
              at org.jboss.system.ServiceController.install(ServiceController.java:271)
              ... 38 more
      ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=persistence.units:unitName=prepriced_site-webapplication state=Create
      java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: prepriced_site-webapplication
              at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:239)
              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.dependency.AbstractKernelController.install(AbstractKernelController.java:96)
              at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:90)
              at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:151)
              at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:604)
              at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:400)
              at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:53)
              at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:37)
              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
              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.change(AbstractController.java:622)
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
              at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:127)
              at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
              at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:15)
              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:607)
              at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:417)
              at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:154)
              at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:88)
              at org.testng.SuiteRunner.privateRun(SuiteRunner.java:284)
              at org.testng.SuiteRunner.run(SuiteRunner.java:204)
              at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
              at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
              at org.testng.TestNG.run(TestNG.java:751)
              at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
              at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
      FAILED CONFIGURATION: @BeforeSuite startSeam
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      *** CONTEXTS IN ERROR: Name -> Error

      persistence.units:unitName=prepriced_site-webapplication -> java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: prepriced_site-webapplication

      vfsfile:/media/A2A61F29A61EFD8B/untitledfolder/myneweclipse/preprices_site-webapplication-test/bin/ -> java.lang.IllegalStateException: jboss.jca:name=prepriced_site-webapplicationDatasource,service=ManagedConnectionFactory is already installed.


              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
              at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:128)
              at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
              at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:15)
              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)
      ... Removed 15 stack frames
      SKIPPED CONFIGURATION: @BeforeClass setupClass
      SKIPPED CONFIGURATION: @BeforeMethod begin
      SKIPPED CONFIGURATION: @AfterMethod end
      SKIPPED CONFIGURATION: @AfterClass cleanupClass
      SKIPPED: testAddComponent

      ===============================================
          NewTest
          Tests run: 1, Failures: 0, Skips: 1
          Configuration Failures: 1, Skips: 4
      ===============================================


      ===============================================
      preprices_site-webapplication-test
      Total tests run: 1, Failures: 0, Skips: 1
      Configuration Failures: 1, Skips: 5
      ===============================================

      please i need help