11 Replies Latest reply on Oct 23, 2018 12:36 PM by mezini

    Can not deploy MDB because of service jboss.ejb.default-resource-adapter-name-service not found

    ynusis

      Hi,

       

      iI am using Jboss 7.1.1.Final and have the following bean:

       

      @Singleton
      @Startup
      public class TestJMS {
      
      
                @Resource(mappedName = "java:/ConnectionFactory")
                private ConnectionFactory cf;
        
                @Resource(mappedName = "java:/queue/test")
                private Queue test;
        
                @PostConstruct
                public final void setUp() {
                          try {
                                    System.out.println("Hello: TestJMS");
                                    System.out.println(this.test.getQueueName());
                          } catch (final JMSException e) {
                                    e.printStackTrace();
                          }
                }
      }
      
      

      which deploys fine.

       

      But the MDB:

       

      @MessageDriven(activationConfig = {
                @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
                @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/test")
      })
      public class TestMDB implements MessageListener {
      
      
          /** */
          public TestMDB() {
              super();
          }
      
      
          @Override
          public final void onMessage(final Message message) {
                    System.out.println(message);
          }
      
      
          @PostConstruct
                public final void setUp() {
                          System.out.println("Hello: TestMDB");
                }
         
      }
      
      

      does not deploy.

       

      Error:

       

      10:14:41,012 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "server-ear.ear"
      10:14:42,479 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "server-ejb-1.0.0-SNAPSHOT.jar"
      10:14:42,511 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.subunit."server-ear.ear"."server-ejb-1.0.0-SNAPSHOT.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."server-ear.ear"."server-ejb-1.0.0-SNAPSHOT.jar".PARSE: Failed to process phase PARSE of subdeployment "server-ejb-1.0.0-SNAPSHOT.jar" of deployment "server-ear.ear"
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
      Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not found
                at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:447) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.getDefaultResourceAdapterName(MessageDrivenComponentDescriptionFactory.java:273)
                at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processMessageBeans(MessageDrivenComponentDescriptionFactory.java:153)
                at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processAnnotations(MessageDrivenComponentDescriptionFactory.java:81)
                at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:58)
                at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:81)
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
                ... 5 more
      
      
      10:14:42,526 INFO  [org.jboss.as] (MSC service thread 1-8) JBAS015951: Admin console listening on http://127.0.0.1:10190
      10:14:42,526 ERROR [org.jboss.as] (MSC service thread 1-8) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 4308ms - Started 167 of 249 services (2 services failed or missing dependencies, 76 services are passive or on-demand)
      10:14:42,745 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "server-ear.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"server-ear.ear\".\"server-ejb-1.0.0-SNAPSHOT.jar\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"server-ear.ear\".\"server-ejb-1.0.0-SNAPSHOT.jar\".PARSE: Failed to process phase PARSE of subdeployment \"server-ejb-1.0.0-SNAPSHOT.jar\" of deployment \"server-ear.ear\""}}
      10:14:42,745 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment server-ejb-1.0.0-SNAPSHOT.jar in 6ms
      10:14:42,792 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment server-ear.ear in 48ms
      10:14:42,792 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
      JBAS014777:   Services which failed to start:      service jboss.deployment.subunit."server-ear.ear"."server-ejb-1.0.0-SNAPSHOT.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."server-ear.ear"."server-ejb-1.0.0-SNAPSHOT.jar".PARSE: Failed to process phase PARSE of subdeployment "server-ejb-1.0.0-SNAPSHOT.jar" of deployment "server-ear.ear"
      
      
      10:14:42,792 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"server-ear.ear\".\"server-ejb-1.0.0-SNAPSHOT.jar\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"server-ear.ear\".\"server-ejb-1.0.0-SNAPSHOT.jar\".PARSE: Failed to process phase PARSE of subdeployment \"server-ejb-1.0.0-SNAPSHOT.jar\" of deployment \"server-ear.ear\""}}}}
      
      

       

      I tried various destinations like:

      • test
      • java:/queue/test

       

      Any ideas?