1 Reply Latest reply on Aug 24, 2004 8:56 PM by mhiggins

    problem deploying a war in an ear

    mhiggins

      I am running Jboss 3.2.4

      I have an ear with the following layout

      app.ear
       app.war
       app.jar
       app.sar
       META-INF
       application.xml
       jboss-app.xml
      


      I can deploy the war on its own no problem but when I package it in the ear and deploy that I get the the following:

      Cause: java.lang.NoSuchMethodException: org.apache.catalina.core.StandardContext.setLoader(org.apache.catalina.Loader))
      Cause: org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (ReflectionException: Cannot find setter method setLoader StandardContext[null]
      Cause: java.lang.NoSuchMethodException: org.apache.catalina.core.StandardContext.setLoader(org.apache.catalina.Loader))
      ObjectName: jboss.j2ee:service=EARDeployment,url='app.ear'
      

      I looked trough all of the jars in JBOSS_HOME and found the above package in catlina.jar which is in the jbossweb-tomcat50.sar. I attempted to include this in my ear and got another err. I am confident this is not the crrect solution anyway. Any help would be appreciated.

      Here are what I belive to be the relavant parts of my server/app config:

      application.xml
      <application>
       <display-name>Our App</display-name>
       <module>
       <web>
       <web-uri>app.war</web-uri>
       <context-root>/app</context-root>
       </web>
       </module>
      
       <module>
       <java>app.jar</java>
       </module>
      
      </application>
      


      jboss-app.xml
      <?xml version="1.0"?>
      
      <jboss-app>
       <loader-repository>ourco:loader=app.ear</loader-repository>
      
       <module>
       <service>app.sar</service>
       </module>
      
      </jboss-app>
      


      jboss-service.xml (This is just a snip of the complete config please advise if I need to post more)
       <mbean code="org.jboss.management.j2ee.LocalJBossServerDomain"
       name="jboss.management.local:j2eeType=J2EEDomain,name=Manager">
       <attribute name="MainDeployer">jboss.system:service=MainDeployer</attribute>
       <attribute name="SARDeployer">jboss.system:service=ServiceDeployer</attribute>
       <attribute name="EARDeployer">jboss.j2ee:service=EARDeployer</attribute>
       <attribute name="WARDeployer">jboss.web:service=WebServer</attribute>
       <attribute name="JNDIService">jboss:service=Naming</attribute>
       <attribute name="JTAService">jboss:service=TransactionManager</attribute>
       </mbean>
      
      



        • 1. Re: problem deploying a war in an ear
          mhiggins

          Ok fixed the probelm by removing the loader-repository decleration in jboss-app

          <loader-repository>ourco:loader=app.ear</loader-repository>
          


          since this is the only app deployed in this server I don't care about
          polluting the classpath. Still not sure of the total purose of this, besids walling apps off from eacher, but this is the "Beginners Corner" after all.