6 Replies Latest reply on Mar 26, 2013 3:06 PM by sammie88

    Jboss AS 7 and JDK 5

    sammie88

      Hi,

       

      I have an ejb client jar that I compiled using JDK 5 because we are using a WebServer with JDK 5.  The client side is trying to communicate to JBoss 7 via ejb remote. The server ejb jar is compiled with 1.6 since that is what JBoss 7 uses and is deployed without any errors.  I get an error though on the client side when doing an ejb lookup.  Is it possible to have a client with 1.5 communicating to JBoss AS7. Jboss-client.jar is also on the client side.  Is this compatible with 1.5? Thanks!

       

      java.lang.UnsupportedClassVersionError: Bad version number in .class file

      at java.lang.ClassLoader.defineClass1(Native Method)

      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

      at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1717)

      at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:983)

      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1431)

      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1301)

      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java:242)

      at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:50)

      at com.sun.naming.internal.ResourceManager.getFactory(ResourceManager.java:371)

      at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:575)

      at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:533)

      at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:279)

      at javax.naming.InitialContext.lookup(InitialContext.java:351)

        • 1. Re: Jboss AS 7 and JDK 5
          jaikiran

          You'll need Java 6 on the client too. EJB client and various other libraries that are used, all require Java 6

          • 2. Re: Jboss AS 7 and JDK 5
            sammie88

            Thanks Jaikiran. I was afraid of this- my client is on sun webserver 6.1 which at

            best uses jdk5. Is there any other workaround other than upgrading the sun webserver to one that uses kdk6?

            Thanks!

            • 3. Re: Jboss AS 7 and JDK 5
              ctomc

              sammie88 wrote:

               

              Thanks Jaikiran. I was afraid of this- my client is on sun webserver 6.1 which at

              best uses jdk5. Is there any other workaround other than upgrading the sun webserver to one that uses kdk6?

              Thanks!

              I think only other way would be to expose your ejb via webservices (@WebService) and then consume them on your jdk6 server.

               

               

              --

              tomaz

              1 of 1 people found this helpful
              • 4. Re: Jboss AS 7 and JDK 5
                sammie88

                thanks tomaz-ii havent tried doing a webservice yet but would this

                eliminate the use of jboss- client. jar on d client side? thanks!

                • 5. Re: Jboss AS 7 and JDK 5
                  wdfink

                  If you use webservice for communication you do not need the JBoss client API. There is no need to have the jboss-client.jar in this case.

                  1 of 1 people found this helpful
                  • 6. Re: Jboss AS 7 and JDK 5
                    sammie88

                    Thanks Wolf!