7 Replies Latest reply on Nov 3, 2008 2:05 AM by ienvyou

    [Deployment] "no META-INF/application.xml found" - Exploded

      There is a problem when I am deploying a exploded EAR on outside of /server/default/deploy directory.

      I also tried to find similar issue on this forum, but I think there is no correct answer about this.

      My current environment is below:
      Red Hat Enterprise Linux
      JDK 1.5.0_14
      JBoss 4.2.3

      Target ear structure is,
      EarContent.ear
      - hello-web.war(exploded)
      - **.jsp
      - WEB-INF
      - classes
      - lib
      - web.xml
      - META-INF
      - application.xml

      jboss-service.xml URLs value

      <attribute name="URLs">
       deploy/,/home/jboss/applications/EarContent.ear
       </attribute>


      application.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
      
       <display-name>sample ear</display-name>
      
       <module>
       <web>
       <web-uri>hello-web.war</web-uri>
       <context-root>/hello</context-root>
       </web>
       </module>
      </application>
      



      13:50:00,077 ERROR [MainDeployer] Could not initialise deployment: file:/home/jboss/applications/EarContent.ear
      org.jboss.deployment.DeploymentException: No META-INF/application.xml found
      at org.jboss.deployment.EARDeployer.init(EARDeployer.java:146)


      I correctly placed META-INF/application.xml under EarContent.ear directory

      BTW, I don't know why it works under the /deploy folder.

      Does it have a restriction unless directory is $server/default/deploy?

        • 1. Re: [Deployment]
          jaikiran

           

          <attribute name="URLs">
           deploy/,/home/jboss/applications/EarContent.ear
           </attribute>


          This should be
           <attribute name="URLs">
           deploy/,/home/jboss/applications/
           </attribute>


          i.e. you should actually be pointing to a folder which has applications to be deployed.


          • 2. Re: [Deployment]

            Thanks, jaikiran

            It works fine when I change URLs to "/home/jboss/applications/"
            But, applications directory contains other configuration files which are not EAR, WAR, JAR types. For instance, these are SecreteKey.ser, my license related folder.

            If application has the SecreteKey.ser, JBoss application server can't deploy since this exception :

            10:03:28,078 INFO [EARDeployer] Started J2EE application: /home/jboss/application/EarContent.ear/
            10:03:29,140 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

            --- Packages waiting for a deployer ---
            org.jboss.deployment.DeploymentInfo@44b6bc9a { url=/home/jboss/applications/SecreteKey.ser }
            deployer: null
            status: null
            state: INIT_WAITING_DEPLOYER
            watch: /home/jboss/applications/SecreteKey.ser
            altDD: null
            lastDeployed: 1225674208531
            lastModified: 1225674208531
            mbeans:


            I found a comment in conf/jboss-service.xml like this
            "URLs may be local (file:) or remote (http:). Scanning is supported
            for remote URLs but unpacked deployment units are not."


            In this case, I have to separate config folder and ear folder like this?

            /jboss/home/applications/ <--- deployment target, only EAR, WAR, JAR, SAR
            /jboss/home/config/ <-- other configuration for 'applications' directory

            is it correct? Is there other ways to deploy correctly without change?

            • 3. Re: [Deployment]
              jaikiran

              Do you require those configurations to be outside the EAR file? Can those be packaged within the EAR? Or can those be placed in %JBOSS_HOME%/server/< serverName>/conf folder (which by default is in classpath).

              • 4. Re: [Deployment]

                thank you quick reply!

                In my point of view, work around is always opened.
                I think origianl problem is that EARDeployer can't deploy an external exploded ear despite JBoss document describes that it can deploy exploded EAR : http://www.jboss.org/community/docs/DOC-9719

                Many developer or customer don't want their application to deploy on $server/deploy directory because of complexity and so on.

                As a result, Can't JBoss support an expernal exploded ear? I didn't find this answer anywhere.

                • 5. Re: [Deployment]

                  In addtion, below comment with red color is not apply for my exploded application.

                  jboss-service.xml

                  Example URLs:
                   deploy/
                   scans ${jboss.server.url}/deploy/, which is local or remote
                   depending on the URL used to boot the server
                   ${jboss.server.home}/deploy/
                   scans ${jboss.server.home)/deploy, which is always local
                   file:/var/opt/myapp.ear
                   deploy myapp.ear from a local location
                   file:/var/opt/apps/
                   scans the specified directory
                   http://www.test.com/netboot/myapp.ear
                   deploys myapp.ear from a remote location
                   http://www.test.com/netboot/apps/
                   scans the specified WebDAV location


                  If It can be supported an EAR what is only packaged, it doesn't have any flexibility for many users who want to use external service directory.


                  • 6. Re: [Deployment]

                    In addtion, below comment with red color is not apply for my exploded application.

                    jboss-service.xml

                    Example URLs:
                     deploy/
                     scans ${jboss.server.url}/deploy/, which is local or remote
                     depending on the URL used to boot the server
                     ${jboss.server.home}/deploy/
                     scans ${jboss.server.home)/deploy, which is always local
                     file:/var/opt/myapp.ear
                     deploy myapp.ear from a local location
                     file:/var/opt/apps/
                     scans the specified directory
                     http://www.test.com/netboot/myapp.ear
                     deploys myapp.ear from a remote location
                     http://www.test.com/netboot/apps/
                     scans the specified WebDAV location


                    If It can be supported an EAR what is only packaged, it doesn't have any flexibility for many users who want to use external service directory.


                    • 7. Re: [Deployment]

                      In addtion, below comment with red color is not apply for my exploded application.

                      jboss-service.xml

                      Example URLs:
                       deploy/
                       scans ${jboss.server.url}/deploy/, which is local or remote
                       depending on the URL used to boot the server
                       ${jboss.server.home}/deploy/
                       scans ${jboss.server.home)/deploy, which is always local
                       file:/var/opt/myapp.ear
                       deploy myapp.ear from a local location
                       file:/var/opt/apps/
                       scans the specified directory
                       http://www.test.com/netboot/myapp.ear
                       deploys myapp.ear from a remote location
                       http://www.test.com/netboot/apps/
                       scans the specified WebDAV location


                      If It can be supported an EAR what is only packaged, it doesn't have any flexibility for many users who want to use external service directory.