7 Replies Latest reply on Mar 5, 2008 8:11 PM by enda

    JVM 6 vs JVM 5

    enda

      Does anyone has problem with compilation for Java 5?


      I go on AS this:


      22:31:18,375 ERROR [[/FormBuilderExample]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.ClassFormatError: Illegal class modifiers in class org/jboss/seam/pdf/package-info: 0x1600
              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:1814)
      



      on other PC this



      22:41:34,370 ERROR [[/FormBuilderExample]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.ClassFormatError: Illegal class modifiers in class org/jboss/seam/remoting/package-info: 0x1600
              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:1814)
              at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
              at org.jboss.web.tomcat.service.WebAppClassLoader.findClass(WebAppClassLoader.java:139)
              at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
              at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
              at org.jboss.seam.deployment.NamespaceDeploymentHandler.getPackage(NamespaceDeploymentHandler.java:69)
      



      I digged error 0x1600


      FIX
      Problem on sun's


      Is this problem on my side or on Seam side?


      Thanks

        • 1. Re: JVM 6 vs JVM 5
          jbalunas.jbalunas.jboss.org

          A few questions:


          What version of seam are you using?


          Did you build seam yourself or straight distribution?


          I'm going to check the jars - but you can look in the manifest file of the jars and see what compiler was used to create it.


          -Jay


          • 2. Re: JVM 6 vs JVM 5
            jbalunas.jbalunas.jboss.org

            I just checked 2.0.1, and 2.1.0 distributions and both were built with JDK 1.5 so should not show this issue.


            This issue should only show if a class/package is compiled using JDK 1.6 using the 1.5 flag.


            Let me know what find?


            Thanks,
            -Jay

            • 3. Re: JVM 6 vs JVM 5
              keithnaas

              And JDK 6 support isn't done yet :)

              • 4. Re: JVM 6 vs JVM 5
                enda

                Thank you for the answer


                I am using seam 2.0.1.GA straight distribution.
                I do not have problem on Java 6, but seam testing does not work on Java 6.

                My all files that I am deploying on server has in manifest:


                Manifest-Version: 1.0
                Ant-Version: Apache Ant 1.7.0
                Created-By: 1.5.0_12-b04 (Sun Microsystems Inc.)



                (Thanks for the advise with manifest info :D)


                My server is JBoss AS 4.2.2


                I am on gentoo workstation working normally on Java 6 but I can eselect on Java 5


                So I am sure I am running on Java 5



                 
                10:08:17,533 INFO  [ServerInfo] Java version: 1.5.0_12,Sun Microsystems Inc.
                



                Thanks Tomas




                • 5. Re: JVM 6 vs JVM 5
                  enda

                  Could it be some rotten jar in JBoss AS 4.2.2 server?


                  eg my default, fresh sevrer has in it this:
                  jboss-remoting.jar
                  Manifest


                  Build-By: brewbuilder
                  Created-By: R27.1-109-73164-1,5,0_08-20061129-1418-liux-ia32 (BEA Systems, Inc.)



                  Got it
                  My Seam Application has:


                  jboss-seam-remoting.jar,
                  jboss-seam-pdf.jar is build on Java-6 in manifest


                  Manifest-Version: 1.0
                  Ant-Version: Apache Ant 1.7.0
                  Created-By: 1.6.0_02-b05 (Sun Microsystems Inc.)
                  



                  Actually almost all my libraries has


                  You know, now I am realizing that I probably downloaded seam 2.0.1.GA and build it (of course on Java 6)


                  I did not know that it builds the libraries?


                  I thought that it is taken from maven-repository?


                  Tomas

                  • 6. Re: JVM 6 vs JVM 5
                    jbalunas.jbalunas.jboss.org

                    Yeah - if you build the distribution it will certainly build the libs.


                    So that was the issue?  If so I'm glad that's working for you now.


                    -Jay

                    • 7. Re: JVM 6 vs JVM 5
                      enda

                      Great problem fixed!


                      Thank you for help


                      Tomas