8 Replies Latest reply on Jan 16, 2008 10:55 AM by jaikiran

    sar inside EAR not starting up

    axismundi


      I have a simple service.sar residing redirectly in myapp.ear.

      The sar is not being deployed and I don't understand why.
      I cannot even find an exception in log-file.

      Any hint?

        • 1. Re: sar inside EAR not starting up
          jaikiran

          You will have to add a jboss-app.xml in the META-INF folder of the ear and mention the sar file in it. Here's an example:


          <jboss-app>
          
           <module>
           <service>myApp.sar</service>
           </module>
          
          </jboss-app>
          


          where myApp.sar is at the root of the ear file.


          • 2. Re: sar inside EAR not starting up
            axismundi

            ty, that's not mentioned in the JBoss-docs and neither in the HelloWorld-example.

            My MBean definition looks like this:


            so what exactly is required in the tag ?

            both "importStartupService" and "myservice.sar" (name of the folder of the exploded sar directly under the ear-folder) appear not to work.

            • 3. Re: sar inside EAR not starting up
              axismundi

              Now I get a CNF, even thou the class is existing the sar-archive:

              Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: pkg.ImportStartupService
               at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
               at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:514)
               at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
               at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1204)
               at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
               at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
               at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
               at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
               at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
              


              Any idea what's going on here?

              • 4. Re: sar inside EAR not starting up
                axismundi

                I fixed it and the sar is deployed successfully.

                Now how can I change the order the archives are deployed without modifying the global URLDeploymentScanner defined in conf/jboss-server.xml ?

                The problem is that the SAR depends on the deployed EJB-archive.

                I suppose I need some declaration, but what is the syntax to specify an archive withing the same EAR ?


                • 5. Re: sar inside EAR not starting up
                  jaikiran
                  • 6. Re: sar inside EAR not starting up
                    axismundi

                     

                    "jaikiran" wrote:
                    See this http://wiki.jboss.org/wiki/Wiki.jsp?page=HowCanAnMBeanDependOnASessionBean


                    Excellent! Ty.
                    That's much better than starting a thread in the MBean to wait for the EJB-archive to finish deployment!

                    • 7. Re: sar inside EAR not starting up
                      axismundi

                      But why does this not work for a WAR-archive?
                      I can successfully query the war-deployment on JMX via JMX Agent View.

                      However, when I add this to the depends-list like

                      <depends>jboss.management.local:J2EEApplication=app.ear,J2EEServer=Local,j2eeType=WebModule,name=web.war</depends>
                      


                      then the SAR is never being started up!
                      What is the probllem here?


                      • 8. Re: sar inside EAR not starting up
                        jaikiran

                        Sorry, i haven't tried it with a war file.