12 Replies Latest reply on Jul 7, 2011 7:08 AM by kabirkhan

    problems in deploying EAR in as7

    oourfali

      Hey,

       

      I'm trying to test a deployment of an EAR on AS7 (I have it working in jboss EAS 5.1).

      Are there guidelines for migrating from previous versions of jboss to as7?

       

      The EAR contains a few jars, and a few wars.

       

      First issue I saw is that jars referenced in the classpath entry in <ear>/dummy.jar/META-INF/MANIFEST.MF, got errors of the type:

      "Class Path entry .... does not point to a valid jar for a class path reference".

       

      The referenced jars are in <ear>/lib.

       

      Changing the jar class-path entries from ref1.jar, ref2.jar.... to ../ref1.jar,../ref2.jar... solved this issue.

      But I still get these errors/warnings:

       

      09:05:28,700 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry jaxb-api.jar in "/root/git/jboss-as/build/target/jboss-7.0.0.Beta4-SNAPSHOT/standalone/deployments/<ear>/<war>/WEB-INF/lib/jaxb-impl-2.1.12.jar"  does not point to a valid jar for a Class-Path reference.

      09:05:28,701 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry activation.jar in "/root/git/jboss-as/build/target/jboss-7.0.0.Beta4-SNAPSHOT/standalone/deployments/<ear>/<war>/WEB-INF/lib/jaxb-impl-2.1.12.jar"  does not point to a valid jar for a Class-Path reference.

      09:05:28,701 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry jsr173_1.0_api.jar in "/root/git/jboss-as/build/target/jboss-7.0.0.Beta4-SNAPSHOT/standalone/deployments/<ear>/<war>/WEB-INF/lib/jaxb-impl-2.1.12.jar"  does not point to a valid jar for a Class-Path reference.

      09:05:28,701 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry jaxb1-impl.jar in "/root/git/jboss-as/build/target/jboss-7.0.0.Beta4-SNAPSHOT/standalone/deployments/<ear>/<war>/WEB-INF/lib/jaxb-impl-2.1.12.jar"  does not point to a valid jar for a Class-Path reference.

       

      09:05:28,739 WARN  [org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor] (MSC service thread 1-2) Could not read annotations on EJB interface com.demo.IResourceManager

      09:05:28,740 WARN  [org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor] (MSC service thread 1-2) Could not read annotations on EJB interface com.demo.IResourceManager

      09:05:28,903 INFO  [org.jboss.as.server] (MSC service thread 1-2) Service status report

       

      service module.spec.service."deployment.ejb3-persistence-1.0.2.GA.jar".main (missing) required by [service jboss.deployment.subunit."<ear>"."<jar>".POST_MODULE, service jboss.deployment.subunit."<ear>"."<jar>".POST_MODULE, service module.service."deployment.<ear>"."<jar>".main, service module.service."deployment.<ear>"."<jar1>".main

      service module.spec.service."deployment.hibernate-annotations-3.4.0.GA.jar".main (missing) required by [service......

       

      I get more messages of the type "service ... (missing)".

       

      the jars complained about in the class path warnings are found in jboss-eap5.1/lib and jboss-eap5.1/lib/endorsed. I put them inside the ear/lib in as7, while trying to make it work, but it didn't help.

       

      Also, I don't know what is the problem with reading the annotations of that class.

       

      Help will be appreciated.

      I can provide more details if needed.

       

      Thank you,

      Oved

        • 1. Re: problems in deploying EAR in as7
          jaikiran

          You can ignore those ClassPath warning or fix the classpath entries in the MANIFEST.MF. For jars/classes that you want to be available in the .ear classpath, just add them to .ear/lib. You don't have to add the ClassPath entries.

           

          09:05:28,739 WARN  [org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor] (MSC service thread 1-2) Could not read annotations on EJB interface com.demo.IResourceManager

          Can you post the exact application packaging? Where exactly is this IResourceManager located within the package?

           

          Also if possible, please attach the .ear which can reproduce this.

          • 2. Re: problems in deploying EAR in as7
            oourfali

            Hey,

             

            I didn't add the class-path entries, they were there in the ear in jboss eap5.1.

            If the warnings don't matter then I can leave the class-path entries as-is.

             

            As for the IResourceManager, it is in a jar located in ear/lib.

             

            As for the ear packaging, it consists of a few wars and jars in the <ear> folder, and also a few jars in ear/lib.

             

            You need a database in order to run it, so I guess the ear file won't help by itself.

             

            If the class is located in the ear/lib, isn't jboss supposed to find it and be able to read annotations from it?

             

            I'll check in the meantime if I can give more details about the environment.

             

            Thank you!

            Oved

            • 3. Re: problems in deploying EAR in as7
              jaikiran

              Oved O wrote:

               

              Hey,

               

              I didn't add the class-path entries, they were there in the ear in jboss eap5.1.

              If the warnings don't matter then I can leave the class-path entries as-is.

              Yeah, you can ignore those WARN messages

               

               

              Oved O wrote:

               

              As for the IResourceManager, it is in a jar located in ear/lib.

               

              As for the ear packaging, it consists of a few wars and jars in the <ear> folder, and also a few jars in ear/lib.

               

              ....

               

              If the class is located in the ear/lib, isn't jboss supposed to find it and be able to read annotations from it?

               

              That should have worked. Let me see if I can reproduce this issue.

              • 4. Re: problems in deploying EAR in as7
                oourfali

                I appreciate the quick response, and your time.

                 

                Let me know if you were able to reproduce it. If not I'll try to create a small reproduction in my environment.

                 

                Thank you,

                Oved

                • 5. Re: problems in deploying EAR in as7
                  jaikiran

                  Oved O wrote:

                   

                  I appreciate the quick response, and your time.

                   

                  Let me know if you were able to reproduce it.

                  Yes, I was able to reproduce this. I'm looking into what's causing this.

                  • 6. Re: problems in deploying EAR in as7
                    jaikiran
                    • 7. Re: problems in deploying EAR in as7
                      berni02

                      Hi,

                      I have the same problem. I am trying to migrate our server application from jboss 4 to jboss 7.

                      I have a base jar which contains round about 20 interfaces and located in the lib dir.

                      We need to separate the interfaces from its ejbs because we have a rich client which is using remoting.

                       

                      Is there a recommend other way to package in this szenario?

                       

                      Best regards and thanks in advance,

                      Berni

                      • 8. Re: problems in deploying EAR in as7
                        jaikiran

                        Bernhard Günter wrote:

                         

                         

                        Is there a recommend other way to package in this szenario?

                         

                        It's a bug. What you have currently is technically correct, so no need to change the packaging. We'll fix this issue before 7.0 Final

                        • 9. Re: problems in deploying EAR in as7
                          berni02

                          Thanks a lot! Is there a time schedule releasing the final jboss 7?

                          • 10. Re: problems in deploying EAR in as7
                            jaikiran

                            The plan is to release it within a couple of weeks if there aren't any major issues.

                            • 11. Re: problems in deploying EAR in as7
                              sabbirali

                              I have deployed EAR file which includes EJB and War file.

                               

                              i got log : [org.jboss.as.server.controller] (HttpManagementService-threads - 9) Deployed "TestEar.ear"

                               

                              but i am not able to run that war file through browser.

                               

                              In Jboss web console deployment module it shows enable.

                               

                              war context in Log [registering web context: /TestWeb]

                               

                              what will be problem ?

                              • 12. Re: problems in deploying EAR in as7
                                kabirkhan

                                sabbirali kadiwala wrote:

                                 

                                I have deployed EAR file which includes EJB and War file.

                                 

                                i got log : [org.jboss.as.server.controller] (HttpManagementService-threads - 9) Deployed "TestEar.ear"

                                 

                                but i am not able to run that war file through browser.

                                 

                                In Jboss web console deployment module it shows enable.

                                 

                                war context in Log [registering web context: /TestWeb]

                                 

                                what will be problem ?

                                You should really start a new thread rather than hijack someone elses.

                                If going to http://localhost:8080/TestWeb does not work for you, please start a new thread