7 Replies Latest reply on Apr 14, 2009 11:55 AM by peterj

    javaee-api for jboss-5.0.0.GA

    jcrouvi

      Hi,
      We are using javaee-api-5.jar from sun:
      http://download.java.net/maven/1/javaee/jars/
      but it is not complete (see http://www.nabble.com/JUnit-tests-requiring-j2ee.jar-fail-when-running-mvn-surefire:test-td15060503.html) and all our JUnit-Tests are failing with the following error message: Absent Code attribute in method that is not native or abstract in class file...

      Does JBoss provide such a JAR for JBoss Version 5.0.0 GA?

      Thank You for your help
      J.-Claude

        • 1. Re: javaee-api for jboss-5.0.0.GA
          jaikiran

          There's a jboss-javaee.jar in %JBOSS_HOME%/common/lib which you can use.

          • 2. Re: javaee-api for jboss-5.0.0.GA
            jcrouvi

            Thank you for your answer.

            This jar doesn't contain all the classes I want: e.g. the whole package javax/persistence/ is missing.

            So I can't use this jar.

            • 3. Re: javaee-api for jboss-5.0.0.GA
              jaikiran

              Those classes are in %JBOSS_HOME%/common/lib/ejb3-persistence.jar.

              You can actually add jbossall-client.jar (and other jars included in it's MANIFEST.MF) to the client classpath. This will have the complete set of dependent jar files.

              • 4. Re: javaee-api for jboss-5.0.0.GA
                jcrouvi

                I have checked the file:
                $JBOSS_HOME/client/jbossall-client.jar
                and I have noticed that it contains only a file "readme.txt" and a file "meta-inf/manifest.mf".
                Both files contain only a list of libraries.

                I have found under http://repository.jboss.com/maven2/ the following jar file (we are using maven 2):

                 <dependency>
                 <groupId>org.jboss.client</groupId>
                 <artifactId>jbossall-client</artifactId>
                 <version>5.0.0.Beta4</version>
                 </dependency>
                


                Is this jar file correct? Can we use it?

                • 5. Re: javaee-api for jboss-5.0.0.GA
                  jaikiran

                   

                  <dependency>
                   <groupId>org.jboss.client</groupId>
                   <artifactId>jbossall-client</artifactId>
                   <version>5.0.0.Beta4</version>
                   </dependency>
                  

                  Is this jar file correct? Can we use it?

                  I don't think that one's going to work, because the jar hosted there is just a MANIFEST only jar file. What you need is this pom dependency:

                  <dependency>
                   <groupId>org.jboss.jbossas</groupId>
                   <artifactId>jboss-as-client</artifactId>
                   <version>5.0.0.GA</version>
                   <type>pom</type>
                   </dependency>


                  This http://repository.jboss.com/maven2/org/jboss/jbossas/jboss-as-client/5.0.0.GA/ will bring in all the necessary dependencies.


                  • 6. Re: javaee-api for jboss-5.0.0.GA
                    jcrouvi

                    Hi,
                    I have checked this dependency

                    <dependency>
                     <groupId>org.jboss.client</groupId>
                     <artifactId>jbossall-client</artifactId>
                     <version>5.0.0.Beta4</version>
                    </dependency>
                    

                    and it contains the dependencies I need. I can compile our projects and execute our JUnit Tests.

                    When I use this dependency:

                    <dependency>
                     <groupId>org.jboss.jbossas</groupId>
                     <artifactId>jboss-as-client</artifactId>
                     <version>5.0.0.GA</version>
                     <type>pom</type>
                    </dependency>
                    

                    The "whole AS" seems to be downloaded.

                    So I will continue to work with jbossall-client 5.0.0.Beta4. I will update this forum with my experiences.


                    • 7. Re: javaee-api for jboss-5.0.0.GA
                      peterj

                       

                      The "whole AS" seems to be downloaded.


                      I believe this is what is known as expected behavior. With Beta4, all of the classes were in jbossall-client.jar, so downloading that one JAR file was sufficient to fulfill the dependency. But in GA, that file is a shell that references the JAR files that contain the classes, therefore each of those JARs is a dependent of jbossall-client.jar. In other words, the same stuff was download, its just that in Beta4 it was all in one file while in GA is is scattered over many files.