3 Replies Latest reply on May 18, 2009 3:12 PM by asaf sh

    Test configuration failure on basic Seam-Gen project +1 MappedSuperclass

    Matt Cheely Newbie

      I'm having trouble running tests with Seam. I set up a project and a single action with seam-gen. I can run the generated test fine, but as soon as I add the following class:



      import java.io.Serializable;
      import javax.persistence.Entity;
      import javax.persistence.Id;
      import javax.persistence.GeneratedValue;
      import javax.persistence.MappedSuperclass;
      import javax.persistence.Version;
      import org.hibernate.annotations.GenericGenerator;
      
      @Entity
      @MappedSuperclass
      public class BusinessEntity implements Serializable {
           
           private String id;
           private Integer version;
           private boolean obsolete;
                     
           public BusinessEntity() {}
           
           @Id @GeneratedValue(generator="system-uuid")
           @GenericGenerator(name="system-uuid", strategy="uuid")
           public String getId() { return id; }
           public void setId(String id) { this.id = id; }
           
           @Version
           public Integer getVersion() { return version; }
           private void setVersion(Integer version) { this.version = version; }        
                
           public boolean getObsolete() { return obsolete; }
           public void setObsolete(boolean obsolete) { this.obsolete = obsolete; }
      }



      the tests no longer run with the following errors:



      ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=persistence.units:jar=test-build.jar,unitName=DeathCocoon state=Create
      java.lang.AssertionError
           at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:802)
           at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:651)
           at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:501)
           at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:282)
           at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
           at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1195)
           at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:149)
           at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:814)
           at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:412)
           at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
           at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:259)
           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:585)
           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.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1041)
           at org.jboss.seam.mock.BaseSeamTest.startSeam(BaseSeamTest.java:935)
           at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:923)
           at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
           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:585)
           at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
           at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
           at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
           at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
           at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:167)
           at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104)
           at org.testng.TestRunner.runWorkers(TestRunner.java:712)
           at org.testng.TestRunner.privateRun(TestRunner.java:582)
           at org.testng.TestRunner.run(TestRunner.java:477)
           at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
           at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
           at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
           at org.testng.SuiteRunner.run(SuiteRunner.java:198)
           at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:823)
           at org.testng.TestNG.runSuitesLocally(TestNG.java:790)
           at org.testng.TestNG.run(TestNG.java:708)
           at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
           at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
      FAILED CONFIGURATION: @BeforeClass init
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      persistence.units:jar=test-build.jar,unitName=DeathCocoon -> java.lang.AssertionError
      
      
           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.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1041)
           at org.jboss.seam.mock.BaseSeamTest.startSeam(BaseSeamTest.java:935)
           at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:923)
           at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
      ... Removed 22 stack frames
      SKIPPED CONFIGURATION: @BeforeMethod begin
      SKIPPED CONFIGURATION: @AfterMethod end
      SKIPPED CONFIGURATION: @AfterClass cleanup
      SKIPPED: test_ping



      If someone could enlighten me as to why this happens and if there's anything I can do to fix it, I would greatly appreciate it. I'm working from eclipse using the TestNG plugin, if that's helpful at all.