2 Replies Latest reply on Jun 26, 2008 6:26 AM by Kamil Demecki

    Problems booting EJ from unit test

    Dave Rathnow Novice

      I used the example from the Embedded JBoss kit I downloaded to build my unit test environment. I've been able to run unit tests that use JPA to save and restore my entities but injections does not work.

      When start my unit test, I am calling "Bootstrap.getInstance().bootstrap()" to start the container. Everything seems to move along fine but then the exception below comes out, however, as I said, my unit test will run as long as I don't require injection.

      Can anyone tell me why this is happening?


      2008-Feb-11 16:46:19 FATAL: [Ejb3TestCase] Unable to bootstrap embedded JBoss
      org.jboss.deployers.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

      jboss.jdbc:datasource=OracleDS,service=metadata
      -> jboss.jdbc:service=metadata{Start:** NOT FOUND **}
      -> jboss.jdbc:service=metadata{Create:** NOT FOUND **}


      *** CONTEXTS IN ERROR: Name -> Error

      jboss.jdbc:service=metadata -> ** NOT FOUND **


      at org.jboss.embedded.Bootstrap.checkIncomplete(Bootstrap.java:144)
      at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:169)
      at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
      at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
      at ca.ums.core.ejb3test.Ejb3TestCase.(Ejb3TestCase.java:42)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at junit.framework.TestSuite.createTest(TestSuite.java:61)
      at junit.framework.TestSuite.addTestMethod(TestSuite.java:283)
      at junit.framework.TestSuite.(TestSuite.java:146)
      at org.junit.internal.runners.OldTestClassRunner.(OldTestClassRunner.java:64)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at org.junit.internal.requests.ClassRequest.buildRunner(ClassRequest.java:33)
      at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.(JUnit4TestReference.java:26)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.(JUnit4TestClassReference.java:24)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:40)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:30)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:445)
      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)
      2008-Feb-11 16:46:19 DEBUG: [PacControlJob] Scheduling envelope control job for: 1.2.3.4/1