4 Replies Latest reply on Oct 2, 2008 11:49 AM by Tamil Selvan

    Exploded EAR deployment problem

    Tamil Selvan Newbie

      Hi all,
      I am trying to deploy an application an exploded format. I have created 3 different projects EAR, JAR (EJB) and WAR. I have configured all 3 different projects in application.xml in EAR project and I referenced in JBOSS server.

      The application.xml file entry as follows:

      <display-name>VPS_EAR</display-name>

      ../../../../../../VPS_WORKSPACE\VPS_EJB\classes.jar // The location where my EJB project is exist



      <web-uri>/../../../../../VPS_WORKSPACE\VPS_WEB\WebContent</web-uri> // The location where my WEB project is exist
      <context-root>/VPS</context-root>




      I am getting a problem when I started the server and server finds ejb project and start compiling an ejb. The problem was:

      12:40:11,884 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.2.2.GA/server/default/deploy/VPS.ear/
      12:40:12,650 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=classes.jar
      java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
      at sun.reflect.annotation.AnnotationParser.parseClassArray(Unknown Source)
      at sun.reflect.annotation.AnnotationParser.parseArray(Unknown Source)
      at sun.reflect.annotation.AnnotationParser.parseMemberValue(Unknown Source)
      at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source)
      at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
      at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
      at java.lang.Class.initAnnotationsIfNecessary(Unknown Source)
      at java.lang.Class.getAnnotation(Unknown Source)
      at org.jboss.aop.annotation.AnnotationElement.getVisibleAnnotation(AnnotationElement.java:88)

        • 1. Re: Exploded EAR deployment problem
          jaikiran pai Master

           

          "tamilsmani" wrote:
          I have configured all 3 different projects in application.xml in EAR project and I referenced in JBOSS server.

          The application.xml file entry as follows:
          <application>
           <display-name>VPS_EAR</display-name>
           <module>
          <ejb>../../../../../../VPS_WORKSPACE\VPS_EJB\classes.jar</ejb> // The location where my EJB project is exist
           </module>
           <module>
           <web>
           <web-uri>/../../../../../VPS_WORKSPACE\VPS_WEB\WebContent</web-uri> // The location where my WEB project is exist
           <context-root>/VPS</context-root>
           </web>
           </module>
          </application>
          




          Are you packaging the war and the ejb jar inside the EAR? The application.xml looks incorrect. The path is relative to the root of the ear. So it should look like:
          <application>
           <display-name>VPS_EAR</display-name>
           <module>
          <ejb>classes.jar</ejb>
           </module>
           <module>
           <web>
           <web-uri>WebContent.war</web-uri>
           <context-root>/VPS</context-root>
           </web>
           </module>
          </application>


          The jar and the war will be at the root of the EAR.


          • 2. Re: Exploded EAR deployment problem
            Tamil Selvan Newbie

            I am sure there is no problem with application.xml. You can go ahead with my application.xml when you have your EJB and WAR are in outside of jboss server. I have tried this approach with EJB 2 with exploded EAR format it worked.
            I am new to EJB3 and it uses lots of annotations. I am still suspect about did i miss any configuration or jars.

            Advance thanx

            • 3. Re: Exploded EAR deployment problem
              jaikiran pai Master

               

              I am new to EJB3 and it uses lots of annotations. I am still suspect about did i miss any configuration or jars.


              I found these 2 threads with similar errors. Looks like you are probably missing some interceptor class in the classpath.

              http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921326#3921326

              http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104321#4104321


              I am sure there is no problem with application.xml. You can go ahead with my application.xml when you have your EJB and WAR are in outside of jboss server.


              I wouldn't have expected that to work. From what i know, an application.xml is supposed to list the the modules available within the EAR.

              • 4. Re: Exploded EAR deployment problem
                Tamil Selvan Newbie

                The problem is purely on AOP annotation which is used by JBOSS and your JDK. JBOSS 4.2.2 uses JDK1.5 annotation. But my workspace uses JDK1.6 annotation. This is the cause for the problem. If you want to check annotation references in JBOSS login into the console and expand JBOS AOP link you could see the annotation entry.

                You have to make sure your JDK and JBOS annotation should be same version.

                It worked perfectly at my envrionment.

                Regards
                Tamil Selvan.