4 Replies Latest reply on Mar 13, 2009 4:32 PM by edward winston

    Rar deployment inside ear fails with deployment exception

    edward winston Newbie

      I have a project that uses an inbound resource connector and an message driven bean. I am trying to deploy these on jboss 4.2.3. The app has the following layout :

      app.ear
       lib/logic.jar
       ejb.jar
       ra.rar
      


      The ra.rar just contains the ra.xml and the manifest Class-Path refers to lib/logic.jar. The ejb.jar also uses lib/logic.jar, and the definition of the MDB is within this jar. I sorted out the deployment issues around ordering, so I know the deployment order is not a problem.

      When I try to deploy, I get the following message :

      15:17:27,806 INFO [EJBContainer] STARTED EJB: com.my.mdb.WebAlertRAMDB ejbName: WebAlertRAMDB
      15:17:27,841 WARN [ServiceController] Problem starting service jboss.j2ee:ear=ear.ear,jar=ejb.jar,name=WebAlertRAMDB,service=EJB3
      org.jboss.deployment.DeploymentException: MessagingType 'com.my.api.WebAlertProcessor' not found in resource deployment jboss.jca:service=RARDeployment,name='ear.ear#ra.rar'
       at org.jboss.resource.deployment.RARDeployment.createActivationSpec(RARDeployment.java:252)
       at org.jboss.resource.deployment.RARDeployment.internalInvoke(RARDeployment.java:218)
       at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
      


      Any clues as to what I am doing wrong? I tried putting the class it is looking for in the ra.rar but that didn't help. I also tried putting it in ejb.jar, again to no avail. And I have tried putting the logic.jar at the same level as the modules (ejb.jar and ra.rar).

      The jboss-app.xml has a custom class loader and the module order value of strict. Aside from that it is empty.

      Thanks,
      Edward

        • 1. Re: Rar deployment inside ear fails with deployment exceptio
          edward winston Newbie

          Just a bit more information, in case it is pertinent and not obvious. The rar is an inbound resource adapter that sends its messages to the MDB in the ejb.jar. It looks like the rar is not completely deployed (in that the classloader hasn't been set up) by the time the ejb.jar starts it's deployment aand configuration and this then causes the class to not be found. At least that's my take on the situation.

          Is this a type of solution/deployment that is supported even? I haven't tried it with 2 separate parts yet, but that is what I will do next. Basically I'll take the rar out of the ear and deploy it and then see if I can deploy the ear.

          Edward

          • 2. Re: Rar deployment inside ear fails with deployment exceptio
            Vicky Kak Master

             

            "ewinston" wrote:

            The ra.rar just contains the ra.xml and the manifest Class-Path refers to lib/logic.jar. The ejb.jar also uses lib/logic.jar, and the definition of the MDB is within this jar. I sorted out the deployment issues around ordering, so I know the deployment order is not a problem.


            You don't need to define the Class-Path entry in the manifest of the ra.rar, you can rely on the library-directory feature of javaee5 from Jboss, check
            <attribute name="EnablelibDirectoryByDefault">true</attribute>
            from the$JBOSS_HOME/server/default/deploy/ear-deployer.xml

            Where is MDB packaged, is it is in ejb.jar Or logic.jar?
            How did you sort out the deployment ordering issue?

            • 3. Re: Rar deployment inside ear fails with deployment exceptio
              edward winston Newbie

              The MDB is packaged in the ejb.jar. It is done with annotations, so there is no ejb-jar.xml.

              For the deployment issue, I read all of the posts about fixing the code for deployment ordering and then added the <module-order>strict</module-order> to the jboss-app.xml. And the modules are listed in the application.xml like so :

              <application>
               <module>
               <connector>ra.rar</connector>
               </module>
               <module>
               <ejb>ejb.jar</ejb>
               </module>
               <module>
               <web>
               <web-uri>web</web-uri>
               </web>
               </module>
              </application>
              

              And I saw in the log file that the order of deployment was preserved.

              I will remove the classpath from the rar, and check on that setting.

              Interestingly, i just tried the separate deployment and got the same error, so I must have something else wrong also.

              Edward

              • 4. Re: Rar deployment inside ear fails with deployment exceptio
                edward winston Newbie

                Ok, sorry for the delay in posting this reply. This issue turned out to be a configuration error in the ra.xml. I had the wrong value in the messagelistener-type value. Once that was fixed everything deployed fine. I was even able to include the data source in the ear and have everything deployed in a single file.

                Thanks for the help.

                Edward