7 Replies Latest reply on Mar 20, 2008 5:27 PM by benmoore

    seam-gen 2.0.1 does not generate runnable TestNG tests

    benmoore

      Hi,


      Following section 2.3 of the seam manual word-for-word, the TestNG test doesn't succeed out-of-the-box.


      The test fails with the following exception:


         [testng] Caused by: java.lang.NullPointerException
         [testng]     at org.jboss.helloworld.PingBean.ping(PingBean.java:22)
         [testng]     at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.
      java:121)
      ...



      This uses JBoss 4.2.2 GA with HSQL (although the database isn't used yet; see section 2.3). I run the test with seam-gen test and ant test, but get the same results. I've not tried the test with the Ecliipse plugin--seems a little pointless right now.


      According to the stack trace, line 22 of PingBean throws an NPE. Line 22 is:



      facesMessages.add("ping");



      so it looks like facesMessages isn't getting injected. What am I doing wrong? Has anyone been able to get this to work?


      Thank you for any insights,
      Bill

        • 1. Re: seam-gen 2.0.1 does not generate runnable TestNG tests
          pmuir

          Post the whole log.

          • 2. Re: seam-gen 2.0.1 does not generate runnable TestNG tests
            pmuir

            Btw I just tested this and it worked fine for me

            • 3. Re: seam-gen 2.0.1 does not generate runnable TestNG tests
              benmoore

              Hi Pete,


              Thanks for the reply. I was getting anxious that I wouldn't hear from anybody. I'm at a complete loss as to what to try next because I've done everything specified in the manual with all defaults. Not being able to get a simple TestNG working is incredibly frustrating. Here's the whole log from ant test:


              Buildfile: build.xml
              
              compiletest:
              
              copytestclasses:
              
              buildtest:
                   [copy] Copying 1 file to C:\projects\myproject\test-build\META-INF
                   [copy] Copying 1 file to C:\projects\myproject\test-build
              
              test:
                 [testng] [Parser] Running:
                 [testng]   C:\projects\myproject\test-build\PingTest.xml
                 [testng] 
                 [testng] [TestRunner] Running the tests in 'Ping Test' with parallel mode:false
                 [testng] [RunInfo] Adding method selector: org.testng.internal.XmlMethodSelector@45224522 priority: 10
                 [testng] [TestClass] Creating TestClass for [ClassImpl com.mydomain.myproject.test.PingTest]
                 [testng] [TestClass] Adding method com.mydomain.myproject.test.PingTest.test() on TestClass class com.mydomain.myproject.test.PingTest
                 [testng] [XmlMethodSelector] Including method org.jboss.seam.mock.init()
                 [testng] [XmlMethodSelector] Including method org.jboss.seam.mock.cleanup()
                 [testng] [XmlMethodSelector] Including method org.jboss.seam.mock.begin()
                 [testng] [XmlMethodSelector] Including method org.jboss.seam.mock.end()
                 [testng] [XmlMethodSelector] Including method com.mydomain.myproject.test.test()
                 [testng] [SuiteRunner] Created 1 TestRunners
                 [testng] [TestRunner] Running test Ping Test on 1  classes,  included groups:[] excluded groups:[]
                 [testng] [TestClass] 
                 [testng] ======
                 [testng] TESTCLASS: com.mydomain.myproject.test.PingTest
                 [testng] [TestClass] BeforeClass : org.jboss.seam.mock.SeamTest.init()
                 [testng] [TestClass] BeforeMethod:     org.jboss.seam.mock.SeamTest.begin()
                 [testng] [TestClass] Test        :          com.mydomain.myproject.test.PingTest.test()
                 [testng] [TestClass] AfterMethod :     org.jboss.seam.mock.SeamTest.end()
                 [testng] [TestClass] AfterClass  : org.jboss.seam.mock.SeamTest.cleanup()
                 [testng] [TestClass] 
                 [testng] ======
                 [testng] 
                 [testng] [TestRunner] WILL BE RUN IN RANDOM ORDER:
                 [testng] [TestRunner]   com.mydomain.myproject.test.PingTest.test()
                 [testng] [TestRunner] WILL BE RUN SEQUENTIALLY:
                 [testng] [TestRunner] ===
                 [testng] [TestRunner] Found 1 applicable methods
                 [testng] [Invoker 22413654]         Keeping method org.jboss.seam.mock.SeamTest.init() for class [TestClass class com.mydomain.myproject.test.PingTest]
                 [testng] [Invoker 22413654] Invoking @BeforeClass org.jboss.seam.mock.SeamTest.init()
                 [testng] INFO  [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
                 [testng] INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {}
                 [testng] INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
                 [testng] INFO  [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
                 [testng] INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {}
                 [testng] INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
                 [testng] [Invoker 22413654] Keeping method org.jboss.seam.mock.SeamTest.begin() for class [TestClass class com.mydomain.myproject.test.PingTest]
                 [testng] [Invoker 22413654] Keeping method org.jboss.seam.mock.SeamTest.end() for class [TestClass class com.mydomain.myproject.test.PingTest]
                 [testng] [Invoker 22413654]         Keeping method org.jboss.seam.mock.SeamTest.begin() for class [TestClass class com.mydomain.myproject.test.PingTest]
                 [testng] [Invoker 22413654] Invoking @BeforeMethod org.jboss.seam.mock.SeamTest.begin()
                 [testng] [Invoker 22413654] Invoking com.mydomain.myproject.test.PingTest.test
                 [testng] INFO  [com.mydomain.myproject.PingBean] ping.ping() action called
                 [testng] ERROR [org.jboss.aspects.tx.TxPolicy] javax.ejb.EJBTransactionRolledbackException
                 [testng] [Invoker 22413654]         Keeping method org.jboss.seam.mock.SeamTest.end() for class [TestClass class com.mydomain.myproject.test.PingTest]
                 [testng] [Invoker 22413654] Invoking @AfterMethod org.jboss.seam.mock.SeamTest.end()
                 [testng] [Invoker 22413654]         Keeping method org.jboss.seam.mock.SeamTest.cleanup() for class [TestClass class com.mydomain.myproject.test.PingTest]
                 [testng] [Invoker 22413654] Invoking @AfterClass org.jboss.seam.mock.SeamTest.cleanup()
                 [testng] 
                 [testng] *********** INVOKED METHODS
                 [testng] 
                 [testng]      org.jboss.seam.mock.SeamTest.init() 1246513740
                 [testng]           com.mydomain.myproject.test.PingTest.test() 1246513740
                 [testng]      org.jboss.seam.mock.SeamTest.cleanup() 1246513740
                 [testng] 
                 [testng] ***********
                 [testng] 
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\Ping Test.html
                 [testng] FAILED: test
                 [testng] java.lang.AssertionError: javax.el.ELException: javax.ejb.EJBTransactionRolledbackException
                 [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.onException(BaseSeamTest.java:488)
                 [testng]      at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:537)
                 [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                 [testng]      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                 [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 [testng]      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                 [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 [testng]      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                 [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 [testng]      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                 [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 [testng]      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                 [testng]      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                 [testng]      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                 [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 [testng]      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                 [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 [testng]      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                 [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.run(BaseSeamTest.java:524)
                 [testng]      at com.mydomain.myproject.test.PingTest.test(PingTest.java:12)
                 [testng] Caused by: javax.el.ELException: javax.ejb.EJBTransactionRolledbackException
                 [testng]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:333)
                 [testng]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
                 [testng]      at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
                 [testng]      at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
                 [testng]      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
                 [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.invokeMethod(BaseSeamTest.java:496)
                 [testng]      at com.mydomain.myproject.test.PingTest$1.invokeApplication(PingTest.java:16)
                 [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.invokeApplicationPhase(BaseSeamTest.java:660)
                 [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.emulateJsfLifecycle(BaseSeamTest.java:609)
                 [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.access$300(BaseSeamTest.java:184)
                 [testng]      at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:530)
                 [testng]      ... 40 more
                 [testng] Caused by: javax.ejb.EJBTransactionRolledbackException
                 [testng]      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:91)
                 [testng]      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
                 [testng]      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 [testng]      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 [testng]      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:64)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 [testng]      at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 [testng]      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:166)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 [testng]      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 [testng]      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 [testng]      at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:249)
                 [testng]      at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214)
                 [testng]      at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:86)
                 [testng]      at $Proxy62.ping(Unknown Source)
                 [testng]      at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                 [testng]      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                 [testng]      at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
                 [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                 [testng]      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                 [testng]      at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
                 [testng]      at org.javassist.tmp.java.lang.Object_$$_javassist_1.ping(Object_$$_javassist_1.java)
                 [testng]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
                 [testng]      ... 50 more
                 [testng] Caused by: java.lang.NullPointerException
                 [testng]      at com.mydomain.myproject.PingBean.ping(PingBean.java:22)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:121)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:110)
                 [testng]      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
                 [testng]      at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 [testng]      at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 [testng]      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
                 [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 [testng]      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                 [testng]      ... 84 more
                 [testng] ... Removed 34 stack frames
                 [testng] 
                 [testng] ===============================================
                 [testng]     Ping Test
                 [testng]     Tests run: 1, Failures: 1, Skips: 0
                 [testng] ===============================================
                 [testng] 
                 [testng] 
                 [testng] ===============================================
                 [testng] Ping Tests
                 [testng] Total tests run: 1, Failures: 1, Skips: 0
                 [testng] ===============================================
                 [testng] 
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\toc.html
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\Ping Test.properties
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\index.html
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\main.html
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\groups.html
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\methods.html
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\methods-alphabetical.html
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\classes.html
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\reporter-output.html
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\methods-not-run.html
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\testng.xml.html
                 [testng] Creating C:\projects\myproject\test-report\index.html
                 [testng] Creating C:\projects\myproject\test-report\testng-failed.xml
                 [testng] Creating C:\projects\myproject\test-report\Ping Tests\testng-failed.xml
                 [testng] Creating C:\projects\myproject\test-report\testng-results.xml
              
              BUILD SUCCESSFUL
              Total time: 21 seconds



              • 4. Re: seam-gen 2.0.1 does not generate runnable TestNG tests
                pmuir

                It looks like Embedded is starting up. Can you enable INFO logging in bootstrap/log4j.xml for org.jboss and see if it does?

                • 5. Re: seam-gen 2.0.1 does not generate runnable TestNG tests
                  benmoore

                  Hi Pete,


                  Here's the log with the org.jboss category set to INFO. I'm not really sure what to look for. The root exception still shows PingBean line 22 as the problem (null pointer exception). As I wrote earlier, this would imply that facesMessages isn't being injected.


                  Buildfile: build.xml
                  
                  compiletest:
                  
                  copytestclasses:
                  
                  buildtest:
                       [copy] Copying 1 file to C:\projects\myproject\test-build\META-INF
                       [copy] Copying 1 file to C:\projects\myproject\test-build
                  
                  test:
                     [testng] [Parser] Running:
                     [testng]   C:\projects\myproject\test-build\PingTest.xml
                     [testng] 
                     [testng] [TestRunner] Running the tests in 'Ping Test' with parallel mode:false
                     [testng] [RunInfo] Adding method selector: org.testng.internal.XmlMethodSelector@45224522 priority: 10
                     [testng] [TestClass] Creating TestClass for [ClassImpl com.mydomain.myproject.test.PingTest]
                     [testng] [TestClass] Adding method com.mydomain.myproject.test.PingTest.test() on TestClass class com.mydomain.myproject.test.PingTest
                     [testng] [XmlMethodSelector] Including method org.jboss.seam.mock.init()
                     [testng] [XmlMethodSelector] Including method org.jboss.seam.mock.cleanup()
                     [testng] [XmlMethodSelector] Including method org.jboss.seam.mock.begin()
                     [testng] [XmlMethodSelector] Including method org.jboss.seam.mock.end()
                     [testng] [XmlMethodSelector] Including method com.mydomain.myproject.test.test()
                     [testng] [SuiteRunner] Created 1 TestRunners
                     [testng] [TestRunner] Running test Ping Test on 1  classes,  included groups:[] excluded groups:[]
                     [testng] [TestClass] 
                     [testng] ======
                     [testng] TESTCLASS: com.mydomain.myproject.test.PingTest
                     [testng] [TestClass] BeforeClass : org.jboss.seam.mock.SeamTest.init()
                     [testng] [TestClass] BeforeMethod:     org.jboss.seam.mock.SeamTest.begin()
                     [testng] [TestClass] Test        :          com.mydomain.myproject.test.PingTest.test()
                     [testng] [TestClass] AfterMethod :     org.jboss.seam.mock.SeamTest.end()
                     [testng] [TestClass] AfterClass  : org.jboss.seam.mock.SeamTest.cleanup()
                     [testng] [TestClass] 
                     [testng] ======
                     [testng] 
                     [testng] [TestRunner] WILL BE RUN IN RANDOM ORDER:
                     [testng] [TestRunner]   com.mydomain.myproject.test.PingTest.test()
                     [testng] [TestRunner] WILL BE RUN SEQUENTIALLY:
                     [testng] [TestRunner] ===
                     [testng] [TestRunner] Found 1 applicable methods
                     [testng] [Invoker 22413654]         Keeping method org.jboss.seam.mock.SeamTest.init() for class [TestClass class com.mydomain.myproject.test.PingTest]
                     [testng] [Invoker 22413654] Invoking @BeforeClass org.jboss.seam.mock.SeamTest.init()
                     [testng] WARN  [org.jboss.mx.loading.UnifiedLoaderRepository3] Tried to add non-URLClassLoader.  Ignored
                     [testng] WARN  [org.jboss.aop.deployment.AspectManagerService] Could not find base-aspects.xml file in the resources of sun.misc.Launcher$AppClassLoader@5b9c5b9c
                     [testng] INFO  [org.jboss.aop.deployers.AspectDeployer] Deploying xml into org.jboss.aop.AspectManager@33ce33ce for sun.misc.Launcher$AppClassLoader@5b9c5b9c
                     [testng] INFO  [org.jboss.resource.deployers.RARDeployment] Required license terms exist, view vfsfile:/C:/projects/myproject/bootstrap/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
                     [testng] INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
                     [testng] INFO  [org.jboss.resource.deployers.RARDeployment] Required license terms exist, view vfsfile:/C:/projects/myproject/bootstrap/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
                     [testng] INFO  [org.jboss.resource.deployers.RARDeployment] Required license terms exist, view vfsfile:/C:/projects/myproject/bootstrap/deploy/jms-ra.rar/META-INF/ra.xml
                     [testng] WARN  [org.jboss.jms.server.security.SecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
                     [testng] INFO  [org.jboss.jms.server.ServerPeer] JBoss Messaging 1.4.0.SP1 server [0] started
                     [testng] INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] Connector bisocket://RB85D4:4457 has leasing enabled, lease period 10000 milliseconds
                     [testng] INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@a200a20 started
                     [testng] INFO  [org.jboss.jms.server.destination.QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
                     [testng] INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] Connector bisocket://RB85D4:4457 has leasing enabled, lease period 10000 milliseconds
                     [testng] INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@e900e90 started
                     [testng] WARN  [org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
                     [testng] WARN  [org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
                     [testng] INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] Connector bisocket://RB85D4:4457 has leasing enabled, lease period 10000 milliseconds
                     [testng] INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@7e127e12 started
                     [testng] INFO  [org.jboss.jms.server.destination.QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
                     [testng] INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
                     [testng] INFO  [org.jboss.ejb3.deployers.PersistenceUnitParsingDeployer] Found persistence units [org.jboss.ejb3.metadata.jpa.spec.PersistenceUnitMetaData@58f058f0{name=myproject}]
                     [testng] WARN  [org.jboss.xb.builder.runtime.CollectionPropertyHandler] ClassInfo.getDeclaredConstructor(null) didn't work for org.jboss.metadata.ejb.spec.InterceptorClassesMetaData, found the default ctor in ClassInfo.getDeclaredConstructors()
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction] installing bean: persistence.units:jar=test-build.jar,unitName=myproject with dependencies:
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction]   and supplies:
                     [testng] INFO  [org.jboss.ejb3.entity.PersistenceUnitDeployment] Starting persistence unit persistence.units:jar=test-build.jar,unitName=myproject
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction] installing bean: jboss.j2ee:jar=test-build,name=PingBean,service=EJB3 with dependencies:
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction]   and supplies:
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction]      Class:com.mydomain.myproject.Ping
                     [testng] INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: com.mydomain.myproject.PingBean ejbName: PingBean
                     [testng] WARN  [org.jboss.ejb3.timerservice.jboss.JBossTimerServiceFactory] TIMER SERVICE IS NOT INSTALLED
                     [testng] WARN  [org.jboss.xb.builder.runtime.CollectionPropertyHandler] ClassInfo.getDeclaredConstructor(null) didn't work for org.jboss.metadata.ejb.spec.InterceptorClassesMetaData, found the default ctor in ClassInfo.getDeclaredConstructors()
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction] installing bean: jboss.j2ee:jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3 with dependencies:
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction]   and supplies:
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction]      Class:org.jboss.seam.async.LocalTimerServiceDispatcher
                     [testng] INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: org.jboss.seam.async.TimerServiceDispatcher ejbName: TimerServiceDispatcher
                     [testng] WARN  [org.jboss.ejb3.timerservice.jboss.JBossTimerServiceFactory] TIMER SERVICE IS NOT INSTALLED
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction] installing bean: jboss.j2ee:jar=jboss-seam.jar,name=EjbSynchronizations,service=EJB3 with dependencies:
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction]   and supplies:
                     [testng] INFO  [org.jboss.ejb3.MCKernelAbstraction]      Class:org.jboss.seam.transaction.LocalEjbSynchronizations
                     [testng] INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: org.jboss.seam.transaction.EjbSynchronizations ejbName: EjbSynchronizations
                     [testng] INFO  [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
                     [testng] INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {}
                     [testng] INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
                     [testng] INFO  [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
                     [testng] INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {}
                     [testng] INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
                     [testng] [Invoker 22413654] Keeping method org.jboss.seam.mock.SeamTest.begin() for class [TestClass class com.mydomain.myproject.test.PingTest]
                     [testng] [Invoker 22413654] Keeping method org.jboss.seam.mock.SeamTest.end() for class [TestClass class com.mydomain.myproject.test.PingTest]
                     [testng] [Invoker 22413654]         Keeping method org.jboss.seam.mock.SeamTest.begin() for class [TestClass class com.mydomain.myproject.test.PingTest]
                     [testng] [Invoker 22413654] Invoking @BeforeMethod org.jboss.seam.mock.SeamTest.begin()
                     [testng] [Invoker 22413654] Invoking com.mydomain.myproject.test.PingTest.test
                     [testng] INFO  [com.mydomain.myproject.PingBean] ping.ping() action called
                     [testng] ERROR [org.jboss.aspects.tx.TxPolicy] javax.ejb.EJBTransactionRolledbackException
                     [testng] [Invoker 22413654]         Keeping method org.jboss.seam.mock.SeamTest.end() for class [TestClass class com.mydomain.myproject.test.PingTest]
                     [testng] [Invoker 22413654] Invoking @AfterMethod org.jboss.seam.mock.SeamTest.end()
                     [testng] [Invoker 22413654]         Keeping method org.jboss.seam.mock.SeamTest.cleanup() for class [TestClass class com.mydomain.myproject.test.PingTest]
                     [testng] [Invoker 22413654] Invoking @AfterClass org.jboss.seam.mock.SeamTest.cleanup()
                     [testng] 
                     [testng] *********** INVOKED METHODS
                     [testng] 
                     [testng]      org.jboss.seam.mock.SeamTest.init() 1246513740
                     [testng]           com.mydomain.myproject.test.PingTest.test() 1246513740
                     [testng]      org.jboss.seam.mock.SeamTest.cleanup() 1246513740
                     [testng] 
                     [testng] ***********
                     [testng] 
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\Ping Test.html
                     [testng] FAILED: test
                     [testng] java.lang.AssertionError: javax.el.ELException: javax.ejb.EJBTransactionRolledbackException
                     [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.onException(BaseSeamTest.java:488)
                     [testng]      at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:537)
                     [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                     [testng]      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                     [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                     [testng]      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                     [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                     [testng]      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                     [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                     [testng]      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                     [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                     [testng]      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                     [testng]      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                     [testng]      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                     [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                     [testng]      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                     [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                     [testng]      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                     [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.run(BaseSeamTest.java:524)
                     [testng]      at com.mydomain.myproject.test.PingTest.test(PingTest.java:18)
                     [testng] Caused by: javax.el.ELException: javax.ejb.EJBTransactionRolledbackException
                     [testng]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:333)
                     [testng]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
                     [testng]      at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
                     [testng]      at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
                     [testng]      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
                     [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.invokeMethod(BaseSeamTest.java:496)
                     [testng]      at com.mydomain.myproject.test.PingTest$1.invokeApplication(PingTest.java:16)
                     [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.invokeApplicationPhase(BaseSeamTest.java:660)
                     [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.emulateJsfLifecycle(BaseSeamTest.java:609)
                     [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.access$300(BaseSeamTest.java:184)
                     [testng]      at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:530)
                     [testng]      ... 40 more
                     [testng] Caused by: javax.ejb.EJBTransactionRolledbackException
                     [testng]      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:91)
                     [testng]      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
                     [testng]      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                     [testng]      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                     [testng]      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:64)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                     [testng]      at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                     [testng]      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:166)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                     [testng]      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                     [testng]      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                     [testng]      at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:249)
                     [testng]      at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214)
                     [testng]      at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:86)
                     [testng]      at $Proxy62.ping(Unknown Source)
                     [testng]      at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                     [testng]      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                     [testng]      at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
                     [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                     [testng]      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                     [testng]      at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
                     [testng]      at org.javassist.tmp.java.lang.Object_$$_javassist_1.ping(Object_$$_javassist_1.java)
                     [testng]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
                     [testng]      ... 50 more
                     [testng] Caused by: java.lang.NullPointerException
                     [testng]      at com.mydomain.myproject.PingBean.ping(PingBean.java:22)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:121)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:110)
                     [testng]      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
                     [testng]      at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                     [testng]      at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                     [testng]      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
                     [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                     [testng]      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                     [testng]      ... 84 more
                     [testng] ... Removed 34 stack frames
                     [testng] 
                     [testng] ===============================================
                     [testng]     Ping Test
                     [testng]     Tests run: 1, Failures: 1, Skips: 0
                     [testng] ===============================================
                     [testng] 
                     [testng] 
                     [testng] ===============================================
                     [testng] Ping Tests
                     [testng] Total tests run: 1, Failures: 1, Skips: 0
                     [testng] ===============================================
                     [testng] 
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\toc.html
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\Ping Test.properties
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\index.html
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\main.html
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\groups.html
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\methods.html
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\methods-alphabetical.html
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\classes.html
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\reporter-output.html
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\methods-not-run.html
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\testng.xml.html
                     [testng] Creating C:\projects\myproject\test-report\index.html
                     [testng] Creating C:\projects\myproject\test-report\testng-failed.xml
                     [testng] Creating C:\projects\myproject\test-report\Ping Tests\testng-failed.xml
                     [testng] Creating C:\projects\myproject\test-report\testng-results.xml
                  
                  BUILD SUCCESSFUL
                  Total time: 13 seconds



                  • 6. Re: seam-gen 2.0.1 does not generate runnable TestNG tests
                    benmoore

                    I also changed org.jboss.seam to INFO (it's set to WARN by default) and posted the log here (the wiki complains it's too long to be posted here). One thing that's alarming are these messages. Does this mean jboss-seam.jar is in the classpath twice?



                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.locale
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.security.identity
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.persistence.persistenceProvider
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.parameters
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.resourceLoader
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.expressions
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.transaction.synchronizations
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.manager
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.locale
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.userPrincipal
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.isUserInRole
                       [testng] INFO  [org.jboss.seam.init.Initialization] two components with same name, higher precedence wins: org.jboss.seam.bpm.businessProcess
                    



                    • 7. Re: seam-gen 2.0.1 does not generate runnable TestNG tests
                      benmoore

                      Pete, can you post your project as zip archive somewhere? e.g., http://megaupload.com/ or anything like that? I'd like to try it here.