1 Reply Latest reply on May 26, 2006 5:13 AM by Marco

    EJB3.0 & latest seam prblem when testing

    Marco Novice

      hi all,
      i am writing junit tests for a small jboss-seam application..and i am using Maven2 an testng plugin version 4.7 to run the tests.

      i have taken embedded-ejb config files and jars from seam CVS, and when ir un my test here's the log that i am getting.....

      2006-05-25 13:51:56,250 DEBUG org.hibernate.hql.ast.ErrorCounter [main] - throwQueryException() : no errors
      2006-05-25 13:51:56,250 DEBUG org.hibernate.hql.ast.QueryTranslatorImpl [main] - HQL: SELECT p FROM com.myapp.econtrol.entities.Product p
      2006-05-25 13:51:56,250 DEBUG org.hibernate.hql.ast.QueryTranslatorImpl [main] - SQL: select product0_.id as id2_, product0_.name as name2_ from product product0_
      2006-05-25 13:51:56,250 DEBUG org.hibernate.hql.ast.ErrorCounter [main] - throwQueryException() : no errors
      2006-05-25 13:51:56,250 DEBUG org.hibernate.impl.SessionFactoryImpl [main] - Checking 0 named SQL queries
      2006-05-25 13:51:56,265 DEBUG org.jboss.ejb3.EJBContainer [main] - Initialising interceptors for EControlSessionBean...
      2006-05-25 13:51:56,265 DEBUG org.jboss.ejb3.EJBContainer [main] - Default interceptors: [InterceptorInfo{class=class org.jboss.seam.ejb.SeamInterceptor, aroundInvoke=aroundInvoke}]
      2006-05-25 13:51:56,281 DEBUG org.jboss.ejb3.EJBContainer [main] - Class interceptors: []
      2006-05-25 13:51:56,281 DEBUG org.jboss.ejb3.EJBContainer [main] - All applicable interceptor classes: [InterceptorInfo{class=class org.jboss.seam.ejb.SeamInterceptor, aroundInvoke=aroundInvoke}]
      2006-05-25 13:51:56,281 INFO org.jboss.ejb3.MCKernelAbstraction [main] - installing bean: jboss.j2ee:jar=classes,name=EControlSessionBean,service=EJB3 with dependencies:
      2006-05-25 13:51:56,281 INFO org.jboss.ejb3.MCKernelAbstraction [main] - AbstractDependencyMetaData@194df96{dependency=persistence.units:jar=classes.jar,unitName=cal}
      2006-05-25 13:51:56,390 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.lang.String com.myapp.econtrol.session.EControlSessionBean.finish() - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@413fc6
      2006-05-25 13:51:56,390 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public void com.myapp.econtrol.session.EControlSessionBean.addExpense(com.myapp.econtrol.entities.Expense) - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@1c220eb
      2006-05-25 13:51:56,390 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.lang.String com.myapp.econtrol.session.EControlSessionBean.testMethod() - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@1ff5c98
      2006-05-25 13:51:56,390 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.util.Collection com.myapp.econtrol.session.EControlSessionBean.getAllExpenses() - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@183272
      2006-05-25 13:51:56,390 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.util.Collection com.myapp.econtrol.session.EControlSessionBean.getExpenseBySite(java.lang.String) - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@97e3a5
      2006-05-25 13:51:56,390 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.util.Collection com.myapp.econtrol.session.EControlSessionBean.getExpenseByDate(java.sql.Date) - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@1e2a069
      2006-05-25 13:51:56,390 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.lang.String com.myapp.econtrol.session.EControlSessionBean.getGreetings() - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@191777e
      2006-05-25 13:51:56,406 DEBUG org.jboss.ejb3.tx.UserTransactionImpl [main] - new UserTx: org.jboss.ejb3.tx.UserTransactionImpl@ef9f84
      2006-05-25 13:51:56,437 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.lang.String com.myapp.econtrol.session.EControlSessionBean.finish() - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@e41d4a
      2006-05-25 13:51:56,437 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public void com.myapp.econtrol.session.EControlSessionBean.addExpense(com.myapp.econtrol.entities.Expense) - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@3f265b
      2006-05-25 13:51:56,437 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.lang.String com.myapp.econtrol.session.EControlSessionBean.testMethod() - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@1ef3a22
      2006-05-25 13:51:56,437 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.util.Collection com.myapp.econtrol.session.EControlSessionBean.getAllExpenses() - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@d1b72d
      2006-05-25 13:51:56,437 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.util.Collection com.myapp.econtrol.session.EControlSessionBean.getExpenseBySite(java.lang.String) - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@511e0a
      2006-05-25 13:51:56,437 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.util.Collection com.myapp.econtrol.session.EControlSessionBean.getExpenseByDate(java.sql.Date) - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@18b3e62
      2006-05-25 13:51:56,437 DEBUG org.jboss.ejb3.interceptor.EJB3InterceptorsFactory [main] - Bound interceptors for joinpoint: public java.lang.String com.myapp.econtrol.session.EControlSessionBean.getGreetings() - [Lorg.jboss.ejb3.interceptor.InterceptorInfo;@ac97cc
      2006-05-25 13:51:56,437 DEBUG org.jboss.ejb3.security.JaccHelper [main] - EControlSessionBean has no @SecurityDomain - skipping JACC configuration
      2006-05-25 13:51:56,437 INFO org.jboss.ejb3.EJBContainer [main] - STARTED EJB: com.myapp.econtrol.session.EControlSessionBean ejbName: EControlSessionBean
      2006-05-25 13:51:56,468 DEBUG org.jboss.ejb3.Ejb3Deployment [main] - Bound ejb3 container jboss.j2ee:service=EJB3,jar=classes,name=EControlSessionBean
      ...... embedded-jboss-beans deployed....
      ...... deploying MM ejb3.....
      ...... ejb3 deployed....
      ...... deployer created....
      java.lang.NullPointerException
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.loadMbeanServer(EJB3StandaloneDeployer.java:474)
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.start(EJB3StandaloneDeployer.java:451)
       at example1.EJB3ContainerTestNG.startup(EJB3ContainerTestNG.java:54)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:318)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:152)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:216)
       at org.testng.SuiteRunner.run(SuiteRunner.java:146)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:713)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:676)
       at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:64)
       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:220)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:733)
      java.lang.NullPointerException
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.loadMbeanServer(EJB3StandaloneDeployer.java:474)
       at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.start(EJB3StandaloneDeployer.java:451)
       at example1.EJB3ContainerTestNG.startup(EJB3ContainerTestNG.java:54)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:318)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:152)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:216)
       at org.testng.SuiteRunner.run(SuiteRunner.java:146)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:713)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:676)
       at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:64)
       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:220)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:733)
      org.apache.maven.surefire.booter.SurefireExecutionException: null; nested exception is java.lang.NullPointerException: null
      java.lang.NullPointerException
       at org.apache.maven.surefire.report.AbstractTextReporter.testFailed(AbstractTextReporter.java:106)
       at org.apache.maven.surefire.report.ReporterManager.testFailed(ReporterManager.java:299)
       at org.apache.maven.surefire.report.ReporterManager.testFailed(ReporterManager.java:281)
       at org.apache.maven.surefire.testng.TestNGReporter.onTestFailure(TestNGReporter.java:97)
       at org.testng.internal.Invoker.runTestListeners(Invoker.java:1138)
       at org.testng.internal.Invoker.runTestListeners(Invoker.java:1123)
       at org.testng.internal.Invoker.handleConfigurationFailure(Invoker.java:187)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:166)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:216)
       at org.testng.SuiteRunner.run(SuiteRunner.java:146)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:713)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:676)
       at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:64)
       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:220)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:733)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      
      


      anyone could explain me what am i missing???

      thanks and regards
      marco