8 Replies Latest reply on May 1, 2013 6:43 AM by nakshathri

    Deploying EAR into JBoss 7.1.1

    nakshathri

      Hello All,

       

      We are migrating application ear from Weblogic to JBoss 7.1.1. Below is the content of the ear:

       

      lib

      • All dependent Jars

      war file

      META-INF

      • application.xml
      • jboss-app.xml
      • jboss-deployment-structure.xml
      • jboss-all.xml

       

      Attached are the files. When i deploy the ear we are getting below exception

       

      20:12:49,182 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry jackson-mapper-asl-1.8.11.jar in "/G:/Manjunath/Projects/FWCMS/Sof

      twares/jboss-as-7.1.1/bin/content/tc-app-1.0.0.ear/tc-web-1.0.0.war"  does not point to a valid jar for a Class-Path reference.

       

      This warning is coming for all the jars which are been included as part lib folder within ear. And below is the roll back exception:

       

      20:12:49,737 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "tc-app-1.0.0.ear" was rolled back with failure messag

      e {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"tc-app-1.0.0.ear\".PARSEjboss.deployment.subunit.\"tc-app-1.0.0.ear

      \".\"lib/tc-services-1.0.0.jar\".STRUCTURE, jboss.deployment.subunit.\"tc-app-1.0.0.ear\".\"lib/tc-common-1.0.0.jar\".STRUCTURE, jboss.deployment.subunit.\"tc-a

      pp-1.0.0.ear\".\"lib/tc-model-1.0.0.jar\".STRUCTURE, jboss.deployment.subunit.\"tc-app-1.0.0.ear\".\"lib/tc-generated-1.0.0.jar\".STRUCTUREMissing[jboss.deploym

      ent.unit.\"tc-app-1.0.0.ear\".PARSEjboss.deployment.subunit.\"tc-app-1.0.0.ear\".\"lib/tc-services-1.0.0.jar\".STRUCTURE, jboss.deployment.subunit.\"tc-app-1.0.

      0.ear\".\"lib/tc-common-1.0.0.jar\".STRUCTURE, jboss.deployment.subunit.\"tc-app-1.0.0.ear\".\"lib/tc-model-1.0.0.jar\".STRUCTURE, jboss.deployment.subunit.\"tc

      -app-1.0.0.ear\".\"lib/tc-generated-1.0.0.jar\".STRUCTURE]"]}

      20:12:49,768 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015871: Deploy of deployment "mysql-connector-java-5.1.24-bin.jar" was rolled back

      with no failure message

      20:12:49,790 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment mysql-connector-java-5.1.24-bin.jar in 18ms

      20:12:49,795 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment lib/tc-model-1.0.0.jar in 56ms

      20:12:49,798 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment lib/tc-services-1.0.0.jar in 58ms

      20:12:49,798 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment lib/tc-common-1.0.0.jar in 59ms

      20:12:49,798 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment lib/tc-generated-1.0.0.jar in 58ms

      20:12:50,012 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment tc-web-1.0.0.war in 272ms

      20:12:50,161 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment tc-app-1.0.0.ear in 422ms

      20:12:50,165 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.deployment.subunit."tc-app-1.0.0.ear"."lib/tc-common-1.0.0.jar".STRUCTURE (missing) dependents: [service jboss.deployment.unit."tc-app-1.0.0

      .ear".PARSE]

            service jboss.deployment.subunit."tc-app-1.0.0.ear"."lib/tc-generated-1.0.0.jar".STRUCTURE (missing) dependents: [service jboss.deployment.unit."tc-app-1.

      0.0.ear".PARSE]

            service jboss.deployment.subunit."tc-app-1.0.0.ear"."lib/tc-model-1.0.0.jar".STRUCTURE (missing) dependents: [service jboss.deployment.unit."tc-app-1.0.0.

      ear".PARSE]

            service jboss.deployment.subunit."tc-app-1.0.0.ear"."lib/tc-services-1.0.0.jar".STRUCTURE (missing) dependents: [service jboss.deployment.unit."tc-app-1.0

      .0.ear".PARSE]

       

      Really appreciate if you can help me to identify the issue wrt to this deployment. Appreciate your help.

       

      Regards,

      Manjunath

        • 1. Re: Deploying EAR into JBoss 7.1.1
          atulkc

          If you turn on DEBUG/TRACE level logs for org.jboss you will come to know what exactly is missing/not found. You can then add appropriate depedencies in jboss-deployment-structure.xml. At least, that's how I solved my deployment issues.

          • 2. Re: Deploying EAR into JBoss 7.1.1
            sfcoy

            The warnings are irritating, but normal. It's not necessary to add manifest classpaths referencing jars that are installed in an EAR/lib directory.

             

            There's something else wrong. Please attach your entire server.log.

            • 3. Re: Deploying EAR into JBoss 7.1.1
              nakshathri

              Hello Stephen and Atul,

               

              I have attached the server.log and also the boot.log with the debug on for the org.jboss. Really appreciate if you can help me in fixing this issue.

               

              Regards,

              Manjunath.

              • 4. Re: Deploying EAR into JBoss 7.1.1
                sfcoy

                1. Please show us the output of:

                     $ jar tf tc-app-1.0.0.ear

                 

                2. Please attach your standalone.xml file

                • 5. Re: Deploying EAR into JBoss 7.1.1
                  nakshathri

                  Hello Stephen,

                   

                  Below is the result of jar tf tc-app-1.0.0.ear. Also I have attached the standalone.xml.

                   

                  META-INF/

                  META-INF/MANIFEST.MF

                  lib/

                  lib/activation-1.1.jar

                  lib/antlr-2.7.6.jar

                  lib/aopalliance-1.0.jar

                  lib/asm-3.1.jar

                  lib/aspectjtools-1.6.2.jar

                  lib/castor-core-1.3.3-rc1.jar

                  lib/castor-xml-1.3.3-rc1.jar

                  lib/cglib-2.2.2.jar

                  lib/commons-beanutils-1.8.3.jar

                  lib/commons-codec-1.6.jar

                  lib/commons-collections-3.2.1.jar

                  lib/commons-configuration-1.8.jar

                  lib/commons-digester-2.1.jar

                  lib/commons-fileupload-1.2.1.jar

                  lib/commons-io-2.4.jar

                  lib/commons-lang-2.6.jar

                  lib/commons-lang3-3.1.jar

                  lib/commons-logging-1.1.1.jar

                  lib/dom4j-1.6.1.jar

                  lib/dozer-5.4.0.jar

                  lib/ehcache-core-2.6.2.jar

                  lib/ehcache-terracotta-2.6.2.jar

                  lib/fwcms-entity-1.0.0.jar

                  lib/fwcms-generated-1.0.0.jar

                  lib/fwcms-model-1.0.0.jar

                  lib/gson-2.2.jar

                  lib/hibernate-commons-annotations-3.2.0.Final.jar

                  lib/hibernate-core-3.6.10.Final.jar

                  lib/hibernate-jpa-2.0-api-1.0.1.Final.jar

                  lib/hibernate-validator-3.1.0.GA.jar

                  lib/jackson-core-asl-1.8.11.jar

                  lib/jackson-jaxrs-1.7.1.jar

                  lib/jackson-mapper-asl-1.8.11.jar

                  lib/jackson-xc-1.7.1.jar

                  lib/javassist-3.12.1.GA.jar

                  lib/javax.inject-1.jar

                  lib/jcl-over-slf4j-1.6.6.jar

                  lib/jersey-client-1.8.jar

                  lib/jersey-core-1.8.jar

                  lib/jersey-json-1.8.jar

                  lib/jersey-server-1.8.jar

                  lib/jersey-spring-1.8.jar

                  lib/jettison-1.1.jar

                  lib/jms-api-1.1-rev-1.jar

                  lib/joda-time-1.6.2.jar

                  lib/jstl-1.2.jar

                  lib/jta-1.1.jar

                  lib/log4j-1.2.16.jar

                  lib/mail-1.4.3.jar

                  lib/mongo-java-driver-2.7.2.jar

                  lib/morphia-1.00-SNAPSHOT.jar

                  lib/quartz-1.8.6.jar

                  lib/slf4j-api-1.6.0.jar

                  lib/slf4j-log4j12-1.7.2.jar

                  lib/spring-aop-3.1.2.RELEASE.jar

                  lib/spring-asm-3.1.2.RELEASE.jar

                  lib/spring-aspects-3.1.2.RELEASE.jar

                  lib/spring-beans-3.1.2.RELEASE.jar

                  lib/spring-context-3.1.2.RELEASE.jar

                  lib/spring-context-support-3.1.2.RELEASE.jar

                  lib/spring-core-3.1.2.RELEASE.jar

                  lib/spring-expression-3.1.2.RELEASE.jar

                  lib/spring-jdbc-3.1.2.RELEASE.jar

                  lib/spring-jms-3.1.2.RELEASE.jar

                  lib/spring-ldap-core-1.3.1.RELEASE.jar

                  lib/spring-orm-3.1.2.RELEASE.jar

                  lib/spring-security-acl-3.1.2.RELEASE.jar

                  lib/spring-security-aspects-3.1.2.RELEASE.jar

                  lib/spring-security-config-3.1.2.RELEASE.jar

                  lib/spring-security-core-3.1.2.RELEASE.jar

                  lib/spring-security-ldap-3.1.2.RELEASE.jar

                  lib/spring-security-taglibs-3.1.2.RELEASE.jar

                  lib/spring-security-web-3.1.2.RELEASE.jar

                  lib/spring-test-3.1.2.RELEASE.jar

                  lib/spring-tx-3.1.2.RELEASE.jar

                  lib/spring-web-3.1.2.RELEASE.jar

                  lib/spring-webmvc-3.1.2.RELEASE.jar

                  lib/spring-webmvc-portlet-3.1.2.RELEASE.jar

                  lib/stax-1.2.0.jar

                  lib/stax-api-1.0.1.jar

                  lib/tc-common-1.0.0.jar

                  lib/tc-generated-1.0.0.jar

                  lib/tc-model-1.0.0.jar

                  lib/tc-services-1.0.0.jar

                  lib/terracotta-toolkit-1.6-runtime-5.2.0.jar

                  lib/velocity-1.7.jar

                  lib/xmlbeans-2.4.0.jar

                  META-INF/application.xml

                  META-INF/jboss-deployment-structure.xml

                  tc-web-1.0.0.war

                  META-INF/maven/

                  META-INF/maven/org.fwcms.tc/

                  META-INF/maven/org.fwcms.tc/tc-app/

                  META-INF/maven/org.fwcms.tc/tc-app/pom.xml

                  META-INF/maven/org.fwcms.tc/tc-app/pom.properties

                   

                  Thank you.

                   

                  Regards,

                  Manjunath

                  • 6. Re: Deploying EAR into JBoss 7.1.1
                    sfcoy

                    Please remove the following jars from the EAR:

                    lib/activation-1.1.jar

                    lib/hibernate-jpa-2.0-api-1.0.1.Final.jar

                    lib/javax.inject-1.jar

                    lib/jms-api-1.1-rev-1.jar

                    lib/jstl-1.2.jar

                    lib/jta-1.1.jar

                    lib/mail-1.4.3.jar

                    lib/stax-1.2.0.jar

                    lib/stax-api-1.0.1.jar

                     

                    These all provide code that is part of JBoss and their presence can cause weird and ugly things to happen.

                     

                    Also, as you are using the jersey RS implementation you need to exclude the standard JBoss RestEasy module in your jboss-deployment-structure.xml file.

                    • 7. Re: Deploying EAR into JBoss 7.1.1
                      sfcoy

                      And the real problem:

                       

                      {code:xml}

                        <module>

                          <java>lib/tc-generated-1.0.0.jar</java>

                        </module>

                        <module>

                          <java>lib/tc-model-1.0.0.jar</java>

                        </module>

                        <module>

                          <java>lib/tc-common-1.0.0.jar</java>

                        </module>

                        <module>

                          <java>lib/tc-services-1.0.0.jar</java>

                        </module>

                      {code}

                       

                      Remove these from your application.xml. "java" modules are for application clients. Jars that are placed in the the EAR/lib directory are automatically made available to the application.

                       

                      I still recommend that you remove the jars referenced in my earlier response and remove the manifest classpath entries from the WAR file.

                      • 8. Re: Deploying EAR into JBoss 7.1.1
                        nakshathri

                        Thank you Stephen. This is how my application.xml looks now :

                         

                        <?xml version="1.0" encoding="UTF-8"?>

                        <!DOCTYPE application PUBLIC

                                  "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"

                                  "http://java.sun.com/dtd/application_1_3.dtd">

                        <application>

                          <display-name>tc-app</display-name>

                          <module>

                            <web>

                              <web-uri>tc-web-1.0.0.war</web-uri>

                              <context-root>/tc</context-root>

                            </web>

                          </module>

                        </application>

                         

                        And this is what i have added for the jboss-deployment-structure.xml

                        <?xml version="1.0" encoding="UTF-8"?>

                        <jboss-deployment-structure>

                            <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

                            <deployment>

                                            <exclusions>

                                                      <module name="org.jboss.as.jaxrs" />

                                            </exclusions>

                                  </deployment>

                        </jboss-deployment-structure>

                         

                         

                         

                        But after deploying this gives me error:

                        org.jboss.msc.service.StartException in service jboss.deployment.unit."tc-app-1.0.0.ear".POST_MODULE: Failed to process phase POST_MODULE of deployment "tc-app

                        -1.0.0.ear"

                                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_35]

                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_35]

                                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]

                        Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011232: Only one JAX-RS Application Class allowed.  com.sun.jersey.api.core.Def

                        aultResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.ApplicationAdapter com

                        .sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.ResourceConfig com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jerse

                        y.api.core.WebAppResourceConfig com.sun.jersey.api.core.PackagesResourceConfig

                                at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:209)

                                at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:101)

                                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                                ... 5 more

                         

                        But if i comment below lines in standalone.xml, then the deployment was successful.

                         

                        <extension module="org.jboss.as.jaxrs"/>

                        <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

                         

                        Please suggest. Also as we had in JBoss 5.1, the jboss.home.url etc JBoss Properties, are they available in JBoss 7.1? I was not able to use jboss.home.url in JBoss 7.1.1.

                         

                        Regards,

                        Manjunath