2 Replies Latest reply on Mar 31, 2009 9:17 AM by jaikiran pai

    Using JBoss Embedded EJB 3 container with Oracle

    Ajay Gupta Newbie

      I am trying to write a JUnit test case using JBoss embedded EJB3 container to test a stateless session bean. The stateless session bean uses a transaction-scoped entity manager to do a SELECT * FROM USER_LOGIN query against an Oracle database. On running the test case, JUnit fails with following stack trace. The example works with in-process HSQLDB.

      java.lang.IllegalArgumentException: Null name
      at org.jboss.dependency.plugins.AbstractController.getContext(AbstractController.java:114)
      at org.jboss.kernel.plugins.dependency.AbstractKernelController.getContext(AbstractKernelController.java:94)
      at org.jboss.ejb3.embedded.KernelErrors.validate(KernelErrors.java:96)
      at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.scanClasspath(EJB3StandaloneBootstrap.java:281)
      at com.ag.login.util.JBossUtil.startDeployer(JBossUtil.java:78)
      at com.ag.login.ejb.UserLoginTest.startDeployer(UserLoginTest.java:26)
      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.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
      at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
      at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
      at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)