3 Replies Latest reply on Nov 16, 2010 9:51 AM by Udo

    Bad version number in .class file

    814634
      I managed to deploy the apex listener without any errors but when I try to access the configure page at apex/listenerConfigure I get this error:

      oracle.classloader.util.AnnotatedClassFormatError: Bad version number in .class file

           Invalid class: oracle.dbtools.rt.web.HttpEndpoint
           Loader: apex.web.apex:0.0.0
           Code-Source: /opt/oracle/111/oc4j/j2ee/home/applications/apex/apex/WEB-INF/lib/apex.jar
           Configuration: WEB-INF/lib/ directory in /opt/oracle/111/oc4j/j2ee/home/applications/apex/apex/WEB-INF/lib

           Dependent class: com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpApplication
           Loader: oc4j:10.1.3
           Code-Source: /opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar
           Configuration: <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar

           at oracle.classloader.PolicyClassLoader.findLocalClass (PolicyClassLoader.java:1539) [opt/oracle/111/oc4j/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@663062032]
           at oracle.classloader.SearchPolicy$FindLocal.getClass (SearchPolicy.java:226) [opt/oracle/111/oc4j/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@663062032]
           at oracle.classloader.SearchSequence.getClass (SearchSequence.java:119) [opt/oracle/111/oc4j/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@663062032]
           at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1721) [opt/oracle/111/oc4j/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@663062032]
           at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1682) [opt/oracle/111/oc4j/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@663062032]
           at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1667) [opt/oracle/111/oc4j/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@663062032]
           at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap:1.5.0_17]
           at java.lang.Class.forName0 (Native method) [unknown, by unknown]
           at java.lang.Class.forName (Class.java:242) [jre bootstrap, by jre.bootstrap:1.5.0_17]
           at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpApplication.loadServlet (HttpApplication.java:2464) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpApplication.findServlet (HttpApplication.java:5006) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpApplication.findServlet (HttpApplication.java:4930) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpApplication.getRequestDispatcher (HttpApplication.java:3139) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.doProcessRequest (HttpRequestHandler.java:775) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.processRequest (HttpRequestHandler.java:458) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.serveOneRequest (HttpRequestHandler.java:226) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.run (HttpRequestHandler.java:127) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.run (HttpRequestHandler.java:116) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run (ServerSocketReadHandler.java:260) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket (ServerSocketAcceptHandler.java:234) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at oracle.oc4j.network.ServerSocketAcceptHandler.access$700 (ServerSocketAcceptHandler.java:29) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run (ServerSocketAcceptHandler.java:879) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run (ReleasableResourcePooledExecutor.java:303) [opt/oracle/111/oc4j/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /opt/oracle/111/oc4j/j2ee/home/oc4j.jar), by oc4j:10.1.3]
           at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap:1.5.0_17]


      I enabled development = true to see this error. Any Idea wat is going wrong i'm sure i disabled Inherit parent application’s shared library imports.
        • 1. Re: Bad version number in .class file
          Udo
          Hello,

          it seems as if your OC4J is not running with "JDK 1.6.0_20 or higher", which is required for the APEX Listener, but with the (far) older JRE 1.5.0_17.
          Try to either update your OC4Js Java or run the Listener with the embedded GlassFish with a separate Java environment that fulfills the requirements.

          -Udo

          Edited by: Udo on 15.11.2010 22:14
          1 person found this helpful
          • 2. Re: Bad version number in .class file
            814634
            After updating my oc4j java version to 1.6.0_22-b04. I get this error openening apex/listenerConfigure

            java.lang.ClassCastException: oracle.xml.parser.v2.XMLComment cannot be cast to org.w3c.dom.Element
                 at java.util.XMLUtils.importProperties(XMLUtils.java:97)
                 at java.util.XMLUtils.load(XMLUtils.java:69)
                 at java.util.Properties.loadFromXML(Properties.java:852)
                 at oracle.dbtools.apex.admin.AdminManager.getConfigFileProperties(AdminManager.java:1119)
                 at oracle.dbtools.apex.admin.AdminManager.assignConfigFieldValues(AdminManager.java:924)
                 at oracle.dbtools.apex.admin.AdminManager.populateAdminFieldValues(AdminManager.java:900)
                 at oracle.dbtools.apex.admin.AdminManager.getFieldMaps(AdminManager.java:867)
                 at oracle.dbtools.apex.admin.Admin.displayAdminHTML(Admin.java:161)
                 at oracle.dbtools.apex.admin.Admin.displayAdminPage(Admin.java:146)
                 at oracle.dbtools.apex.admin.Admin.doGet(Admin.java:53)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                 at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:734)
                 at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
                 at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
                 at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
                 at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:226)
                 at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:127)
                 at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:116)
                 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
                 at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
                 at java.lang.Thread.run(Thread.java:662)

            In the logs I can find this: Using Config file:/home/oracle/apex-config.xml
            • 3. Re: Bad version number in .class file
              Udo
              Hello,

              this looks like you have your OC4Js java.io.tmpdir in +/home/oracle+ and the user you have your OC4J running with has no rights to create/read the configfile there.
              Could you check if the log file has been created at all?
              You could try to set the value for the java.io.tmpdir to a fitting directory by adding -Djava.io.tmpdir to your OC4Js start parameters, like
              java -Djava.io.tmpdir=<othertmpdir> -jar oc4j.jar
              -Udo
              1 person found this helpful