1 Reply Latest reply on Jul 18, 2011 5:10 PM by Aslak Knutsen

    JMS Injection Test

    mirodriguez Newbie

      Hello everyone.

      I'm doing different injections that provides Arquillian so far I have performed the injections
      of type CDI and EJB , the problem is I have with the JMS type which I have the following parcel of my project as shown below:

       

      projectTest

           |

           |----- src

           |         |

           |         |----- main

           |                   |---- java

           |                             |---- queue

           |                                       |---- MessageEcho.java

           |                             |---- QueueRequestor.java

           |                   |---- resources

           |         |----- test

           |                   |---- java

           |                             |---- TemperatureConverterTest.java

           |                   |---- resources

           |                             |---- jndi.properties

           |                             |---- Arquillian.xml

           |---- pom.xml

       

      The class is of type MDB is as follows:

       

      package queue;

       

      import javax.annotation.Resource;

      import javax.ejb.ActivationConfigProperty;

      import javax.ejb.MessageDriven;

      import javax.jms.Connection;

      import javax.jms.ConnectionFactory;

      import javax.jms.Message;

      import javax.jms.MessageListener;

      import javax.jms.MessageProducer;

      import javax.jms.Session;

       

      @MessageDriven(activationConfig = {

              @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/MyMDB"),

              @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })

      public class MessageEcho implements MessageListener {

       

          @Resource(mappedName = "java:/connectionFactory")

          private ConnectionFactory factory;

       

          @Override

          public void onMessage(Message message) {

              try {

                  System.out.println("MESSAGE 0001 : received " + message.getJMSMessageID());

                 

                  Connection connection = factory.createConnection();

                  Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

                  MessageProducer producer = session.createProducer(message.getJMSReplyTo());

                  producer.send(message);

                 

                  producer.close();

                  session.close();

                  connection.close();

              } catch (Exception e) {

                  throw new RuntimeException("No puede reproducir el Mensaje", e);

              }

          }   

      }

       

      I have the test class as follows:

       

      import javax.annotation.Resource;

      import javax.jms.Connection;

      import javax.jms.ConnectionFactory;

      import javax.jms.Message;

      import javax.jms.Queue;

      import javax.jms.QueueSession;

      import javax.jms.Session;

      import javax.jms.TextMessage;

       

      import junit.framework.Assert;

       

      import org.jboss.arquillian.api.Deployment;

      import org.jboss.arquillian.junit.Arquillian;

      import org.jboss.shrinkwrap.api.ShrinkWrap;

      import org.jboss.shrinkwrap.api.spec.JavaArchive;

      import org.junit.Test;

      import org.junit.runner.RunWith;

       

      import queue.MessageEcho;

       

      @RunWith(Arquillian.class)

      public class TemperatureConverterTest {

       

          @Deployment

          public static JavaArchive createTestArchive() {

              return ShrinkWrap.create(JavaArchive.class, "test.jar").addClasses(

                      MessageEcho.class, QueueRequestor.class);

          }

       

          @Resource(mappedName = "/queue/MyMDB")

          private Queue myMDB;

       

          @Resource(mappedName = "/ConnectionFactory")

          private ConnectionFactory factory;

       

          @Test

          public void testSendMessage() throws Exception {

              String messageBody = "ping";

       

              Connection connection = null;

       

              try {

                  connection = factory.createConnection();

                  Session session = connection.createSession(false,

                          Session.AUTO_ACKNOWLEDGE);

                  QueueRequestor requestor = new QueueRequestor(

                          (QueueSession) session, myMDB);

       

                  connection.start();

       

                  Message request = session.createTextMessage(messageBody);

                  Message response = requestor.request(request, 5000);

       

                  Assert.assertEquals("Should have responded with same message",

                          messageBody, ((TextMessage) response).getText());

              } finally {

                  connection.close();

              }

          }

       

      }

       

      The pom.xml file is as follows:

       

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

          <modelVersion>4.0.0</modelVersion>

          <groupId>projectTest</groupId>

          <artifactId>projectTest</artifactId>

          <version>0.0.1-SNAPSHOT</version>

          <name>projectTest</name>

       

          <build>

              <plugins>

                  <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-compiler-plugin</artifactId>

                      <configuration>

                          <source>1.6</source>

                          <target>1.6</target>

                      </configuration>

                  </plugin>

              </plugins>

          </build>

       

          <dependencies>

              <dependency>

                  <groupId>javax.enterprise</groupId>

                  <artifactId>cdi-api</artifactId>

                  <version>1.0-SP1</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>junit</groupId>

                  <artifactId>junit</artifactId>

                  <version>4.8.1</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>org.jboss.arquillian</groupId>

                  <artifactId>arquillian-junit</artifactId>

                  <version>1.0.0.Alpha5</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>org.jboss.spec.javax.ejb</groupId>

                  <artifactId>jboss-ejb-api_3.0_spec</artifactId>

                  <version>1.0.0.Beta1</version>

                  <scope>test</scope>

              </dependency>

          </dependencies>

       

          <properties>

              <version.jboss_60>6.0.0.Final</version.jboss_60>

              <arquillian.version>1.0.0.Alpha5</arquillian.version>

          </properties>

       

          <profiles>

              <profile>

                  <id>jbossas-remote-6</id>

                  <dependencies>

                      <dependency>

                          <groupId>org.jboss.arquillian.container</groupId>

                          <artifactId>arquillian-jbossas-remote-6</artifactId>

                          <version>1.0.0.Alpha5</version>

                          <scope>test</scope>

                      </dependency>

                      <dependency>

                          <groupId>org.jboss.jbossas</groupId>

                          <artifactId>jboss-as-client</artifactId>

                          <version>6.0.0.Final</version>

                          <type>pom</type>

                      </dependency>

                  </dependencies>

              </profile>

          </profiles>

       

          <repositories>

              <!-- other repos here -->

              <repository>

                  <id>jboss-deprecated-repository</id>

                  <name>JBoss Deprecated Maven Repository</name>

                  <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>

                  <layout>default</layout>

                  <releases>

                      <enabled>true</enabled>

                      <updatePolicy>never</updatePolicy>

                  </releases>

                  <snapshots>

                      <enabled>false</enabled>

                      <updatePolicy>never</updatePolicy>

                  </snapshots>

              </repository>

          </repositories>

       

       

      </project>

       

      I have a configuration for an application server jboss-6.0.0.Final when I run the test with mvn test-instruction-remote Pjbossas-6 I get the following message:

       

      -------------------------------------------------------

      T E S T S

      -------------------------------------------------------

      Running TemperatureConverterTest

      18/07/2011 09:06:02 AM org.jboss.arquillian.impl.client.container.ContainerRegistryCreator getActivatedConfiguration

      INFO: Could not read active container configuration: null

      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 13.047 sec <<< FAILURE!

       

      Results :

       

      Tests in error:

        TemperatureConverterTest: Failed to deploy test.war

       

      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

       

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD FAILURE

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 31.750s

      [INFO] Finished at: Mon Jul 18 09:06:15 COT 2011

      [INFO] Final Memory: 42M/254M

      [INFO] ------------------------------------------------------------------------

       

      And the file containing the test results shows the following exceptions:
      TemperatureConverterTest.txt

       

      -------------------------------------------------------------------------------

      Test set: TemperatureConverterTest

      -------------------------------------------------------------------------------

      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 13.047 sec <<< FAILURE!

      TemperatureConverterTest  Time elapsed: 0 sec  <<< ERROR!

      org.jboss.arquillian.spi.client.container.DeploymentException: Failed to deploy test.war

          at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.deploy(JBossASRemoteContainer.java:169)

          at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.deploy(JBossASRemoteContainer.java:121)

          at org.jboss.arquillian.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:141)

          at org.jboss.arquillian.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:115)

          at org.jboss.arquillian.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:226)

          at org.jboss.arquillian.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:114)

          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:597)

          at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

          at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

          at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

          at org.jboss.arquillian.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:100)

          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:597)

          at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

          at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

          at org.jboss.arquillian.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:78)

          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:597)

          at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

          at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

          at org.jboss.arquillian.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:51)

          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:597)

          at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

          at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

          at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

          at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

          at org.jboss.arquillian.impl.core.EventImpl.fire(EventImpl.java:67)

          at org.jboss.arquillian.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:86)

          at org.jboss.arquillian.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:79)

          at org.jboss.arquillian.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:217)

          at org.jboss.arquillian.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:78)

          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:597)

          at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

          at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

          at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

          at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

          at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

          at org.jboss.arquillian.impl.core.EventImpl.fire(EventImpl.java:67)

          at org.jboss.arquillian.impl.client.ContainerEventController.execute(ContainerEventController.java:69)

          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:597)

          at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

          at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

          at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

          at org.jboss.arquillian.impl.TestContextHandler.createClassContext(TestContextHandler.java:68)

          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:597)

          at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

          at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

          at org.jboss.arquillian.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54)

          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:597)

          at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

          at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

          at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

          at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

          at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:70)

          at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:170)

          at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:303)

          at org.jboss.arquillian.junit.Arquillian.access$300(Arquillian.java:45)

          at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:187)

          at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

          at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)

          at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)

          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)

          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)

          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:597)

          at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)

          at $Proxy0.invoke(Unknown Source)

          at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)

          at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)

          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

      Caused by: java.lang.RuntimeException: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

      DEPLOYMENTS MISSING DEPENDENCIES:

        Deployment "jboss-injector:appName=test,module=test" is missing the following dependencies:

          Dependency "<UNKNOWN jboss-injector:appName=test,module=test>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-switchboard:appName=test,module=test' **")

        Deployment "jboss-injector:topLevelUnit=test.war,unit=test.war,bean=MessageEcho" is missing the following dependencies:

          Dependency "<UNKNOWN jboss-injector:topLevelUnit=test.war,unit=test.war,bean=MessageEcho>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-switchboard:appName=test,module=test' **")

        Deployment "jboss-switchboard:appName=test,module=test" is missing the following dependencies:

          Dependency "java:/connectionFactory" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'java:/connectionFactory' **")

          Dependency "java:/queue/MyMDB" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'java:/queue/MyMDB' **")

        Deployment "jboss.j2ee:jar=test.war,name=MessageEcho,service=EJB3" is missing the following dependencies:

          Dependency "<UNKNOWN jboss.j2ee:jar=test.war,name=MessageEcho,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-injector:bean=MessageEcho,topLevelUnit=test.war,unit=test.war' **")

        Deployment "jboss.web.deployment:war=/test" is missing the following dependencies:

          Dependency "jboss-injector:appName=test,module=test" (should be in state "Create", but is actually in state "Configured")

       

      DEPLOYMENTS IN ERROR:

        Deployment "<UNKNOWN jboss-injector:topLevelUnit=test.war,unit=test.war,bean=MessageEcho>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss-switchboard:appName=test,module=test' **

        Deployment "java:/queue/MyMDB" is in error due to the following reason(s): ** NOT FOUND Depends on 'java:/queue/MyMDB' **

        Deployment "<UNKNOWN jboss.j2ee:jar=test.war,name=MessageEcho,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss-injector:bean=MessageEcho,topLevelUnit=test.war,unit=test.war' **

        Deployment "java:/connectionFactory" is in error due to the following reason(s): ** NOT FOUND Depends on 'java:/connectionFactory' **

        Deployment "<UNKNOWN jboss-injector:appName=test,module=test>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss-switchboard:appName=test,module=test' **

       

          at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:320)

          at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:197)

          at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:232)

          at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:89)

          at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.deploy(JBossASRemoteContainer.java:154)

          ... 93 more

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

       

      DEPLOYMENTS MISSING DEPENDENCIES:

        Deployment "jboss-injector:appName=test,module=test" is missing the following dependencies:

          Dependency "<UNKNOWN jboss-injector:appName=test,module=test>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-switchboard:appName=test,module=test' **")

        Deployment "jboss-injector:topLevelUnit=test.war,unit=test.war,bean=MessageEcho" is missing the following dependencies:

          Dependency "<UNKNOWN jboss-injector:topLevelUnit=test.war,unit=test.war,bean=MessageEcho>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-switchboard:appName=test,module=test' **")

        Deployment "jboss-switchboard:appName=test,module=test" is missing the following dependencies:

          Dependency "java:/connectionFactory" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'java:/connectionFactory' **")

          Dependency "java:/queue/MyMDB" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'java:/queue/MyMDB' **")

        Deployment "jboss.j2ee:jar=test.war,name=MessageEcho,service=EJB3" is missing the following dependencies:

          Dependency "<UNKNOWN jboss.j2ee:jar=test.war,name=MessageEcho,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-injector:bean=MessageEcho,topLevelUnit=test.war,unit=test.war' **")

        Deployment "jboss.web.deployment:war=/test" is missing the following dependencies:

          Dependency "jboss-injector:appName=test,module=test" (should be in state "Create", but is actually in state "Configured")

       

      DEPLOYMENTS IN ERROR:

        Deployment "<UNKNOWN jboss-injector:topLevelUnit=test.war,unit=test.war,bean=MessageEcho>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss-switchboard:appName=test,module=test' **

        Deployment "java:/queue/MyMDB" is in error due to the following reason(s): ** NOT FOUND Depends on 'java:/queue/MyMDB' **

        Deployment "<UNKNOWN jboss.j2ee:jar=test.war,name=MessageEcho,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss-injector:bean=MessageEcho,topLevelUnit=test.war,unit=test.war' **

        Deployment "java:/connectionFactory" is in error due to the following reason(s): ** NOT FOUND Depends on 'java:/connectionFactory' **

        Deployment "<UNKNOWN jboss-injector:appName=test,module=test>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss-switchboard:appName=test,module=test' **

       

          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316)

          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968)

          at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82)

          at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138)

          at org.jboss.profileservice.plugins.deploy.actions.DeploymentStartAction.doPrepare(DeploymentStartAction.java:104)

          at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:101)

          at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87)

          at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234)

          at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213)

          at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150)

          at org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.startDeployments(AbstractDeployHandler.java:168)

          at org.jboss.profileservice.management.upload.remoting.DeployHandlerDelegate.startDeployments(DeployHandlerDelegate.java:74)

          at org.jboss.profileservice.management.upload.remoting.DeployHandler.invoke(DeployHandler.java:156)

          at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898)

          at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)

          at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)

          at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)

          at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

          at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:216)

          at org.jboss.remoting.Client.invoke(Client.java:1961)

          at org.jboss.remoting.Client.invoke(Client.java:804)

          at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312)

          ... 97 more

       

      I would appreciate that I could help with this problem, if others do not have to configure the message queue on the server.

      Thank you very much.

        • 1. Re: JMS Injection Test
          Aslak Knutsen Master

          You'll need to @Deploy a Descriptor from the ShrinkWrap Descriptor project

           

          There is currently no implementation that support the fluent API to create jboss 6 jms xml files, but you can easily create a implementation of the interface org.jboss.shrinkwrap.descriptor.api.Descriptor and provide your own String/Resource based descriptor.

           

           

          public class MyJMXDescriptor implements org.jboss.shrinkwrap.descriptor.api.Descriptor 
          {
           ..
          }
          
          
          @Deployment(name = "queue", order = 1)
          public static Descriptor deployJMSQeue()
          {
            return new MyJMXDescirptor();
          }
          
          
          @Deployment(order = 2)
          public static Archive<?> deployMDB()
          {
            return ShrinkWrap.create(...);
          }