ClassFormatError

Hello,
Our application has UI in Java. All the .class files are bundled in a .cab file. And this .cab file we are calling from the HTML page. This thing is working fine on Win 9x and Win NT machines. But when installing the same on Win 2k machines giving the error. Below is the stack which appears in the Java Console. The problem comes with all the Win 2k machines (professional, server, advanced server). The IE version which we are using is IE6.0. and the microsoft JVM version is 5.0.0.3802.
java.lang.ClassFormatError
     at FETLClasses/FETLKernelImpl.<init>
     at ConsultMainApplet.init
     at com/ms/applet/AppletPanel.securedCall0
     at com/ms/applet/AppletPanel.securedCall
     at com/ms/applet/AppletPanel.processSentEvent
     at com/ms/applet/AppletPanel.processSentEvent
     at com/ms/applet/AppletPanel.run
     at java/lang/Thread.run
Can anyone please help me solve this problem. I searched lot, but couldn't find anything worth solving it.
Thanks in anticipation.
Sheshu-

Does using a Sun JVM help?

Similar Messages

  • ClassFormatError while running the code on application server

    Hi all,
    I have written some code which compiles and executes fine on JDeveloper but when I deploy the same code on Oracle Application Server it gives me ClassFormatError.
    The class which is giving the error is a simple Java Class, which is called by an ApplicationModule for doing the computation.
    JDeveloper version is 10.1.3.3.0
    Oracle AppServer version is 10.1.3
    Any help will be greatly appreciated.
    Below is the original stack trace:
    [06/10/2009 10:42:40 ERROR RtnAcknHandler:437] Error :: saveAcknForm in RtnAcknHandler
    com.demo.example.core.exception.GenericApplicationException: java.lang.reflect.InvocationTargetException
         at com.demo.example.core.manager.ApplicationModuleManager.callApplicationModule(ApplicationModuleManager.java:76)
         at com.demo.example.returns.ackn.service.RtnAcknServiceImpl.saveAcknForm(RtnAcknServiceImpl.java:16)
         at com.demo.example.returns.ackn.handler.RtnAcknHandler.saveAcknForm(RtnAcknHandler.java:422)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.demo.example.core.manager.HandlerManager.invokeHandler(HandlerManager.java:83)
         at com.demo.example.core.handler.FrontRequestHandler.handleRequest(FrontRequestHandler.java:161)
         at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
         at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at com.validation.utils.serversidevalidation.ServerSideValidationFilter.doFilter(ServerSideValidationFilter.java:81)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.demo.example.core.manager.ApplicationModuleManager.callApplicationModule(ApplicationModuleManager.java:71)
         ... 26 more
    Caused by: oracle.classloader.util.AnnotatedClassFormatError: Invalid length 65523 in LocalVariableTable in class file com/demo/example/returns/common/service/ReturnsITCasService
         Invalid class: com.demo.example.returns.common.service.ReturnsITCasService
         Loader: demoapp.web.webapp:0.0.0
         Code-Source: /D:/product/10.1.3.1/OracleAS/j2ee/DEMOAPP/applications/demoapp/webapp/WEB-INF/classes/
         Configuration: WEB-INF/classes/ in D:\product\10.1.3.1\OracleAS\j2ee\DEMOAPP\applications\demoapp\webapp\WEB-INF\classes
         Dependent class: com.demo.example.returns.ackn.appmodule.RtnAcknAMImpl
         Loader: demoapp.web.webapp:0.0.0
         Code-Source: /D:/product/10.1.3.1/OracleAS/j2ee/DEMOAPP/applications/demoapp/webapp/WEB-INF/classes/
         Configuration: WEB-INF/classes/ in D:\product\10.1.3.1\OracleAS\j2ee\DEMOAPP\applications\demoapp\webapp\WEB-INF\classes
         at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2285)
         at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1462)
         at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167)
         at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
         at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1620)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at com.demo.example.returns.ackn.appmodule.RtnAcknAMImpl.saveAcknForm(RtnAcknAMImpl.java:1454)
         ... 31 more
    Caused by: java.lang.ClassFormatError: Invalid length 65523 in LocalVariableTable in class file com/demo/example/returns/common/service/ReturnsITCasService
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2241)
         ... 39 more
    Edited by: user593821 on Oct 6, 2009 4:07 AM

    Hi,
    the exe has a GUI interface, with all types of windows User interface elements such as comboboxes, editboxes, grids, etc...
    I don't believe that is posible to do, but asked anyway in case i was wrong.

  • ClassFormatError when starting weblogic server on Solaris, SunOS 5.6

    Hi,
    I get the following error when I start the server:
    startWebLogic.sh
    LD_LIBRARY_PATH=/sybase/sybase11/lib:/oracle/app/oracle/product/8.1.6/lib:/u
    sr/openwin/lib:/opt/SUNWspro/lib:/usr/atria/lib:/usr/java1.2/jre/lib/sparc:/
    sybase/sybase11/lib:/oracle/app/oracle/product/8.1.6/lib:/opt/cobol4.1/cobli
    b:/weblogic/lib/solaris
    /usr/java1.2/bin/java -ms64m -mx64m -classpath
    ./classes/boot:./eval/cloudscape/lib/cloudscape.jar -Dweblogic.class.path=./
    license:./classes:./lib/weblogicaux.jar:./myserver/serverclasses -Dweblogic.
    home=. -Djava.security.manager -Djava.security.policy==/weblogic/weblogic.po
    licy weblogic.Server
    Exception in thread "main" java.lang.ClassFormatError:
    weblogic/boot/ServerSecurityManager (Illegal UTF8 string in constant pool)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:477)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:101)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:247)
    at java.net.URLClassLoader.access$1(URLClassLoader.java:213)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessController.doPrivileged(Compiled Code)
    at java.net.URLClassLoader.findClass(Compiled Code)
    at java.lang.ClassLoader.loadClass(Compiled Code)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:290)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    Can anyone help?
    Regards
    Simon Reavely
    Software Developer
    Lucent Technologies

    I get a similar error when trying to start the 4.52 weblogic server on HP-UX 11.0 using Java 2 SDK for HP-UX 1.2.2.03.00:
    % java -ms64m -mx64m -classpath ./classes/boot:./eval/cloudscape/lib/cloudscape.jar:./myserver/serverclasses \
    -Djava.security.manager -Djava.security.policy==./weblogic.policy weblogic.Server
    Exception in thread "main" java.lang.ClassFormatError: weblogic/boot/ServerSecurityManager (Illegal UTF8 string in constant pool)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Similary, I cannot start the weblogic console:
    % java -mx32m -classpath ./classes/boot:./classes:./lib/weblogicaux.jar weblogic.Console
    ExceptionDef (Illegal constant pool type)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at weblogic.admin.ConsoleStarter.startup(ConsoleStarter.java:16)
    at weblogic.Console.main(Console.java:41)

  • ClassFormatError when attempting to load an applet from within a JSP

    Greetings everyone.
    I have a problem that i seem unable to solve.
    I've created a web application. I'm using Java 1.4.2_05 and Tomcat. Right now i'm trying to load an applet from a JSP and i'm getting an error that, try as i might, i can't understand why it happens.
    Here is some detailed info:
    The applet's code:
    package smpb.myapp.controllers;
    import java.applet.Applet;
    import java.awt.Graphics;
    public class GUIApplet extends Applet
         public void init()
         public void stop()
         public void paint(Graphics g)
                  g.drawString("Hey hey hey",20,20);
               g.drawString("Hellooo World",20,40);
    The JSP's code:
    <%@ page language="java"
                   import="java.util.*"
                   session="true" %>
    <%
         String name = (String) request.getSession().getAttribute("userName");
    %>
    <html>
         <head>
              <title>Login</title>
         </head>
         <body>
              <h1><p align="center">Application</p></h1>
              <br>
              Welcome <%= name %>! Thank you for logging in!
              <br><br><br>
              <applet align="middle" code="smpb.myapp.controllers.GUIApplet.class" codebase="./" archive="MyApp_applets.jar">
                   Your browser does not support this feature.
              </applet>
              <br><br>
              <a href='<%=request.getContextPath() + "/LogOut"%>'>Log Out</a><br>
         </body>
    </html>-------------------------------------------
    When i reach this JSP the applet fails to load and i get the following error message at the java console:
    Loading applet ...
    Initializing applet ...
    Starting applet ...
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with no proxy
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Last modified time and/or expiration value is not available.  Jar file will not be cached.
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with no proxy
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with no proxy
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Last modified time and/or expiration value is not available.  Jar file will not be cached.
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with no proxy
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    java.lang.ClassFormatError: smpb/myapp/controllers/GUIApplet (Bad magic number)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:157)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:561)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1856)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
         at sun.applet.AppletPanel.run(AppletPanel.java:298)
         at java.lang.Thread.run(Thread.java:534)
    Exception: java.lang.ClassFormatError: smpb/myapp/controllers/GUIApplet (Bad magic number)-------------------------------------------
    The JSP is in the root directory of the web application's path right along with the jar file. The jar file itself has the following structure:
    Archive:  HelpDesk_applets.jar
      Length     Date   Time    Name
            0  05-17-06 12:17   META-INF/
          106  05-17-06 12:17   META-INF/MANIFEST.MF
            0  05-10-06 17:14   smpb/
            0  05-10-06 17:14   smpb/myapp/
            0  05-12-06 16:50   smpb/myapp/controllers/
          794  05-12-06 17:15   smpb/myapp/controllers/GUIApplet.class
          900                   6 filesNow, i've tried loading the very same jar file that i use in the JSP through a static HTML which is virtually identical to the JSP i presented and everything works just fine. I've checked and rechecked to see if all the permissions to access the jar file were accurate, i checked to see if Tomcat had it's MIME settings correctly configured so that there was no chance that the files were being corrupted during the load (as that is a usual cause for the problem, or so i've gathered) but to no avail. I've searched the web, including these forums, and found similar problems but no conclusive solution. I can't seem to figure out, at all, what could possibly be wrong. Does anyone have any ideas? I've tried to be as thorough as i could from the start, so, any help would be deeply appreciated.

    Hi mshah101,
    This can happen if the applet is compiled using an higher version of java and the browser is pointing to an older version (even if minor version number is higher)

  • ALERT: java/lang/ClassFormatError: Bad stack map.

    Hello friends.
    I need help. SOS.
    Where is wrong in this code?
    Problem is in comparision.
    Comenting this lines, all are ok.
            if(time1==time2)
                System.out.println("Equal");
            else
                System.out.println("Different");C�digo del Midlet:
    package borrame.pruebas;
    import java.util.Date;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Form;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    public class Prueba extends MIDlet implements CommandListener {
        Display display;
        Form mainForm;
        // Comandos para salir y volver a la pantalla principal.
        Command cmdSalir;
        public Prueba() {
            super();
            mainForm = new Form ("HelloMidp");
            cmdSalir = new Command("Salir", Command.EXIT,1);
            mainForm.addCommand(cmdSalir);
            mainForm.setCommandListener(this);
        protected void startApp() throws MIDletStateChangeException {
            display = Display.getDisplay(this);
            display.setCurrent (mainForm);
            long time1 = new Date().getTime();
            long time2 = new Date().getTime() +100;
            System.out.println("time1: " + time1);
            System.out.println("time2: " + time2);
            System.out.println("time1 + time2 =" + (time1 + time2));
            if(time1==time2)
                System.out.println("Equal");
            else
                System.out.println("Different");
        protected void pauseApp() {
            // TODO Auto-generated method stub
        protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
            // TODO Auto-generated method stub
        public void commandAction(Command c, Displayable d) {
            if (c == cmdSalir) { // Selecciono salir de la aplicacion
                try {
                    destroyApp(false);
                } catch (MIDletStateChangeException e) {
                    e.printStackTrace();
                notifyDestroyed();
    }Output console:
    Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct
    Running with storage root DefaultColorPhone
    ALERT: java/lang/ClassFormatError: Bad stack map.
    Method............: b7d29990 'com/sun/midp/midlet/MIDletState.createMIDlet (static)'
    Stack Chunk.......: b783d300
    Frame Pointer.....: b783d3a4
    Current IP........: b7da5669 = b7da565b + offset 14
    Previous Frame....: b783d36c
    Previous IP.......: b7d87f44 (offset 52)
    Frame size........: 7 (1 arguments, 6 local variables)
    Argument[0].......: b783cad0
    Local[1]..........: b78b35c8
    Local[2]..........: b7d87f41
    Local[3]..........: b783cc38
    Local[4]..........: b7d29788
    Local[5]..........: b78b355c
    Local[6]..........: 0
    Operand[1]........: b783cad0
    Method............: b7d16390 'com/sun/midp/midlet/Scheduler.schedule (virtual)'
    Stack Chunk.......: b783d300
    Frame Pointer.....: b783d36c
    Current IP........: b7d87f44 = b7d87f10 + offset 52
    Previous Frame....: b783d338
    Previous IP.......: b7d92b05 (offset 28)
    Frame size........: 7 (2 arguments, 5 local variables)
    Argument[0].......: b783cd14
    Argument[1].......: b783c460
    Local[2]..........: b78b20c4
    Local[3]..........: b78b3594
    Local[4]..........: b7d92b01
    Local[5]..........: b78b35a8
    Local[6]..........: b7d162b0
    Operand[1]........: b783cd14
    Method............: b7d1e084 'com/sun/midp/main/Main.runLocalClass (static)'
    Stack Chunk.......: b783d300
    Frame Pointer.....: b783d338
    Current IP........: b7d92b05 = b7d92ae9 + offset 28
    Previous Frame....: b783d314
    Previous IP.......: b7d9257c (offset 116)
    Frame size........: 3 (1 arguments, 2 local variables)
    Argument[0].......: b783d1bc
    Local[1]..........: b783c460
    Local[2]..........: b78b3570
    Method............: b7d1dfe4 'com/sun/midp/main/Main.main (static)'
    Stack Chunk.......: b783d300
    Frame Pointer.....: b783d314
    Current IP........: b7d9257c = b7d92508 + offset 116
    Previous Frame....: 0
    Previous IP.......: 1
    Frame size........: 3 (1 arguments, 2 local variables)
    Argument[0].......: b783d5ec
    Local[1]..........: b783d1bc
    Local[2]..........: b783cb24
    VM status:
    Instruction pointer.: b7da5669 (offset within invoking method: 14)
    Next instruction....: 0x4c
    Frame pointer.......: b783d3a4
    Local pointer.......: b783d388
    Stack size..........: 128; sp: b783d3bc; ranges: b783d308-b783d508;
    Contents of the current stack frame:
        b783d388: b783cad0 (lp)
        b783d38c: b78b35c8
        b783d390: b7d87f41
        b783d394: b783cc38
        b783d398: b7d29788
        b783d39c: b78b355c
        b783d3a0: 0
        b783d3a4: b783d36c (fp)
        b783d3a8: b7d87f44
        b783d3ac: b783d384
        b783d3b0: b7d29990
        b783d3b4: b783d300
        b783d3b8: 0 (end of frame)
        b783d3bc: b783cad0 (sp)
    Execution stack contains 184 items:
    b783d5ec
    b783d1bc
    b783cb24
    0
    1
    b78b3560
    b7d1dfe4
    b783d300
    0
    b783d1bc
    b783c460
    b78b3570
    b783d314
    b7d9257c
    b783d328
    b7d1e084
    b783d300
    0
    b783cd14
    b783c460
    b78b20c4
    b78b3594
    b7d92b01
    b78b35a8
    b7d162b0
    b783d338
    b7d92b05
    b783d34c
    b7d16390
    b783d300
    0
    b783cd14
    b783cad0
    b78b35c8
    b7d87f41
    b783cc38
    b7d29788
    b78b355c
    0
    b783d36c
    b7d87f44
    b783d384
    b7d29990
    b783d300
    0
    b783cad0
    Execution completed.
    717374 bytecodes executed
    5 thread switches
    742 classes in the system (including system classes)
    3720 dynamic objects allocated (102340 bytes)
    2 garbage collections (88196 bytes collected)
    Execution completed.
    717374 bytecodes executed
    5 thread switches
    742 classes in the system (including system classes)
    3720 dynamic objects allocated (102340 bytes)
    2 garbage collections (88196 bytes collected)

    My enviroment:
    Linux Gentoo.
    Sun JDK 1.4.2.10
    eclipse 3.2 WTP 1.5
    eclipseme 1.5.5
    Midlet config:
    MIDlet-Version: 1.0
    MicroEdition-Configuration: CLDC-1.0
    MicroEdition-Profile: MIDP-1.0
    WTK 2.2
    In last test, i'm using ktoolbar directly to build and execute midlet and all go ok.
    So, My code is not problem.
    I suppose that eclipseme corrupt my classes in build process.
    SOLUTION:
    My radical solution. I use eclipse without eclipseme, and i use ktoolbar to build, run, package, etc...
    Thank's

  • Class loader - ClassFormatError

    Hey guys,
    I have a problem with my loading a class file, I get this error:
    Exception in thread "AWT-EventQueue-0" java.lang.ClassFormatError: Code segment has wrong length in class file j2MeDataChunkGenerator_Plugin/DataChunkGenerator.class
    I know I compiled it right, since other classes does load, I didn't try to manipulate the byte code or any thing like this, could anything code related might generate this kind of exception??
    in the beginning I thought this was an error with my class loading process, but once I recreated an empty duplicate of the problem, it works fine, and all the classes are been loaded correctly.
    Any help or idea would be greatly appreciated, I've been at it for 4 evenings ;..(
    Thanks in advance,
    Adam.

    I should have put this earlier:
    the class loading method:
         public static class PluginClassLoader extends ClassLoader {
              // public PluginClassLoader() {
              // super(new URL[] {});
              private ArrayList<JarFile> jars = new ArrayList<JarFile>();
              public synchronized void add(JarFile jar) throws MalformedURLException {
                   jars.add(jar);
              public Class<?> loadClass(String className) throws ClassNotFoundException {
                   try {
                        try {
                             System.out.println("Looking in super.loadClass(className=" + className + ")");
                             Class<?> _class=super.loadClass(className);
                             System.out.println("Class was found: "+className);
                             return _class;
                             // return checkIfClassWasLoaded(className, false);
                        } catch (ClassNotFoundException e1) {
                             System.out.println("Class was not found: "+className);
                             System.out.println("Looking in the Jar files for className=" + className);
                             for (int i = 0; i < jars.size(); i++) {
                                  JarFile jar = jars.get(i);
                                  Enumeration<JarEntry> enumeration = jar.entries();
                                  while (enumeration.hasMoreElements()) {
                                       java.util.jar.JarEntry file = (JarEntry) enumeration.nextElement();
                                       if (file.getName().equals(className.replace(".", "/") + ".class")) {
                                            System.out.println("A match to " + className + " was found in: \n" + jar.getName().replace("\\", "/") + "!/" + file.getName()+"\n");
                                            InputStream is = jar.getInputStream(file);
                                            byte[] bytes;
                                            int length = is.available();
                                            bytes = new byte[length];
                                            is.read(bytes);
                                            return defineClass(className, bytes, 0, bytes.length);
                   } catch (IOException e) {
                        System.out.println("Unable to locate class file: " + className);
                        e.printStackTrace();
                   throw new ClassNotFoundException(className);
              private Class<?> checkIfClassWasLoaded(String className, boolean pResolve) throws ClassNotFoundException {
                   System.out.println("checkIfClassWasLoaded(" + className + ", " + pResolve + ")");
                   Class<?> lClass = findLoadedClass(className);
                   if (lClass == null) {
                        try {
                             ClassLoader lParent = getParent();
                             if (lParent == null) {
                                  lClass = getSystemClassLoader().loadClass(className);
                             } else {
                                  lClass = lParent.loadClass(className);
                        } catch (ClassNotFoundException cnfe) {
                             lClass = findSystemClass(className);
                   try {
                        if (pResolve) {
                             System.out.println("resolve class: " + lClass);
                             resolveClass(lClass);
                   } catch (Error e) {
                        e.printStackTrace();
                        throw e;
                   return lClass;
               * checks if this plugin .jar file was loaded already into this class
               * loader jar list.
               * @param file
               *            - the file of the plugin jar
               * @return
               * @throws IOException
              public JarFile contains(String jarPath) {
                   for (JarFile file : jars)
                        if (file.getName().equalsIgnoreCase(jarPath))
                             return file;
                   return null;
         }

  • J2SE 5.0 ClassFormatError

    I've written a simple Enum, shown below, that uses a "constant-specific method" as described in http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html. I am using the J2SE 5.0 SDK for Windows.
    public abstract enum Color {
        RED() {
            String getName() { return "RED"; }
        private String _name;
        private Color() {
            _name = getName();
        abstract String getName();
    }However, I am getting this runtime error. Anyone else seen this or able to explain it?
    java.lang.ClassFormatError: Arguments can't fit into locals in class file Color
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.access$100(Unknown Source)
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Exception in thread "main"

    Well, it appears my mistake is that I made the constructor private instead of protected. I guess Eclipse 3.1 M3 is not polished enough yet to catch this mistake for you.

  • ClassFormatError when overriding passivateState in jdev 10.1.2.2.0

    Hi,
    I need to save some user context attributes in the application module passivation of my jdev 10.1.2.2.0 application.
    To do that, I read chapter 28.5 of dev guide.
    My problem is that just by adding :
    protected void passivateState(Document doc, Element parent)
    super.passivateState(doc, parent);
    in the application module impl, I get a ClassFormatError error when the application is run.
    The application is built with the embeded jdk of jdev 10.1.2.2.0.
    Any ideas where it might come from ?

    One Update :
    Jdev 10.1.2.2.0 is shipped with jdk 1.4.2_06.
    I downloaded the sun version and built the project using it and the error turned into :
    java.lang.LinkageError: loader constraints violated when linking org/w3c/dom/Element class
    Anyone understand what can cause this error ?

  • Can't start WLCS ; ClassFormatError

    I have installed WLCS 3.1 under Sun Solaris.
    I have updated the weblogic server to sp6 and it starts without problems.
    when I run the StartCommerce.sh the exceptions bellow exceptions occur.
    can anybody give me an advice ?
    regards
    tamer kavlak
    java.lang.ClassFormatError:
    com/beasys/commerce/axiom/contact/UnifiedProfileTypeManagerHome (Extra bytes at the end of the class file)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass0(Compiled Code)
    at java.lang.ClassLoader.defineClass(Compiled Code)
    at weblogic.boot.ServerClassLoader.findLocalClass(Compiled Code)
    at weblogic.boot.ServerClassLoader.loadClass(Compiled Code)
    at java.lang.ClassLoader.loadClass(Compiled Code)
    at java.lang.Class.isAssignableFrom(Native Method)
    at weblogic.ejb.internal.EJBHomeImpl.setup(EJBHomeImpl.java:602)
    at weblogic.ejb.internal.EJBDeploymentImpl.setupBeanHome(EJBDeploymentImpl.java:580)
    at weblogic.ejb.internal.EJBDeploymentImpl.deployBeans(Compiled Code)
    at weblogic.ejb.internal.EJBDeploymentImpl.deploy(EJBDeploymentImpl.java:335)
    at weblogic.ejb.internal.EJBJarDeployment.deploy(EJBJarDeployment.java:231)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(Compiled Code)
    at weblogic.ejb.internal.EJBManagerImpl.deployNew(EJBManagerImpl.java:352)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:319)
    at weblogic.ejb.internal.EJBManagerImpl.deployBeans(Compiled Code)
    at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:242)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:827)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    The WebLogic Server did not start up properly.
    Exception raised: java.lang.reflect.InvocationTargetException
    java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError:
    com/beasys/commerce/axiom/contact/UnifiedProfileTypeManagerHome
    at java.lang.Class.isAssignableFrom(Native Method)
    at weblogic.ejb.internal.EJBHomeImpl.setup(EJBHomeImpl.java:602)
    at weblogic.ejb.internal.EJBDeploymentImpl.setupBeanHome(EJBDeploymentImpl.java:580)
    at weblogic.ejb.internal.EJBDeploymentImpl.deployBeans(Compiled Code)
    at weblogic.ejb.internal.EJBDeploymentImpl.deploy(EJBDeploymentImpl.java:335)
    at weblogic.ejb.internal.EJBJarDeployment.deploy(EJBJarDeployment.java:231)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(Compiled Code)
    at weblogic.ejb.internal.EJBManagerImpl.deployNew(EJBManagerImpl.java:352)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:319)
    at weblogic.ejb.internal.EJBManagerImpl.deployBeans(Compiled Code)
    at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:242)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:827)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    java.lang.NoClassDefFoundError:
    com/beasys/commerce/axiom/contact/UnifiedProfileTypeManagerHome
    at java.lang.Class.isAssignableFrom(Native Method)
    at weblogic.ejb.internal.EJBHomeImpl.setup(EJBHomeImpl.java:602)
    at weblogic.ejb.internal.EJBDeploymentImpl.setupBeanHome(EJBDeploymentImpl.java:580)
    at weblogic.ejb.internal.EJBDeploymentImpl.deployBeans(Compiled Code)
    at weblogic.ejb.internal.EJBDeploymentImpl.deploy(EJBDeploymentImpl.java:335)
    at weblogic.ejb.internal.EJBJarDeployment.deploy(EJBJarDeployment.java:231)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(Compiled Code)
    at weblogic.ejb.internal.EJBManagerImpl.deployNew(EJBManagerImpl.java:352)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:319)
    at weblogic.ejb.internal.EJBManagerImpl.deployBeans(Compiled Code)
    at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:242)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:827)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)

    It appears that your download may have been corrupted. You may want to try
    downloading again.
    Michael Girdley
    BEA Systems Inc
    "tamer kavlak" <[email protected]> wrote in message
    news:[email protected]...
    >
    I have installed WLCS 3.1 under Sun Solaris.
    I have updated the weblogic server to sp6 and it starts without problems.
    when I run the StartCommerce.sh the exceptions bellow exceptions occur.
    can anybody give me an advice ?
    regards
    tamer kavlak
    java.lang.ClassFormatError:
    com/beasys/commerce/axiom/contact/UnifiedProfileTypeManagerHome (Extrabytes at the end of the class file)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass0(Compiled Code)
    at java.lang.ClassLoader.defineClass(Compiled Code)
    at weblogic.boot.ServerClassLoader.findLocalClass(Compiled Code)
    at weblogic.boot.ServerClassLoader.loadClass(Compiled Code)
    at java.lang.ClassLoader.loadClass(Compiled Code)
    at java.lang.Class.isAssignableFrom(Native Method)
    at weblogic.ejb.internal.EJBHomeImpl.setup(EJBHomeImpl.java:602)
    atweblogic.ejb.internal.EJBDeploymentImpl.setupBeanHome(EJBDeploymentImpl.java
    :580)
    at weblogic.ejb.internal.EJBDeploymentImpl.deployBeans(CompiledCode)
    atweblogic.ejb.internal.EJBDeploymentImpl.deploy(EJBDeploymentImpl.java:335)
    atweblogic.ejb.internal.EJBJarDeployment.deploy(EJBJarDeployment.java:231)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(Compiled Code)
    atweblogic.ejb.internal.EJBManagerImpl.deployNew(EJBManagerImpl.java:352)
    atweblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:319)
    at weblogic.ejb.internal.EJBManagerImpl.deployBeans(Compiled Code)
    atweblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:242)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:827)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    The WebLogic Server did not start up properly.
    Exception raised: java.lang.reflect.InvocationTargetException
    java.lang.reflect.InvocationTargetException:java.lang.NoClassDefFoundError:
    com/beasys/commerce/axiom/contact/UnifiedProfileTypeManagerHome
    at java.lang.Class.isAssignableFrom(Native Method)
    at weblogic.ejb.internal.EJBHomeImpl.setup(EJBHomeImpl.java:602)
    atweblogic.ejb.internal.EJBDeploymentImpl.setupBeanHome(EJBDeploymentImpl.java
    :580)
    at weblogic.ejb.internal.EJBDeploymentImpl.deployBeans(CompiledCode)
    atweblogic.ejb.internal.EJBDeploymentImpl.deploy(EJBDeploymentImpl.java:335)
    atweblogic.ejb.internal.EJBJarDeployment.deploy(EJBJarDeployment.java:231)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(Compiled Code)
    atweblogic.ejb.internal.EJBManagerImpl.deployNew(EJBManagerImpl.java:352)
    atweblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:319)
    at weblogic.ejb.internal.EJBManagerImpl.deployBeans(Compiled Code)
    atweblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:242)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:827)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    java.lang.NoClassDefFoundError:
    com/beasys/commerce/axiom/contact/UnifiedProfileTypeManagerHome
    at java.lang.Class.isAssignableFrom(Native Method)
    at weblogic.ejb.internal.EJBHomeImpl.setup(EJBHomeImpl.java:602)
    atweblogic.ejb.internal.EJBDeploymentImpl.setupBeanHome(EJBDeploymentImpl.java
    :580)
    at weblogic.ejb.internal.EJBDeploymentImpl.deployBeans(CompiledCode)
    atweblogic.ejb.internal.EJBDeploymentImpl.deploy(EJBDeploymentImpl.java:335)
    atweblogic.ejb.internal.EJBJarDeployment.deploy(EJBJarDeployment.java:231)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(Compiled Code)
    atweblogic.ejb.internal.EJBManagerImpl.deployNew(EJBManagerImpl.java:352)
    atweblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:319)
    at weblogic.ejb.internal.EJBManagerImpl.deployBeans(Compiled Code)
    atweblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:242)
    at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:827)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)

  • Java.lang.ClassFormatError: _Basic using JSF in Jdeveloper10gv12

    Can someone give me why I get the following error : I've included the Class, JSP and daces-config code
    Thank
    Abi
    500 Internal Server Error
    OracleJSP:
    JSP Error:
    Request URI:/Application1-Project1-context-root/Basic.jsp
    Exception:
    java.lang.ClassFormatError: _Basic
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java)
         at com.evermind.util.OC4JSecureClassLoader.defineClassEntry(OC4JSecureClassLoader.java:172)
         at oracle.jsp.runtimev2.JspClassLoader.loadClass(JspClassLoader.java:744)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at oracle.jsp.runtimev2.JspPageInfo.getInstFacade(JspPageInfo.java:169)
         at oracle.jsp.runtimev2.JspPageTable.getInstFacade(JspPageTable.java:473)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:220)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    Java Class
    package mypackage.backing;
    import com.sun.faces.taglib.jsf_core.SelectItemsTag;
    import java.util.*;
    import javax.faces.model.SelectItem;
    import javax.faces.model.*;
    import mypackage.backing.Scholarship;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    public class Basic
    private SelectItem[] basicdays = new SelectItem[]{
    new SelectItem(" "),
    new SelectItem("Basic Information"),
    new SelectItem("Calculate Project"),
    new SelectItem("Change Ownership"),
    new SelectItem("Configure Project - Facility Category Group"),
    new SelectItem("Worksheets")
    private String basicday = "";
    public Basic()
    System.out.println("Class BASIC " );
    public SelectItem[] getBasicdays() {
    return basicdays;
    public void setBasicdays(SelectItem[] days) {
    this.basicdays = days;
    public String getBasicday() {
    return basicday;
    public void setBasicday(String day) {
    this.basicday = day;
    JSP Code
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <f:view>
    <h:outputText value="Hello"></h:outputText>
    <h:panelGrid columns="2"
    rowClasses="centered" footerClass="centered" border="1">
    <h:outputText value="Days List"></h:outputText>
    <h:selectOneMenu id="days" value="#(backing_basic.basicday)">
    <f:selectItems value="#{backing_basic.basicdays}"/>
    </h:selectOneMenu >
    </h:panelGrid>
    </f:view>
    Faces config
    <managed-bean>
    <managed-bean-name>backing_basic</managed-bean-name>
    <managed-bean-class>mypackage.backing.Basic</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/basic.jsp</from-view-id>
    <navigation-case>
    <from-outcome>nextpage</from-outcome>
    <to-view-id>/finish.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>

    I tested this code(copy-paste) in Orion and Tomcat and it works fine. I guess that this is not the full code you are executing since I see not used imports, the jsp without the <h:form> tag and a navigation rule that will never take place. Anyway try to deploy this to Tomcat or another AS to check if it running properly. I have seen ADF application running correct on Tomcat and not on Orion.

  • Java.lang.ClassFormatError: EDU/oswego/cs/dl/util/concurrent/ConcurrentRead

    Hi,
    I try to load an XML-File into my Applet with jdom4. But when reading in the Document with the SAX-Reader I get this Error:
    java.lang.ClassFormatError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap (Bad magic number)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.dom4j.tree.NamespaceCache.<clinit>(NamespaceCache.java:48)
    at org.dom4j.Namespace.<clinit>(Namespace.java:24)
    at org.dom4j.DocumentFactory.createNamespace(DocumentFactory.java:161)
    at org.dom4j.tree.NamespaceStack.createNamespace(NamespaceStack.java:286)
    at org.dom4j.tree.NamespaceStack.getQName(NamespaceStack.java:167)
    at org.dom4j.io.SAXContentHandler.startElement(SAXContentHandler.java:221)
    at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
    at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
    at org.apache.crimson.parser.Parser2.parse(Unknown Source)
    at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
    at org.dom4j.io.SAXReader.read(SAXReader.java:334)
    at org.dom4j.io.SAXReader.read(SAXReader.java:236)
    at client.Load.<init>(Load.java:42)
    at client.Login.startLoad(Login.java:183)
    at client.ParamTimer.run(ParamTimer.java:30)
    I use JRE 1.4.2_05! With JRE 1.5 I get a warning and then the JRE switches to his own SAX Parser.
    How can I solve this???
    Greets

    The error message says that the class file has a bad "magic number." Magic number is the first four bytes of a .class file and in a valid file they should be CA FE BA BE (in hex); "bad magic number" means that the first four bytes are something else and therefore it's not a valid Java .class file.

  • Java.lang.ClassFormatError while starting JSPM. SAP NW04s SR2

    Dear All,
    JSPM issued the following error when it was started. I have installed NW04s SR2 Java only and want to patch it to SP10
    #Error while executing
    phase.##
    #1.5#C000097C2FC400000000006559FA59FA00042BDF044BF5D8#1174136756631#/System/Server/Upgrade/Phases/JSPM/JSPMPhases/JSPM_MAIN##java.lang.Throwab
    le.xinit>(Throwable.java:58)#######Thread[main,5,main]##0#0#Error#1#java.lang.Throwable.xinit>(Throwable.java:58)#Java###Error : #2#java
    .lang.ClassFormatError#<null>#
    Java version is J2RE 1.4.2 IBM build j9xa64142ifx-20051125 (SAP i-Fix 97999: SR2 i-fix 93283 + 96573 + 97068 + 97427 + 96565)
    Please help.
    Warm Regards
    Mazdul

    Error got resolved by updating the JDK version

  • Java.lang.ClassFormatError: Bad major version number

    Hi friends,
    I am using JWS2.0(trial version). I have uploaded class files into servlet (and respective packages), every thing was working fine. one fine day i started getting the 404 - file not found error(JWS not yet expired). I uninstalled the jws, j2sdk1.4.0, jre1.4.0 but with no result.
    I even formated the system and loaded all again. But still i am getting the same problem.
    The servlet is the simple HelloWorld servlet.
    Through the SunExample its working fine. But the uploaded servlet is not getting recognised.
    Here is the ErrorLog
    [Tue Feb 22 17:26:29 GMT+05:30 2005] ClassLoaderFactory Error: Can not find Class : Hello [ ClassNotFoundException ]
    [Tue Feb 22 17:26:31 GMT+05:30 2005] ClassLoaderError: (com.sun.server.loader.JarClassLoader@17d67e:\servlets) ERROR: Unable to load class local class Hello
    [Tue Feb 22 17:26:31 GMT+05:30 2005] java.lang.ClassFormatError: Bad major version number
    at java.lang.ClassLoader.defineClass(ClassLoader.java:219)
    at com.sun.server.loader.ServletClassLoader.callDefineClass(ServletClassLoader.jav a:726)
    at com.sun.server.loader.ServletClassLoader.checkAndDefineClass(ServletClassLoader .java:620)
    at com.sun.server.loader.DirectoryClassLoader.getClassFromLocalDir(Compiled Code)
    at com.sun.

    Try re-compiling the Servlet. Make sure that the JDK version used to recompile is <= the version used to run the server (if you are using a higher jdk to compile the servlet, maybe Java 5.x, then you are to run, maybe Java 1.4.x, then use the -target option of javac to target the lower release...)

  • Java.lang.ClassFormatError: HTML (Bad magic number)

    hi,
    i have quite a strange problem:
    when my applet tries to parse an XML file with SAX (no DTD-validation) i got the following error:
    java.lang.ClassFormatError: <HTML> (Bad magic number)
    Well i had some problems before with the ClassFormatError but they were because some class-files were corrupt. They were easy to fix because the defecitve class-file was written next to java.lang.ClassFormatError. This time i got the <HTML> expression next to the error. what does this mean?
    thnx in advance!
    marc

    Bad magic Number. means the first 4 bytes did not equals CAFEBABE (0xCAFEBABE) But why do you see <HTML> after that is beyound me. Can you locate which class is foul and replace it?

  • ALERT: java/lang/ClassFormatError: Bad version information.

    Hi all,
    I'm developing a mobile application but I got this error: ALERT: java/lang/ClassFormatError: Bad version information.
    I've read all the posts in the forum and searched for other ones with google, but still no luck :-( pls help.
    The situation is the following:
    IDE: netBeans 6.5
    MIDP2.1
    CLDC1.1
    javac.source=1.3
    javac.target=1.3
    J2ME web services 1.0 loaded.
    The application retrieves tracking data from a .net web service: I've created the stub with the sun official tool included in the WTK (Stub Generator).
    When I run the jar with the sun device emulator, the splash screen is loaded but, when I retrieve data from the web service, the application crashes with the error ALERT: java/lang/ClassFormatError: Bad version information. No problem if there's no data to fetch.
    Where am I wrong? pls help, thx,
    have a i nica day,
    Michela

    Have you tried JSR172Demo application that is supplied with Netbeans? if yes, did it work?
    Instructions on how to obtain this demo app are provided in [Netbeans help|http://i39.tinypic.com/k2h8og.jpg], section Importing Java ME Projects -> Sun Java Wireless Toolkit project

Maybe you are looking for

  • How to make .pdf's open in Reader and NOT Photoshop

    I am using Adobe Reader X, v 10.1.1 with Vista.  I also have Adobe Photoshop installed.  When I try to open a .pdf file, it automatically opens in Photoshop instead of Reader.  Is there a setting I can change somewhere to ensure that pdf's automatica

  • White line in olther side and black in the other side

    I have a brand new HP Officejet Pro 8620 printer. In photo printing it prints three lines accoss the paper. These lines start black in left side of the paper and disapper in the center and appear a white in the right side of the paper. What could be

  • How Get the column name of LOV with code??

    Hi i now that exist a SET_COLUMN and i cant change the value the any column, now i want to know the value column in the LOV in any moment. Somebody us made that? i contact a metalink and their tell me that is not possible that not exist a GET.... Tha

  • Transfering Contacts FROM iphone

    Hello everyone. My contacts on Yahoo are severely outdated. Currently, I have contacts sync-ing set to 'off'. I would like to transfer my contacts from my iPhone to Yahoo. But I am afraid that my iPhone contacts will be lost. I have read that when th

  • Message problem with N96

    I have a Nokia N96 and as of this morning, any new texts that I receive are saving amongst older texts that I've received instead of at the top of my inbox. Any ideas why this is happening? Thanks.