8 Replies Latest reply on Mar 18, 2015 8:56 PM by aung.htet

    JBAS014521: No message listener of type in ResourceAdapter

    rostifant

      Hi,

      I am trying to deploy a Resource Adapter (MailServerConnector) with a corresponding MDB On Jboss 7.1 CR1. The deployment of the RA works well. But if I deploy the MDB I get the following exception:

      java.lang.IllegalStateException: JBAS014521: No message listener of type org.atmosfair.mail.IMailListener found in resource adapter MailServerConnector
      

          

      I have the following configuration of my RA in the standalone.xml

       

       

           <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
                  <resource-adapters>
                      <resource-adapter>
                          <archive>
                              MailServerConnector.rar
                          </archive>
                          <connection-definitions>
                              <connection-definition class-name="org.atmosfair.mail.MailServerConnector" jndi-name="java:jboss/atmosfair/MailServerConnector" pool-name="MailServerConnector">
                                  <pool>
                                      <min-pool-size>
                                          10
                                      </min-pool-size>
                                      <max-pool-size>
                                          100
                                      </max-pool-size>
                                  </pool>
                                  <security>
                                      <application/>
                                  </security>
                              </connection-definition>
                          </connection-definitions>
                      </resource-adapter>
                  </resource-adapters>
            </subsystem>
      

       

      The Implementation of the RA looks as follows:

       

      @Connector
      public class MailResourceAdapter implements ResourceAdapter {
           ...
      }
      

       

      The MDB:

       

      @MessageDriven(messageListenerInterface=IMailListener.class,
                activationConfig={})
      @ResourceAdapter(value = "MailServerConnector.rar")
      public class MailReceiver implements IMailListener{
      ...
      }
      

       

      Maybe you can help me to understand this exception and to resolve this issue. Thanks in advance.

        • 1. Re: JBAS014521: No message listener of type in ResourceAdapter
          reszka

          Hello,

           

          I've exacly the same problem, did you resolve this?

          • 2. Re: JBAS014521: No message listener of type in ResourceAdapter
            reszka

            OK, I think I've found the solution (at least in my case). Check where you have deployed IMailListener, in my case the error was connected with wrogn structure:

            EAR ->

                 API.jar (with listener) 

                 Connector.rar ->

                      API.jar (with listener)

                 EJB.ejb

            So these two API's are (in fact) not the same and that's why the message listener cannot be found, now I have correct structure:

            EAR ->

                      API.jar

                      Connector.rar

                      EJB.ejb

            • 3. Re: JBAS014521: No message listener of type in ResourceAdapter
              kimba74

              Did anyone ever figure out what the problem is? I'm running into the exact same problem on JBoss AS 7.1.1

               

              Thanks,

               

              Steffen

              • 4. Re: JBAS014521: No message listener of type in ResourceAdapter
                jesper.pedersen

                Try latest nightly snapshot of AS7 and make sure that your archive is correctly structured

                • 5. Re: JBAS014521: No message listener of type in ResourceAdapter
                  kimba74

                  Can you point me in the direction of the latest snapshot?

                   

                  Thanks,

                   

                  Steffen

                  • 6. Re: JBAS014521: No message listener of type in ResourceAdapter
                    jbertram
                    • 7. Re: JBAS014521: No message listener of type in ResourceAdapter
                      kondrusuresh

                      Hi,

                       

                      In our application also we are using Inbound Resource Adapter (i.e. Resource adapter and Message Driven Bean) and trying to deploy in JBOSS EAP 6.1.

                       

                      1)    In Mdb class if we are extending the Message Listener then JBAS014142: Started message driven bean 'SharesMessageBean' with 'shares-fares-intg#inbound-adapter' resource adapter it is recognising the

                      mdb.

                       

                      Mdb Class:

                      @MessageDriven

                      (name="SharesMessageBean",messageListenerInterface=com.as.mdb.ASMessageListener.class,

                      activationConfig = {

                        @ActivationConfigProperty(propertyName="messagingType", propertyValue="com.as.mdb.ASMessageListener"),

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

                              @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:/queue/com..as.adapter.inbound.shares"),

                              //@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),

                              //@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "0")

                              })

                      @Depends("as-message-bean-mdb.jar")

                      @ResourceAdapter("shares-fares-intg.ear#inbound-adapter.rar")

                       

                      public class SharesMessageBean extends ASProcess implements MessageListener

                       

                       

                      JBOSS SERVER CONSOLE LOG:

                       

                      11:49:54,899 INFO  [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-6) IJ020002: Deployed: file:/C:/Softwares/jboss-eap-6.1.0/jboss-eap-6.1/standalone/tmp/vfs/deployment4c0a568898d2c34c/inbound-adapter.rar-560df16e6d247d3b/contents/

                      11:49:55,344 INFO  [org.jboss.as.ejb3] (MSC service thread 1-2) JBAS014142: Started message driven bean 'SharesMessageBean' with 'shares-fares-intg#inbound-adapter' resource adapter

                      11:49:55,421 INFO  [org.jboss.ejb.client] (ServerService Thread Pool -- 58) JBoss EJB Client version 1.0.21.Final-redhat-1

                      11:49:55,714 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 32) JBAS018559: Deployed "shares-fares-intg.ear" (runtime-name : "shares-fares-intg.ear")

                       

                       

                      2)   In Mdb class if we are extending the custom  ASMessage Listener, No message listener of type com.as.mdb.ASMessageListener found in resource adapter shares-fares-intg.ear#inbound-adapter. How to resolve the below issue.

                       

                      Server Log:

                       

                      Caused by: java.lang.IllegalStateException: JBAS014521: No message listener of type com.as.mdb.ASMessageListener found in resource adapter shares-fares-intg.ear#inbound-adapter

                        at org.jboss.as.ejb3.component.EJBUtilities.createActivationSpecs(EJBUtilities.java:105)

                        at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:89)

                       

                      Here we are not using the Jboss-ejb3.xml. Here we are using Annotations.

                       

                      Any configurations we need to make for custom Message Listener.

                       

                      Please suggest me on this.

                       

                      Thanks in Advance.

                      Kondru Suresh

                      • 8. Re: JBAS014521: No message listener of type in ResourceAdapter
                        aung.htet

                        Hi Kondru,

                         

                        I am having the same issue. How did you resolve your issue regarding that "JBAS014521: No message listener of type" error?

                         

                        Thanks in advance,

                        Aung