3 Replies Latest reply on Nov 24, 2010 6:26 AM by Wolfgang Knauf

    Exception deploying MDB !

    Gurvinderpal Narula Newbie

      Hi,

       

       

      I'm trying to deploy an EJB Jar that has just the following compiled classes for an MDB on JBOSS 5.1.0 :

       

           com/

           com/company/

           com/company/services

           com/company/services/Mail.class

           com/company/services/ForwardResponse.class

       

       

      I get the following error when I deploy the MDB:

       

      13:30:53,603 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/opt/jboss/server/node1/deploy/ServiceResponse.jar/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error deploying ServiceResponse.jar: failed to initialize bean container
              at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
              at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)

           .

           .

           .

           .

             at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.RuntimeException: failed to initialize bean container
              at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:257)
              at org.jboss.ejb3.mdb.MessagingContainer.<init>(MessagingContainer.java:87)
              at org.jboss.ejb3.mdb.MDB.<init>(MDB.java:63)
              at org.jboss.ejb3.Ejb3AnnotationHandler.getMDB(Ejb3AnnotationHandler.java:339)
           .

           .

              at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
              ... 33 more
      Caused by: java.lang.IllegalStateException: Null beannMetaData
              at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:315)
              at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.initialise(BeanInterceptorMetaDataBridge.java:235)
              at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.<init>(BeanInterceptorMetaDataBridge.java:138)
              at org.jboss.ejb3.interceptors.metadata.AdditiveBeanInterceptorMetaDataBridge.<init>(AdditiveBeanInterceptorMetaDataBridge.java:48)
              at org.jboss.ejb3.aop.BeanContainer.initialize(BeanContainer.java:195)
              at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:253)
              ... 43 more
      Caused by: java.lang.NullPointerException
              at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:268)
              ... 48 more

       

      Can someone please help me with how to trace down what I'm doing wrong ?

       

      Thanks

      Groove

        • 1. Re: Exception deploying MDB !
          Wolf-Dieter Fink Master

          look like an annotation problem.

          Could you post the annotation header of your classes?

          • 2. Re: Exception deploying MDB !
            Gurvinderpal Narula Newbie

            The MDB that's packaged in the jar is implemented by ForwardResponse.java  as follows :


            package com.lazboy.services;

             

            import java.io.FileInputStream;

            import java.io.IOException;

            .

            .

            .

            .

            .

            import sbxprrq.*;

            import pricerequest.ProgramInterface;

            import pricerequest.ProgramInterface.Dfhcommarea.InputOpts;

             


            @MessageDriven(


                            activationConfig = {


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


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


                    })

             

            public class ForwardResponse implements MessageListener {

             

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

              private javax.jms.ConnectionFactory qcf;

             

               .

              .

              .

              @PostConstruct

              public void init()

              {

               

              }

             

                /**

                 * @see MessageListener#onMessage(Message)

                 */

              public void onMessage(Message message) {

             

            The MDB consumes messages from 'RetailPriceRequestQueue' that's defined as follows in messaging/destinations-service.xml as follows :

             

              <mbean code="org.jboss.jms.server.destination.QueueService"

                  name="jboss.messaging.destination:service=Queue,name=RetailPriceRequestQueue"

                  xmbean-dd="xmdesc/Queue-xmbean.xml">

                  <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>

                  <depends>jboss.messaging:service=PostOffice</depends>

               </mbean>

             

            I've verified that the queue above does appear as an active queue in jmx console when the server starts.


            • 3. Re: Exception deploying MDB !
              Wolfgang Knauf Master

              Hi,

               

              The "null beannMetaData" exception seems to happen sometimes (see https://jira.jboss.org/browse/EJBTHREE-1969 ), but I don't know the details.

               

              In your "destinations-service.xml", I think you miss the JNDI name of the configured queue, to which the annotation ActivationConfigProperty(propertyName="destination", ... points.

               

                <mbean code="org.jboss.jms.server.destination.QueueService"

                    name="jboss.messaging.destination:service=Queue,name=RetailPriceRequestQueue"

                    xmbean-dd="xmdesc/Queue-xmbean.xml">

                    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>

                    <depends>jboss.messaging:service=PostOffice</depends>

                 <attribute name="JNDIName">queue/RetailPriceRequestQueue</attribute>

                 </mbean>

               

              Hope this helps

               

              Wolfgang