2 Replies Latest reply on Nov 1, 2016 11:06 AM by ice2rahul

    WildFly 10.1 fails to deploy MDB with error "services are not installed"

    ice2rahul

      Hello all,

       

      I am writing an MDB from scratch and defined a topic in standalone.xml as shown below:

      <jms-topic name="connectedVehicle" entries="java:/jms/topic/connectedVehicle java:jboss/exported/jms/topic/connectedVehicle"/>
      

       

      My MDB is very simple & looks like below:

      @MessageDriven(mappedName = "jms/topic/connectedVehicle", 
          messageListenerInterface=MessageListener.class,
          activationConfig={
              @ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="Auto-acknowledge")
          })
      public class RVSConsumer implements MessageListener
      {    
          @Resource(mappedName="jms/topic/connectedVehicle")
          private Destination connectedVehicle;
          
          public void onMessage(Message message)
          {
              try 
              {
                  System.out.println("Message received: " + message.getBody(String.class));
              } 
              catch (JMSException e) 
              {
                  e.printStackTrace();
              }
          }
      }
      

       

      Am not sure what else I am missing here due to that deployment is failing with following error:

      "WFLYCTL0412: Required services that are not installed:"

      "WFLYCTL0180: Services with missing/unavailable dependencies" =>

       

      Full error trace is shown below:

      14:29:06,389 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "ConnectedVehicleEventService.war")]) - failure description: {
          "WFLYCTL0412: Required      :" => ["jboss.naming.context.java.module.ConnectedVehicleEventService.ConnectedVehicleEventService.env.jms.topic.connectedVehicle"],
          "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.ConnectedVehicleEventService.ConnectedVehicleEventService.env.\"com.vwgoa.csna.service.RVSConsumer\".connectedVehicle is missing [jboss.naming.context.java.module.ConnectedVehicleEventService.ConnectedVehicleEventService.env.jms.topic.connectedVehicle]"]
      }
      14:29:06,452 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "ConnectedVehicleEventService.war" (runtime-name : "ConnectedVehicleEventService.war")
      14:29:06,453 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
      WFLYCTL0184:    New missing/unsatisfied dependencies:
            service jboss.naming.context.java.module.ConnectedVehicleEventService.ConnectedVehicleEventService.env.jms.topic.connectedVehicle (missing) dependents: [service jboss.naming.context.java.module.ConnectedVehicleEventService.ConnectedVehicleEventService.env."com.vwgoa.csna.service.RVSConsumer".connectedVehicle] 
      

       

      Has anyone been into such issue and fixed it. Any help will be appreciated. Thanks in advance...

        • 1. Re: WildFly 10.1 fails to deploy MDB with error "services are not installed"
          jbertram

          My first guess is that "java:/jms/topic/connectedVehicle" (i.e. the relevant entry on your jms-topic configuration) is not equivalent to "jms/topic/connectedVehicle" (i.e. what you're attempting to inject).

           

          Also, your MDB isn't configured with a "destination" activation configuration property so I don't think it will ever actually receive a message since it isn't listening for messages anywhere.

          • 2. Re: WildFly 10.1 fails to deploy MDB with error "services are not installed"
            ice2rahul

            Thanks for your reply Justin,

             

            I just discovered it today, for ActiveMQ "destinationType" & "destination" are mandatory. I don't need to explicitly define destination using @Resource annotation.

             

            As you said MDB is not cofigured with destination activation configuration property, this was the real problem. MDB is now working good after I added "destinationType" & "destination" in configuration property.

             

            New MDB code is now looking & working good as below:

             

            @MessageDriven(mappedName = "jms/topic/connectedVehicle",
                activationConfig={
                    @ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="Auto-acknowledge"),
                    @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic"),
                    @ActivationConfigProperty(propertyName="destination", propertyValue="connectedVehicle")
                })
            public class RVSConsumer implements MessageListener
            {
                public void onMessage(Message message)
                {
                    try
                    {
                        System.out.println("Message received: " + message.getBody(String.class));  
                    }
                    catch (JMSException e)
                    {
                        e.printStackTrace(); 
                    }
                }
            }