1 Reply Latest reply on Dec 21, 2007 10:41 AM by Victor Cardona

    Setting up JBoss Embedded in a Maven Project

    Victor Cardona Newbie

      Has anyone succeeded in setting up JBoss Embedded in a Mavenized project? All I want to do is run some unit and integration tests, but I can't seem to get Embedded to start up correctly. My project is POJO only with JPA. My development environment is detailed below.


      JBoss Seam 2.0.0.GA
      JBoss Embedded Beta2
      jdk 1.5.0_14
      Maven 2.0.7
      Ant 1.7.0


      My POM contains the following:

      <dependency>
       <groupId>org.jboss.embedded</groupId>
       <artifactId>jboss-embedded</artifactId>
       <version>beta2</version>
       <scope>test</scope>
       <type>pom</type>
      </dependency>
      <dependency>
       <groupId>org.jboss.embedded</groupId>
       <artifactId>jboss-embedded-api</artifactId>
       <version>beta2</version>
       <scope>test</scope>
      </dependency>


      I have placed the bootstrap directory and all of its contents into src/test/resources. I then added the following to my testng.xml file:
      <test name="Authentication Action">
       <classes>
       <class name="mil.ustranscom.j5.seamist.security.AuthenticatorActionTest"/>
       </classes>
      </test>


      Finally, I added my test which extends SeamTest. However when I run my tests, I get the following error:

      org.jboss.deployers.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      *** DEPLOYMENTS IN ERROR: Name -> Error

      vfsfile:/C:/Documents%20and%20Settings/CardonVR/My%20Documents/workspace/seamist-new-tomcat/target/test-classes/deploy/META-INF/ra.xml -> java.lang.NullPointerException

      vfsfile:/C:/Documents%20and%20Settings/CardonVR/My%20Documents/workspace/seamist-new-tomcat/target/test-classes/deploy/jboss-local-jdbc.rar -> java.lang.NullPointerException

      vfsfile:/C:/Documents%20and%20Settings/CardonVR/My%20Documents/workspace/seamist-new-tomcat/target/test-classes/deploy/jboss-xa-jdbc.rar -> java.lang.NullPointerException

      vfsfile:/C:/Documents%20and%20Settings/CardonVR/My%20Documents/workspace/seamist-new-tomcat/target/test-classes/deploy/jms-ra.rar -> java.lang.NullPointerException


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

      jboss.jca:name=DefaultDS,service=DataSourceBinding
      -> jboss.jca:name=DefaultDS,service=LocalTxCM{Start:Configured}
      -> jboss.jca:name=DefaultDS,service=LocalTxCM{Create:Configured}

      jboss.jca:name=DefaultDS,service=LocalTxCM
      -> jboss.jca:name=DefaultDS,service=ManagedConnectionPool{Start:Configured}
      -> jboss.jca:name=DefaultDS,service=ManagedConnectionPool{Create:Configured}

      jboss.jca:name=DefaultDS,service=ManagedConnectionFactory
      -> jboss.jca:name='jboss-local-jdbc.rar',service=RARDeployment{Create:** NOT FOUND **}
      -> jboss.jca:name='jboss-local-jdbc.rar',service=RARDeployment{Start:** NOT FOUND **}

      jboss.jca:name=DefaultDS,service=ManagedConnectionPool
      -> jboss.jca:name=DefaultDS,service=ManagedConnectionFactory{Create:Configured}
      -> jboss.jca:name=DefaultDS,service=ManagedConnectionFactory{Start:Configured}

      jboss.jca:name=JmsXA,service=DataSourceBinding
      -> jboss.jca:name=JmsXA,service=TxCM{Start:Configured}
      -> jboss.jca:name=JmsXA,service=TxCM{Create:Configured}

      jboss.jca:name=JmsXA,service=ManagedConnectionFactory
      -> jboss.messaging:service=ServerPeer{Start:Configured}
      -> jboss.jca:name='jms-ra.rar',service=RARDeployment{Start:** NOT FOUND **}
      -> jboss.messaging:service=ServerPeer{Create:Configured}
      -> jboss.jca:name='jms-ra.rar',service=RARDeployment{Create:** NOT FOUND **}

      jboss.jca:name=JmsXA,service=ManagedConnectionPool
      -> jboss.jca:name=JmsXA,service=ManagedConnectionFactory{Start:Configured}
      -> jboss.jca:name=JmsXA,service=ManagedConnectionFactory{Create:Configured}

      jboss.jca:name=JmsXA,service=TxCM
      -> jboss.jca:name=JmsXA,service=ManagedConnectionPool{Start:Configured}
      -> jboss.jca:name=JmsXA,service=ManagedConnectionPool{Create:Configured}

      jboss.messaging.connectionfactory:service=ConnectionFactory
      -> jboss.messaging:service=PostOffice{Start:Configured}
      -> jboss.messaging:service=PostOffice{Create:Configured}
      -> jboss.messaging:service=ServerPeer{Start:Configured}
      -> jboss.messaging:service=ServerPeer{Create:Configured}

      jboss.messaging.destination:name=DLQ,service=Queue
      -> jboss.messaging:service=ServerPeer{Start:Configured}
      -> jboss.messaging:service=PostOffice{Create:Configured}
      -> jboss.messaging:service=ServerPeer{Create:Configured}
      -> jboss.messaging:service=PostOffice{Start:Configured}

      jboss.messaging.destination:name=ExpiryQueue,service=Queue
      -> jboss.messaging:service=PostOffice{Start:Configured}
      -> jboss.messaging:service=ServerPeer{Create:Configured}
      -> jboss.messaging:service=PostOffice{Create:Configured}
      -> jboss.messaging:service=ServerPeer{Start:Configured}

      jboss.messaging.destination:name=PrivateDLQ,service=Queue
      -> jboss.messaging:service=ServerPeer{Create:Configured}
      -> jboss.messaging:service=ServerPeer{Start:Configured}
      -> jboss.messaging:service=PostOffice{Create:Configured}
      -> jboss.messaging:service=PostOffice{Start:Configured}

      jboss.messaging.destination:name=PrivateExpiryQueue,service=Queue
      -> jboss.messaging:service=PostOffice{Start:Configured}
      -> jboss.messaging:service=ServerPeer{Start:Configured}
      -> jboss.messaging:service=ServerPeer{Create:Configured}
      -> jboss.messaging:service=PostOffice{Create:Configured}

      jboss.messaging.destination:name=QueueWithOwnDLQAndExpiryQueue,service=Queue
      -> jboss.messaging:service=ServerPeer{Create:Configured}
      -> jboss.messaging:service=PostOffice{Create:Configured}
      -> jboss.messaging:service=PostOffice{Start:Configured}
      -> jboss.messaging:service=ServerPeer{Start:Configured}

      jboss.messaging.destination:name=QueueWithOwnRedeliveryDelay,service=Queue
      -> jboss.messaging:service=ServerPeer{Create:Configured}
      -> jboss.messaging:service=PostOffice{Create:Configured}
      -> jboss.messaging:service=PostOffice{Start:Configured}
      -> jboss.messaging:service=ServerPeer{Start:Configured}

      jboss.messaging.destination:name=TopicWithOwnDLQAndExpiryQueue,service=Topic
      -> jboss.messaging:service=ServerPeer{Start:Configured}
      -> jboss.messaging:service=PostOffice{Create:Configured}
      -> jboss.messaging:service=PostOffice{Start:Configured}
      -> jboss.messaging:service=ServerPeer{Create:Configured}

      jboss.messaging.destination:name=TopicWithOwnRedeliveryDelay,service=Topic
      -> jboss.messaging:service=ServerPeer{Create:Configured}
      -> jboss.messaging:service=PostOffice{Start:Configured}
      -> jboss.messaging:service=PostOffice{Create:Configured}
      -> jboss.messaging:service=ServerPeer{Start:Configured}

      jboss.messaging:service=JMSUserManager
      -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Start:Configured}
      -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:Configured}

      jboss.messaging:service=PersistenceManager
      -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Start:Configured}
      -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:Configured}

      jboss.messaging:service=PostOffice
      -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Start:Configured}
      -> jboss.messaging:service=ServerPeer{Create:Configured}
      -> jboss.messaging:service=ServerPeer{Start:Configured}
      -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:Configured}

      jboss.messaging:service=ServerPeer
      -> jboss.messaging:service=PersistenceManager{Create:Configured}
      -> jboss.messaging:service=JMSUserManager{Start:Configured}
      -> jboss.messaging:service=PersistenceManager{Start:Configured}
      -> jboss.messaging:service=JMSUserManager{Create:Configured}

      jboss.mq:service=DestinationManager
      -> jboss.messaging:service=ServerPeer{Start:Configured}
      -> jboss.messaging:service=ServerPeer{Create:Configured}


      *** CONTEXTS IN ERROR: Name -> Error

      jboss.jca:name='jms-ra.rar',service=RARDeployment -> ** NOT FOUND **

      jboss.jca:name='jboss-local-jdbc.rar',service=RARDeployment -> ** 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 org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
      at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
      at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
      at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
      ... Removed 22 stack frames

      Click to show all stack frames


      Can someone tell me what I'm doing wrong?

        • 1. Re: Setting up JBoss Embedded in a Maven Project
          Victor Cardona Newbie

          One minor correction in my post above. In the previous post, I had the contents of the bootstrap directory in src/test/resources. If I have everything under bootstrap I get the following.


          org.jboss.deployers.spi.DeploymentException: Unable to find bootstrap file: conf/bootstrap-beans.xml in classpath
          at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:200)
          at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
          at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
          at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
          at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
          at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
          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:585)
          at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
          at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
          at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
          at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
          at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:165)
          at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
          at org.testng.TestRunner.runWorkers(TestRunner.java:678)
          at org.testng.TestRunner.privateRun(TestRunner.java:624)
          at org.testng.TestRunner.run(TestRunner.java:495)
          at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
          at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
          at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
          at org.testng.SuiteRunner.run(SuiteRunner.java:190)
          at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
          at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
          at org.testng.TestNG.run(TestNG.java:699)
          at org.testng.TestNG.privateMain(TestNG.java:824)
          at org.testng.TestNG.main(TestNG.java:802)