9 Replies Latest reply on Apr 9, 2010 7:30 PM by William Woodman

    having problems with testNG and seam2.2.0GA JBoss tools

    William Woodman Master

      folks this is a cross post from jboss tools where Max suggested i try the seam forum instead.


      here goes - I have created a new basic seam prject and have problems with testNG and the embedded server and injection


      had loads of other problems getting here to workakble build.  Heres what i had to do so far 


      1.     create workspace with no spaces in any of the paths (watch out on XP as it tries to set up a workpace under Directory and Settings which wont work - why cant seam handle spaces in file path strings?)


      2.      set the vm option to include
      '-Dsun.lang.ClassLoader.allowArraySyntax=true'
      for my 1.6 vm i use (failure to do this causes all sorts of errors)


      3.      had to import the xxx-ds.xml data source from the xxx-ear/resources folder  into the xxx-test/bootstrap/deploy folder, as jboss tools template doesnt do this automatically - though bizarrely i think i found one it writes into the xxx-test/META_INF directory - i just renamed this one )



      4      imported the  xxx-ejb/META_INF/persistence.xml into the xxx-test/META_INF folder.  Doesnt seem to be able to use the one in the xxx-ejb project - guess you could include this in the referenced libraries - but i ended up copying it into the xxx-test/META_INF folder


      I need some help.


       
      i  write a test that does an @In directive - and this doesnt seem to work -  so something is still missing - if i do get on the entityManager - this  works - but the injection doesnt - my assert fails the tests



      so  why does the injection fail ?  I would really appreciate any guidance -  am i just being stupid or what ?


      both the injected entityManager, and my node class both fail to inject - i get a null - under the embedded server with testNG.




      package org.domain.forsterslist.entity;
      
      import javax.persistence.EntityManager;
      
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.mock.SeamTest;
      import org.testng.annotations.Test;
      
      @Name (value="nodeTest")
      public class NodeTest extends SeamTest
      {
      
          @In (value="entityManager", create=true)
          EntityManager em;
      
          @In (create=true)
          Node node;
          
          
          @Test
          public void entityManagerTest() throws Exception 
          {
              new ComponentTest() 
              {
      
                  @Override
                  protected void testComponents() throws Exception 
                  {
                      assert 1 == 1;
      
                      EntityManager entityManager = (EntityManager) getInstance("entityManager");
                      assert (entityManager != null);
                  }
              }.run();
          }
      
          @Test 
          public void basic () 
          {
              String testStr = "basic test ";
              
              System.out.println (testStr);
              assert testStr.equals("basic test ");
              
          }
          
          @Test  //this test FAILS
          public void injectionEntityManagerTest () throws Exception
          {
              new ComponentTest ()
              {
                  @Override 
                  protected void testComponents () throws Exception
                  {
                      
                      assert em != null;
                  }
              }.run ();
          }
      
      }
      



        • 1. Re: having problems with testNG and seam2.2.0GA JBoss tools
          Shervin Asgari Master

          I have never created seam test components. Why do you put @Name on your test classes?
          I haven't used any injections on my tests either.


          If I where you I would avoid doing that. If you want the entityManager, do it like you have written with Component.getInstance

          • 2. Re: having problems with testNG and seam2.2.0GA JBoss tools
            Shervin Asgari Master

            Take a look on some of the tests on the seam examples. That should help you on the way

            • 3. Re: having problems with testNG and seam2.2.0GA JBoss tools
              William Woodman Master

              theres still something screwy here though


              not surew why i made the test a component (habit/cut and paste etc ) removed


              rather than test the Node class i thought i'd try the NodeHome - since i was having problems with injection



              heres the test


              package org.domain.forsterslist.session;
              
              import org.domain.forsterslist.entity.Node;
              import org.jboss.seam.mock.SeamTest;
              import org.testng.annotations.Test;
              
              public class NodeHomeTest extends SeamTest
              {
                   NodeHome nodeHome;
                   
                   @Test
                   public void createNode ()
                   {
                        nodeHome = new NodeHome ();
                        assert nodeHome.isIdDefined() == false;
                        
                        //trigger new create 
                        Node myNode = nodeHome.getInstance();
                        assert myNode != null;
                        
                        assert nodeHome.isManaged() == false;
                        
                        myNode.setName("will's node");
                        nodeHome.persist();
                        assert nodeHome.getId() != null;
                        assert nodeHome.isManaged() == true;
                        
                        
                   }
              }
              



              this fails with the following errors


              
              [Parser] Running:
                C:\Users\will\AppData\Local\Temp\testng-eclipse\testng-customsuite.xml
              
              WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
              FAILED: createNode
              java.lang.IllegalStateException: No application context active
                   at org.jboss.seam.Component.forName(Component.java:1945)
                   at org.jboss.seam.Component.getInstance(Component.java:2005)
                   at org.jboss.seam.Component.getInstance(Component.java:1983)
                   at org.jboss.seam.Component.getInstance(Component.java:1977)
                   at org.jboss.seam.Component.getInstance(Component.java:1972)
                   at org.jboss.seam.framework.Controller.getComponentInstance(Controller.java:272)
                   at org.jboss.seam.framework.PersistenceController.getPersistenceContext(PersistenceController.java:20)
                   at org.jboss.seam.framework.EntityHome.getEntityManager(EntityHome.java:177)
                   at org.jboss.seam.framework.EntityHome.joinTransaction(EntityHome.java:159)
                   at org.jboss.seam.framework.Home.getInstance(Home.java:134)
                   at org.domain.forsterslist.session.NodeHomeTest.createNode(NodeHomeTest.java:18)
              ... Removed 22 stack frames
              
              ===============================================
                  org.domain.forsterslist.session.NodeHomeTest
                  Tests run: 1, Failures: 1, Skips: 0
              ===============================================
              
              
              ===============================================
              forstersList-test
              Total tests run: 1, Failures: 1, Skips: 0
              ===============================================
              
              



              I'm not sure exactly what this saying - but presumably the embedded server hasnt started the seam container correctly? which is probably why my injection example isnt working


              would really appreciate understanding how to get he testNG franmework working cos i dont want to have to test this by the gui all the time.





              • 4. Re: having problems with testNG and seam2.2.0GA JBoss tools
                William Woodman Master

                spotted one thing here i wasnt using the test wrapper ComponentTest


                re wrote the test now as


                package org.domain.forsterslist.session;
                
                import org.domain.forsterslist.entity.Node;
                import org.jboss.seam.mock.SeamTest;
                import org.jboss.seam.mock.AbstractSeamTest.ComponentTest;
                import org.testng.annotations.Test;
                
                public class NodeHomeTest extends SeamTest
                {
                     NodeHome nodeHome;
                     
                     @Test
                     public void createNode () throws Exception
                     {
                         new ComponentTest() 
                         {
                         
                              @Override
                              protected void testComponents() throws Exception 
                              {
                                   nodeHome = new NodeHome ();
                                   assert nodeHome.isIdDefined() == false;
                                   
                                   //trigger new create 
                                   Node myNode = nodeHome.getInstance();
                                   assert myNode != null;
                                   
                                   assert nodeHome.isManaged() == false;
                                   
                                   myNode.setName("will's node");
                                   nodeHome.persist();
                                   assert nodeHome.getId() != null;
                                   assert nodeHome.isManaged() == true;
                                   
                              }
                          
                         }.run();
                     }
                }
                



                however this still errors as follows - why is there no transaction?  is this cos the container hasnt started ?  why should i have to create a transaction?  I thought the seam container did that for me, i dont want to have to create manual user transactions here


                [Parser] Running:
                  C:\Users\will\AppData\Local\Temp\testng-eclipse\testng-customsuite.xml
                
                WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
                FAILED: createNode
                javax.persistence.TransactionRequiredException: no transaction is in progress
                     at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:301)
                     at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:92)
                     at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.flush(FullTextEntityManagerImpl.java:113)
                     at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:92)
                     at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:85)
                     at org.domain.forsterslist.session.NodeHomeTest$1.testComponents(NodeHomeTest.java:31)
                     at org.jboss.seam.mock.AbstractSeamTest$ComponentTest.run(AbstractSeamTest.java:162)
                     at org.domain.forsterslist.session.NodeHomeTest.createNode(NodeHomeTest.java:37)
                ... Removed 22 stack frames
                
                ===============================================
                    org.domain.forsterslist.session.NodeHomeTest
                    Tests run: 1, Failures: 1, Skips: 0
                ===============================================
                
                
                ===============================================
                forstersList-test
                Total tests run: 1, Failures: 1, Skips: 0
                ===============================================
                
                

                • 5. Re: having problems with testNG and seam2.2.0GA JBoss tools
                  Shervin Asgari Master

                  Have you read this?
                  Are you using JSF? I tell you again, please take a look in the examples folder in seam. Lots and lots of these tests. You can see how to use them.

                  • 6. Re: having problems with testNG and seam2.2.0GA JBoss tools
                    William Woodman Master

                    yes i had the seam chapter 37 but im not sure its clear enough on what exactly you need to do


                    so - i had alreaddy included the jar files it suggests.  The only problem with the list is that if i nclude the        lib/jboss-seam.jar i get an error about duplicate registration so i removed it again.


                    so, i dont want to test the UI interaction yet just the component element (my ejb project stuff first).


                    I have done the basic pojo tests.


                    when i try and run an integration test on my NodeHome()


                    thats where i have been getting the problems shown above.


                    I had a look in the seam examples code but it doesnt show the configuration of all the elements - and its not useing jboss tools project layouts - and i am using jboss tools as the dev GUI.


                    i tried one other option - i manually get a transaction from the seam transaction class as follows


                    package org.domain.forsterslist.session;
                    
                    import org.domain.forsterslist.entity.Node;
                    import org.jboss.seam.mock.SeamTest;
                    import org.testng.annotations.Test;
                    
                    public class NodeHomeTest extends SeamTest
                    {
                         NodeHome nodeHome;
                         
                         @Test
                         public void createNode () throws Exception
                         {
                    
                    
                             new ComponentTest() 
                             {
                                  @Override
                                  protected void testComponents() throws Exception 
                                  {
                                       org.jboss.seam.transaction.Transaction tx = new org.jboss.seam.transaction.Transaction();
                                       tx.getTransaction().begin();
                    
                                       nodeHome = new NodeHome ();
                                       assert nodeHome.isIdDefined() == false;
                                       
                                       //trigger new create 
                                       Node myNode = nodeHome.getInstance();
                                       assert myNode != null;
                                       
                                       assert nodeHome.isManaged() == false;
                                       
                                       myNode.setName("will's node");
                                       nodeHome.persist();
                                       assert nodeHome.getId() != null;
                                       assert nodeHome.isManaged() == true;
                                       
                                       tx.instance().commit();
                                  }
                              
                             }.run();
                         }
                    }
                    
                    



                    however when i run this i get a different error (but at least it tried to run the insert this time


                    [Parser] Running:
                      C:\Users\will\AppData\Local\Temp\testng-eclipse\testng-customsuite.xml
                    
                    WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
                    Hibernate: 
                        insert 
                        into
                            Node
                            (name, version) 
                        values
                            (?, ?)
                    FAILED: createNode
                    java.lang.NullPointerException
                         at org.jboss.seam.framework.Controller.debug(Controller.java:197)
                         at org.jboss.seam.framework.Home.createdMessage(Home.java:90)
                         at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:87)
                         at org.domain.forsterslist.session.NodeHomeTest$1.testComponents(NodeHomeTest.java:34)
                         at org.jboss.seam.mock.AbstractSeamTest$ComponentTest.run(AbstractSeamTest.java:162)
                         at org.domain.forsterslist.session.NodeHomeTest.createNode(NodeHomeTest.java:41)
                    ... Removed 22 stack frames
                    
                    ===============================================
                        org.domain.forsterslist.session.NodeHomeTest
                        Tests run: 1, Failures: 1, Skips: 0
                    ===============================================
                    
                    ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] schema export unsuccessful
                    java.sql.SQLException: You cannot set autocommit during a managed transaction!
                         at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWrapperManagedConnection.java:549)
                         at org.jboss.resource.adapter.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.java:328)
                         at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:60)
                         at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:252)
                         at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:221)
                         at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:839)
                         at org.hibernate.ejb.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:46)
                         at org.jboss.seam.persistence.EntityManagerFactory.shutdown(EntityManagerFactory.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.seam.util.Reflections.invoke(Reflections.java:22)
                         at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
                         at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
                         at org.jboss.seam.Component.callDestroyMethod(Component.java:2180)
                         at org.jboss.seam.Component.destroy(Component.java:1469)
                         at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:251)
                         at org.jboss.seam.contexts.Lifecycle.endApplication(Lifecycle.java:61)
                         at org.jboss.seam.contexts.ServletLifecycle.endApplication(ServletLifecycle.java:149)
                         at org.jboss.seam.contexts.ServletLifecycle.endApplication(ServletLifecycle.java:144)
                         at org.jboss.seam.mock.AbstractSeamTest.stopSeam(AbstractSeamTest.java:938)
                         at org.jboss.seam.mock.SeamTest.stopSeam(SeamTest.java:65)
                         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:316)
                         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)
                    
                    ===============================================
                    forstersList-test
                    Total tests run: 1, Failures: 1, Skips: 0
                    ===============================================
                    
                    
                    



                    I'll go back and try adding jboss-seam back in the class path again and see if i still get the same errors.


                    heres the test again (i removed the tx call for this


                    package org.domain.forsterslist.session;
                    
                    import org.domain.forsterslist.entity.Node;
                    import org.jboss.seam.mock.SeamTest;
                    import org.testng.annotations.Test;
                    
                    public class NodeHomeTest extends SeamTest
                    {
                         NodeHome nodeHome;
                         
                         @Test
                         public void createNode () throws Exception
                         {
                    
                    
                             new ComponentTest() 
                             {
                                  @Override
                                  protected void testComponents() throws Exception 
                                  {
                                       /*
                                       org.jboss.seam.transaction.Transaction tx = new org.jboss.seam.transaction.Transaction();
                                       tx.getTransaction().begin(); */
                    
                                       nodeHome = new NodeHome ();
                                       assert nodeHome.isIdDefined() == false;
                                       
                                       //trigger new create 
                                       Node myNode = nodeHome.getInstance();
                                       assert myNode != null;
                                       
                                       assert nodeHome.isManaged() == false;
                                       
                                       myNode.setName("will's node");
                                       nodeHome.persist();
                                       assert nodeHome.getId() != null;
                                       assert nodeHome.isManaged() == true;
                                       
                                       /* tx.instance().commit(); */
                                  }
                              
                             }.run();
                         }
                    }
                    



                    have included jboss-seam jar and the error when i run is - this clashes somewhere on the timer service - but i'm not sure where this would be loaded in embedded jboss before it tryes to run the jboss-seam jar for me.


                    [Parser] Running:
                      C:\Users\will\AppData\Local\Temp\testng-eclipse\testng-customsuite.xml
                    
                    ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Real: name=vfsjar:file:/C:/Users/will/eclipseWorkspace/forstersList-test/lib/jboss-seam.jar!/ state=PostClassLoader mode=Manual requiredState=Real
                    org.jboss.deployers.spi.DeploymentException: Error deploying jboss-seam.jar: Error creating ejb container TimerServiceDispatcher: Container jboss.j2ee:jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3,VMID=4e3bfafb605e4946:4b61221b:127dec51249:-8000 + is already registered
                         at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:158)
                         at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:88)
                         at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
                         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:19)
                         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: org.jboss.deployers.spi.DeploymentException: Error creating ejb container TimerServiceDispatcher: Container jboss.j2ee:jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3,VMID=4e3bfafb605e4946:4b61221b:127dec51249:-8000 + is already registered
                         at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:540)
                         at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:486)
                         at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:468)
                         at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:434)
                         at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:376)
                         at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:145)
                         ... 36 more
                    Caused by: java.lang.IllegalStateException: Container jboss.j2ee:jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3,VMID=4e3bfafb605e4946:4b61221b:127dec51249:-8000 + is already registered
                         at org.jboss.ejb3.Ejb3Registry.register(Ejb3Registry.java:128)
                         at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:536)
                         ... 41 more
                    FAILED CONFIGURATION: @BeforeSuite startSeam
                    org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                    
                    *** CONTEXTS IN ERROR: Name -> Error
                    
                    vfsjar:file:/C:/Users/will/eclipseWorkspace/forstersList-test/lib/jboss-seam.jar!/ -> java.lang.IllegalStateException: Container jboss.j2ee:jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3,VMID=4e3bfafb605e4946:4b61221b:127dec51249:-8000 + is already registered
                    
                    
                         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:19)
                         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: createNode
                    
                    ===============================================
                        org.domain.forsterslist.session.NodeHomeTest
                        Tests run: 1, Failures: 0, Skips: 1
                        Configuration Failures: 1, Skips: 4
                    ===============================================
                    
                    
                    ===============================================
                    forstersList-test
                    Total tests run: 1, Failures: 0, Skips: 1
                    Configuration Failures: 1, Skips: 5
                    ===============================================
                    
                    



                    • 7. Re: having problems with testNG and seam2.2.0GA JBoss tools
                      William Woodman Master

                      i've also  tried this


                      i edited the components.xml and added the line


                           <tx:entity-transaction entity-manager="#{entityManager}"></tx:entity-transaction>



                      i then tried the following case


                      package org.domain.forsterslist.session;
                      
                      import javax.persistence.EntityManager;
                      import javax.persistence.EntityTransaction;
                      
                      import org.domain.forsterslist.entity.Node;
                      import org.jboss.seam.annotations.In;
                      import org.jboss.seam.mock.SeamTest;
                      import org.testng.annotations.Test;
                      
                      public class NodeHomeTest extends SeamTest
                      {
                           NodeHome nodeHome;
                           
                      
                           @Test
                           public void createNode () throws Exception
                           {
                               
                                   new ComponentTest() 
                               {
                                    @Override
                                    protected void testComponents() throws Exception 
                                    {
                                         EntityManager em ;
                                         EntityTransaction tx;
                                         
                                         
                                         nodeHome = new NodeHome ();
                                         assert nodeHome.isIdDefined() == false;
                                         em = nodeHome.getEntityManager();
                      
                                         tx = nodeHome.getPersistenceContext().getTransaction();
                      
                                         assert em != null;
                                         assert tx != null ;
                                         tx.begin();
                                         
                                         em.joinTransaction();
                      
                                         nodeHome = new NodeHome ();
                                         assert nodeHome.isIdDefined() == false;
                                         
                                         //trigger new create 
                                         Node myNode = nodeHome.getInstance();
                                         assert myNode != null;
                                         
                                         assert nodeHome.isManaged() == false;
                                         
                                         myNode.setName("will's node");
                                         nodeHome.persist();
                                         assert nodeHome.getId() != null;
                                         assert nodeHome.isManaged() == true;
                      
                                         tx.commit();
                      
                                         
                               }
                                
                               }.run();
                           }
                      }
                      



                      which then errors with


                      [Parser] Running:
                        C:\Users\will\AppData\Local\Temp\testng-eclipse\testng-customsuite.xml
                      
                      WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
                      FAILED: createNode
                      java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction()
                           at org.hibernate.ejb.AbstractEntityManagerImpl.getTransaction(AbstractEntityManagerImpl.java:324)
                           at org.jboss.seam.persistence.EntityManagerProxy.getTransaction(EntityManagerProxy.java:112)
                           at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.getTransaction(FullTextEntityManagerImpl.java:177)
                           at org.jboss.seam.persistence.EntityManagerProxy.getTransaction(EntityManagerProxy.java:112)
                           at org.domain.forsterslist.session.NodeHomeTest$1.testComponents(NodeHomeTest.java:33)
                           at org.jboss.seam.mock.AbstractSeamTest$ComponentTest.run(AbstractSeamTest.java:162)
                           at org.domain.forsterslist.session.NodeHomeTest.createNode(NodeHomeTest.java:60)
                      ... Removed 22 stack frames
                      
                      ===============================================
                          org.domain.forsterslist.session.NodeHomeTest
                          Tests run: 1, Failures: 1, Skips: 0
                      ===============================================
                      
                      
                      ===============================================
                      forstersList-test
                      Total tests run: 1, Failures: 1, Skips: 0
                      ===============================================
                      
                      



                      if i try and comment out getting a transaction  i get the error


                      [Parser] Running:
                        C:\Users\will\AppData\Local\Temp\testng-eclipse\testng-customsuite.xml
                      
                      WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
                      FAILED: createNode
                      javax.persistence.TransactionRequiredException: no transaction is in progress
                           at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:301)
                           at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:92)
                           at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.flush(FullTextEntityManagerImpl.java:113)
                           at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:92)
                           at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:85)
                           at org.domain.forsterslist.session.NodeHomeTest$1.testComponents(NodeHomeTest.java:51)
                           at org.jboss.seam.mock.AbstractSeamTest$ComponentTest.run(AbstractSeamTest.java:162)
                           at org.domain.forsterslist.session.NodeHomeTest.createNode(NodeHomeTest.java:60)
                      ... Removed 22 stack frames
                      
                      ===============================================
                          org.domain.forsterslist.session.NodeHomeTest
                          Tests run: 1, Failures: 1, Skips: 0
                      ===============================================
                      
                      
                      ===============================================
                      forstersList-test
                      Total tests run: 1, Failures: 1, Skips: 0
                      ===============================================
                      
                      



                      it clearly needs a JTA transction and i cant get get one from seam - i cant connect seam in the embbeded test server to a transaction manager


                      i even tried


                      <tx:ejb-transaction/>



                      in components xml - and it didnt like that either.


                      help!




                      • 8. Re: having problems with testNG and seam2.2.0GA JBoss tools
                        William Woodman Master

                        okay went back to basics


                        created a new seam jboss tools project called aTest.


                        created simple entity via menu wizard called ATest.  If i run this bau in jboss it all works fine


                        i can login to the form http:.../aTest.seam create a value and save in the database.


                        next went into the aTest-test project and looked at whats generated for me.


                        code gen builds an aTest-test-ds.xml in the /META-INF folder which looks like this.


                        not sure why this put here - as documentation elsewhere says put it in the /bootstrap/deploy directory.  However when i step through the test manually with debugger, the class gets written by ORM to the database - so i guess it must be working.


                        I note that its sets the jndi name in the properties.


                        <?xml version="1.0" encoding="UTF-8"?>
                        <!-- Persistence deployment descriptor for dev profile -->
                        <persistence xmlns="http://java.sun.com/xml/ns/persistence" 
                                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
                                     version="1.0">
                                     
                           <persistence-unit name="aTest">
                              <provider>org.hibernate.ejb.HibernatePersistence</provider>
                              <jta-data-source>java:/aTestDatasource</jta-data-source>
                              <!-- The <jar-file> element is necessary if you put the persistence.xml in the WAR and the classes in the JAR -->
                              <!--
                              <jar-file>../../vehicles.jar</jar-file>
                              -->
                              <properties>
                                 <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
                                 <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
                                 <property name="hibernate.show_sql" value="true"/>
                                 <property name="hibernate.format_sql" value="true"/>
                                 <property name="jboss.entity.manager.factory.jndi.name" value="java:/aTestEntityManagerFactory"/>
                              </properties>
                           </persistence-unit>
                            
                        </persistence>
                        



                        there is nothing in the components.xml relating to transaction management


                        heres is the components.xml as seen via the referenced libraries section which includes the WebContent Folder from the web project as a referenced folder.


                        <?xml version="1.0" encoding="UTF-8"?>
                        <components xmlns="http://jboss.com/products/seam/components"
                                    xmlns:core="http://jboss.com/products/seam/core"
                                    xmlns:persistence="http://jboss.com/products/seam/persistence"
                                    xmlns:drools="http://jboss.com/products/seam/drools"
                                    xmlns:bpm="http://jboss.com/products/seam/bpm"
                                    xmlns:security="http://jboss.com/products/seam/security"
                                    xmlns:mail="http://jboss.com/products/seam/mail"
                                    xmlns:web="http://jboss.com/products/seam/web"
                                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                    xsi:schemaLocation=
                                        "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd
                                         http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd
                                         http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd
                                         http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd
                                         http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd
                                         http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd
                                         http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd
                                         http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd">
                        
                           <core:init debug="true" jndi-pattern="@jndiPattern@"/>
                        
                           <core:manager concurrent-request-timeout="500"
                                         conversation-timeout="120000"
                                         conversation-id-parameter="cid"
                                         parent-conversation-id-parameter="pid"/>
                        
                           <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
                           <web:hot-deploy-filter url-pattern="*.seam"/>
                        
                           <persistence:managed-persistence-context name="entityManager" auto-create="true"
                                              persistence-unit-jndi-name="java:/aTestEntityManagerFactory"/>
                        
                           <drools:rule-base name="securityRules">
                              <drools:rule-files>
                                 <value>/security.drl</value>
                              </drools:rule-files>
                           </drools:rule-base>
                        
                           <security:rule-based-permission-resolver security-rules="#{securityRules}"/>
                        
                           <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>
                        
                           <event type="org.jboss.seam.security.notLoggedIn">
                              <action execute="#{redirect.captureCurrentView}"/>
                           </event>
                           <event type="org.jboss.seam.security.loginSuccessful">
                              <action execute="#{redirect.returnToCapturedView}"/>
                           </event>
                        
                           <mail:mail-session host="localhost" port="25"/>
                        
                           <!-- For use with jBPM pageflow or process management -->
                           <!--
                           <bpm:jbpm>
                              <bpm:process-definitions></bpm:process-definitions>
                              <bpm:pageflow-definitions></bpm:pageflow-definitions>
                           </bpm:jbpm>
                           -->
                        
                        </components>
                        



                        so far this is all as generated by the wizard.


                        then i add a new test as follows, and create a testNG launch config for it in eclipse.  The purpose of this this test is to try and drive the aTestHome component prefiously generated by the jboss tool new entity wizard.


                        package org.domain.atest.session;
                        
                        import javax.persistence.EntityManager;
                        import javax.persistence.EntityTransaction;
                        
                        import org.domain.atest.entity.ATest;
                        import org.jboss.seam.mock.SeamTest;
                        import org.testng.annotations.Test;
                        
                        public class TestATestComp extends SeamTest
                        {
                        
                             @Test
                             public void createATest () throws Exception
                             {
                                 
                                     new ComponentTest() 
                                 {
                                      @Override
                                      //@Transactional (TransactionPropagationType.REQUIRED)
                                      //@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
                                      protected void testComponents() throws Exception 
                                      {
                                           EntityManager em ;
                                           EntityTransaction tx;
                                           ATestHome myHome;
                                           
                                           
                                           myHome = new ATestHome ();
                                           assert myHome.isIdDefined() == false;
                                           em = myHome.getEntityManager();
                        
                                           assert em != null;
                                           ATest myATest = myHome.getInstance();
                                           assert myATest != null;
                                           
                                           assert myHome.isManaged() == false;
                                           
                                           myATest.setName("will's test");
                                           myHome.persist();
                                           assert myHome.getId() != null;
                                           assert myHome.isManaged() == true;
                                           
                                 }
                                  
                                 }.run();
                             }
                        }
                        
                        
                        



                        This all works fine when i step through until i hit the myHome.persist() method which then throws an exception. 


                        [Parser] Running:
                          C:\Users\will\AppData\Local\Temp\testng-eclipse\testng-customsuite.xml
                        
                        WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
                        FAILED: createATest
                        javax.persistence.TransactionRequiredException: no transaction is in progress
                             at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:301)
                             at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:92)
                             at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.flush(FullTextEntityManagerImpl.java:113)
                             at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:92)
                             at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:85)
                             at org.domain.atest.session.TestATestComp$1.testComponents(TestATestComp.java:40)
                             at org.jboss.seam.mock.AbstractSeamTest$ComponentTest.run(AbstractSeamTest.java:162)
                             at org.domain.atest.session.TestATestComp.createATest(TestATestComp.java:46)
                        ... Removed 22 stack frames
                        
                        ===============================================
                            org.domain.atest.session.TestATestComp
                            Tests run: 1, Failures: 1, Skips: 0
                        ===============================================
                        
                        
                        ===============================================
                        aTest-test
                        Total tests run: 1, Failures: 1, Skips: 0
                        ===============================================
                        
                        
                        



                        so my question is why doesnt the SeamTest create me a seam managed transaction??


                        its worth noting that as generated by jboss tools - if you look in the referenced libraries section there is no jboss-seam.jar in the references, nor is there in the xxx-test/lib folder.


                        not sure if thats a problem of not - but the template does not include this jar.  Though as the database tables gets generated i am presuming its picked up via the dependent project link which includes atest-ejb project, which itself includes the EAR libraries which have jboss-seam.jar in that list.


                        Can anyone help me please - i want to write integration tests for my code and cant seem get past this most basic of hurdles.


                         

                        • 9. Re: having problems with testNG and seam2.2.0GA JBoss tools
                          William Woodman Master

                          okay


                          tried another tack -


                          built test by doing full UI simulation - and that works.  So something in the AbstractSeamTest class bootstraps seam and somehow gets the http session behaviour working.


                          I then went back to the earlier test which just provides ComponentTest class.  I think my probel with no seam transaction seems to stem from this intermediate approach.


                          what i wanted to do was test my ejb project code without having to build full ui test cases


                          not sure how to do that - I though the ComponentTest would do that, but something isnt working, dont know what.


                          I create a factory in components.xml for aTest as

                          <factory name="aTest" value="#{aTestHome.instance}"/>



                          heres the revised test - first method uses full UI build, second test uses the ComponentTest approach - this so far as i can see is exactly like the example in the seam pdf.


                          package org.domain.atest.session;
                          
                          import javax.persistence.EntityManager;
                          
                          import org.jboss.seam.mock.SeamTest;
                          import org.testng.annotations.AfterSuite;
                          import org.testng.annotations.BeforeSuite;
                          import org.testng.annotations.Test;
                          
                          public class TestATestComp extends SeamTest
                          {
                          
                               @Test  //fails
                               public void createATest () throws Exception
                               {
                              
                                       new ComponentTest() 
                                   {
                                        @Override
                                        protected void testComponents() throws Exception 
                                        {
                                             
                                             setValue ("#{aTest.name}", "wills test");
                                             invokeMethod ("#{aTestHome.persist}");
                                             String res = (String)getValue ("#{aTest.name");
                                             
                                   }
                                    
                                   }.run();
                               } 
                               
                               @Test  //passes
                               public void getTest () throws Exception
                               {
                                    new FacesRequest("/aTest.xhtml")
                                    {
                                         @Override
                                         protected void updateModelValues () throws Exception
                                         {
                                              setValue ("#{aTestHome.instance.name}", "wills test");
                                         }
                                         
                                         @Override
                                         protected void invokeApplication () throws Exception
                                         {
                                              String res = (String) invokeMethod ("#{aTestHome.persist}");
                                              assert res == "persisted";
                                         }
                                         
                                         @Override
                                         protected void renderResponse () throws Exception
                                         {
                                              assert getValue ("#{aTestHome.instance.name}").equals("wills test");
                                              ATestHome myHome = (ATestHome) getValue ( "#{aTestHome}");
                                              assert myHome.isManaged() == true;
                                              EntityManager em = myHome.getEntityManager();
                                         }
                                         
                                    }.run ();
                                    
                                    
                                    
                               }
                               
                               
                          
                          }
                          
                          
                          



                          thje first test is just like section 37.2 in seam pdf.  but fails



                          stack trace is - moans about the stack must not be full.  Which when i look into the trace is something about the conversation stack


                          what i seem to see is that you have to write full ui integration tests - despite their being a lot more text to type, in order to get all the necessary framework parts in order.


                          surely theres a way to just test the EJB and injection components ??


                          [Parser] Running:
                            C:\Users\will\AppData\Local\Temp\testng-eclipse\testng-customsuite.xml
                          
                          WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
                          Hibernate: 
                              insert 
                              into
                                  ATest
                                  (name, version) 
                              values
                                  (?, ?)
                          PASSED: getTest
                          FAILED: createATest
                          org.jboss.seam.InstantiationException: Could not instantiate Seam component: aTestHome
                               at org.jboss.seam.Component.newInstance(Component.java:2144)
                               at org.jboss.seam.Component.getInstance(Component.java:2021)
                               at org.jboss.seam.Component.getInstance(Component.java:1983)
                               at org.jboss.seam.Component.getInstance(Component.java:1977)
                               at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
                               at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
                               at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:148)
                               at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:51)
                               at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
                               at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                               at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
                               at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                               at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:112)
                               at org.jboss.seam.Component.getInstanceFromFactory(Component.java:2068)
                               at org.jboss.seam.Component.getInstance(Component.java:2011)
                               at org.jboss.seam.Component.getInstance(Component.java:1983)
                               at org.jboss.seam.Component.getInstance(Component.java:1977)
                               at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
                               at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
                               at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:148)
                               at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:51)
                               at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
                               at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                               at org.jboss.el.parser.AstValue.getTarget(AstValue.java:34)
                               at org.jboss.el.parser.AstValue.setValue(AstValue.java:83)
                               at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
                               at org.jboss.seam.core.Expressions$1.setValue(Expressions.java:117)
                               at org.jboss.seam.mock.AbstractSeamTest$ComponentTest.setValue(AbstractSeamTest.java:152)
                               at org.domain.atest.session.TestATestComp$1.testComponents(TestATestComp.java:23)
                               at org.jboss.seam.mock.AbstractSeamTest$ComponentTest.run(AbstractSeamTest.java:162)
                               at org.domain.atest.session.TestATestComp.createATest(TestATestComp.java:29)
                          Caused by: java.lang.IllegalArgumentException: Stack must not be null
                               at org.jboss.seam.core.ConversationEntry.<init>(ConversationEntry.java:45)
                               at org.jboss.seam.core.ConversationEntries.createConversationEntry(ConversationEntries.java:53)
                               at org.jboss.seam.core.Manager.createConversationEntry(Manager.java:664)
                               at org.jboss.seam.core.Manager.beginConversation(Manager.java:685)
                               at org.jboss.seam.core.ConversationInterceptor.beginConversation(ConversationInterceptor.java:229)
                               at org.jboss.seam.core.ConversationInterceptor.beginConversationIfNecessary(ConversationInterceptor.java:166)
                               at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:57)
                               at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                               at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:97)
                               at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
                               at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:91)
                               at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                               at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
                               at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                               at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                               at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
                               at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
                               at org.domain.atest.session.ATestHome_$$_javassist_seam_2.create(ATestHome_$$_javassist_seam_2.java)
                               at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
                               at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
                               at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
                               at org.jboss.seam.Component.callCreateMethod(Component.java:2172)
                               at org.jboss.seam.Component.newInstance(Component.java:2132)
                               ... 52 more
                          ... Removed 26 stack frames
                          
                          ===============================================
                              org.domain.atest.session.TestATestComp
                              Tests run: 2, Failures: 1, Skips: 0
                          ===============================================
                          
                          
                          ===============================================
                          aTest-test
                          Total tests run: 2, Failures: 1, Skips: 0
                          ===============================================