3 Replies Latest reply on Dec 20, 2005 2:09 PM by Michael Moran

    Problem with SAR file

    fredatwork Newbie

      Hello,

      I have trouble setting up a sar file. Please note that I'm not too familiar with these king of deployment file yet.

      My sar file contains a META-INF/jboss-service.xml file as well as an scheduler_ejb.jar file. The jboss-service.xml file starts a Quartz scheduler (allowing my applications to schedule jobs). Quartz schedules jobs by calling methods of an EJB session bean included in the scheduler-ejb.jar file.

      Here is the problem:
      - when I deploy my sar file once JBoss is started, everything goes smoothly
      - when I start JBoss with the sar file already included in the deploy directory, JBoss throws an exception. Here is the log I receive short after a "Scheduler" session bean is deployed ("Scheduler" being the EJB session bean included in my scheduler-ejb.jar file) :

      Deploying SchedulerManager
      2005-07-20 11:40:14,718 DEBUG [org.jboss.ejb.EjbModule] Creating WebClassLoader of class org.jboss.web.WebClassLoader
      2005-07-20 11:40:14,828 WARN [org.jboss.ejb.EjbModule] Could not load the org.jboss.resource.connectionmanager.CachedConnectionInterceptor interceptor for this container
      javax.management.InstanceNotFoundException: jboss.jca:service=CachedConnectionManager is not registered.
       at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:509)
       at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:533)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.<init>(CachedConnectionInterceptor.java:73)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      .../...


      This error is obviously linked to the deployment of the EJB jar file. The deployement descriptor of this jar file includes a reference to a JDBC datasource. If I remove the jar file from the sar file and deploy it seperately, no more problem (but I do not want that).

      Can anyone help me with this dependency problem ?

      I tried to include a dependency statement in my jboss-service.xml file, but it did not work (note that I'm not familiar with dependecies yet):
      <depends>jboss.jca:service=CachedConnectionManager</depends>


      Any idea ?

      Fred

        • 1. Re: Problem with SAR file
          fredatwork Newbie

          Hello,

          I understood what the problem was. Sorry for the disturbance.

          For future readers :

          The 'defaut' config contains file jbossjca-service.xml which declares the CachedConnectionManager MBean.

          Furthermore, JBoss deploys sar files BEFORE *-service.xml files. See Wiki.

          This fully explains why the MBean inside the sar file could not put a dependance on the CachedConnectionManager MBean without an error.

          I changed my deployment order and made sure that the sar file is deployed last.

          Fred

          • 2. Re: Problem with SAR file
            Michael Moran Newbie

            Fred,

            Any chance you can share with me how to configure the sar file get deployed last?

            I've tried setting the RelativeOrder.value to 1000 in SARDeployer-xmbean.xml file. But it does not do anything.


            Get the relative order of the specified suffixes
            RelativeOrder
            int





            Thanks in advance for your help.


            • 3. Re: Problem with SAR file
              Michael Moran Newbie


              Get the relative order of the specified suffixes
              RelativeOrder
              int