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

Similar Messages

  • 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

  • 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: Bad version information.

    Hi
    When running the midlet in wireless tool kit the following
    error is occuring
    java/lang/ClassFormatError: Bad version information.
    can any body suggest me wat the problem is

    Hi,
    answer is at http://forum.java.sun.com/thread.jspa?threadID=569449&tstart=0

  • 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?

  • Java.lang.ClassFormatError: AppletSame (Bad magic number)??****

    I run a Japplet(AppletSame.class) ,found this Exception:
    java.lang.ClassFormatError: AppletSame (Bad magic number)??****
    what does it mean?how can i solve it?

    hi,
    the problem comes if there is some kind of problem with the class file and therefore the JVM cannot read the class file, try recompiling the program..
    cheerz
    ynkrish

  • 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.ClassFormatException : Bad Magic number Excpetion

    Hi all
    I am trying to hit an applet through an iplanet web connector.
    The scenario is machine 1 is the web server (iplanet 4.1) . machine 2 is app
    server (iplanet 6.0 sp2)
    The web connector is configured for handling all the requests to machine2
    that refer to the app server.
    when i place my jar (containing the applet classes) on the app server and
    then try to open it through a jsp on the app server itself , it
    throws a
    java.lang.ClassFormatError: com/niit/cliks/te/web/TestingEngine (Bad magic
    number)
    exception.
    But if i try with the same jar file on the web server (the same as running
    the app server( - i.e. machine 2 ) the jar works just fine.
    can anybody put some light on the issue. I am in a very tight deadline
    situation.
    thanks and regards
    raghav..
    PS - the applet is not signed and i don't wish (and plan) to sign it.

    Dear friend
    But the same class file and jars are working (without any change in the jar) when i put them on the web server which is also on the same machine running the app server.
    I may suspect my compiled files but i don't.
    i have compiled them at least ten times from the moment i started getting the error.
    any other guesses....
    thanks for your consideration
    regards..
    raghav..

  • Java.lang.ClassFormatError: Truncated class file

    Hi
    Previously my application is running on jdk 1.4 and its supporting castor i.e. castor-0.9.5.4-xml.jar
    Now i had upgrade my jdk to 1.6 and i am using same castor.jar
    so it is giving me following error
    Exception in thread "main" java.lang.ClassFormatError: Truncated class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
    at com.sun.tools.javac.v8.GenerateClass$Loader.findClass(GenerateClass.j
    ava:273)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at org.exolab.castor.mapping.loader.Types.typeFromName(Types.java:93)
    at org.exolab.castor.mapping.loader.MappingLoader.resolveType(MappingLoa
    der.java:228)
    at org.exolab.castor.mapping.loader.MappingLoader.createDescriptor(Mappi
    ngLoader.java:394)
    at org.exolab.castor.xml.XMLMappingLoader.createDescriptor(XMLMappingLoa
    der.java:202)
    at org.exolab.castor.mapping.loader.MappingLoader.loadMapping(MappingLoa
    der.java:258)
    at org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:291)
    at org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:246)
    at org.exolab.castor.xml.Marshaller.setMapping(Marshaller.java:520)
    I also try to upgrade castor to latest version i.e castor1.2-xml.jar with jdk 1.6 and this time it gives me error
    Exception in thread "main" java.lang.ClassFormatError: Truncated class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
    at com.sun.tools.javac.v8.GenerateClass$Loader.findClass(GenerateClass.j
    ava:273)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at org.exolab.castor.mapping.loader.Types.typeFromName(Types.java:92)
    at org.exolab.castor.mapping.loader.AbstractMappingLoader.resolveType(Ab
    stractMappingLoader.java:384)
    at org.exolab.castor.xml.XMLMappingLoader.createClassDescriptor(XMLMappi
    ngLoader.java:209)
    at org.exolab.castor.mapping.loader.AbstractMappingLoader.createClassDes
    criptors(AbstractMappingLoader.java:262)
    at org.exolab.castor.xml.XMLMappingLoader.loadMapping(XMLMappingLoader.j
    ava:156)
    at org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmars
    haller.java:162)
    at org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmars
    haller.java:128)
    at org.exolab.castor.xml.Marshaller.setMapping(Marshaller.java:556)
    Can any one please help me out..
    Thanks in advance

    hi,
    i think one of application's class file currupted , Recompile all java files and then try.
    Edited by: sagar_birari on Mar 27, 2008 5:47 AM
    Edited by: sagar_birari on Mar 27, 2008 7:20 AM

  • 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 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

  • What caused the "java.lang.OutOfMemoryError (no stack trace available)"?

    We just met another problem: after I modified the BDM file on TUXEDO and bdmconfig.xml
    file on WEBLOGIC (with no ACL or authentication setup on both side), when I booted
    up the WebLogic 6.1 server, the ULOG file of Tuxedo says that the connection has
    been set up, however, I got the "java.lang.OutOfMemoryError (no stack trace available)"
    on the WebLogic side. I tried to enlarge the Java heap size even to 1024m, but it
    has no use. If I delete the WTC setting then WebLogic works fine.
    Could somebody helps me on this? Because we have a very tight schedule on development,
    I do appreciate your quick response.
    Thanks!
    Bill

    Hi,
    I am getting same OutofMemoryError. I could not understand change in bdmconfig.xml
    removed the outofmemory error.
    what is bdmconfig.xml file and you specified port#?
    I could not able to see any port # in the config.xml...
    any help is appreciated.
    RajKumar
    "Bill Yuan" <[email protected]> wrote:
    >
    Bob,
    Another expert in our company told me that we should use a different
    PORT# (kind
    of DUMMY port) in the bdmconfig.xml file on WebLogic side, instead of
    the real WebLogic
    instance PORT#. We tried and the OutOfMemoryError disappeared, and the
    WTC connection
    works OK. We don't know why should we do this, maybe it is a bug or some
    hardware
    requirement.
    Anyway, thank you very much for your help and quick respondse!
    have a good day!
    Bill
    Bob Finan <[email protected]> wrote:
    Bill,
    Check the logs to see if the out of memory is the only execption orif
    it is the last exception. It could be that there is something happening
    earlier on that you are missing.
    There are also other JVM problems that can arise besides the heap
    size. The Hotspot VM had an issue where you needed to set a maximum
    permanent generation size( helps garbage collection tuning I think).
    (-XX:MaxPermSize=32m for jdk130,64m for jdk131). It comes into
    play when you are loading many classes.
    Bob Finan
    Bill Yuan wrote:
    Bob,
    Thanks! We didn't set MTYPE in both BDMCONFIG files in Tuxedo and
    WebLogic
    sides.
    From the WTC document and Tuxedo document, it says that if MTYPE is
    not
    specified,
    the default is to turn ENCODING/DECODING on. Do you see any other
    possibilities?
    Thanks!
    Bill
    Bob Finan <[email protected]> wrote:
    Bill,
    One possible reason is if MTYPE is set, in the DMCONFIG on the
    Tuxedo side, as part of your remote domain definitions of the WTC
    domain. This should not be set or set it to NULL. This problem occurs
    because encoding/decoding is always needed between java and non-java
    domains.
    Bob Finan
    Bill Yuan wrote:
    We just met another problem: after I modified the BDM file on TUXEDO
    and
    bdmconfig.xml
    file on WEBLOGIC (with no ACL or authentication setup on both side),
    when
    I booted
    up the WebLogic 6.1 server, the ULOG file of Tuxedo says that the
    connection
    has
    been set up, however, I got the "java.lang.OutOfMemoryError (no
    stack
    trace available)"
    on the WebLogic side. I tried to enlarge the Java heap size even
    to
    1024m,
    but it
    has no use. If I delete the WTC setting then WebLogic works fine.
    Could somebody helps me on this? Because we have a very tight scheduleon development,
    I do appreciate your quick response.
    Thanks!
    Bill

  • HELP!!! java.lang.ClassFormatError: (Truncated class file)

    Hello all,
    I'm writing a ClassLoader and the funniest things are happening. If I load a compiled class for the first time after compilation everything is ok. Once I change the class and recompile it, it starts putting out java.lang.ClassFormatError: (Truncated class file). If I alter the changes back to normal and recompile. It works again. Is there some sort of buffer which keeps the once loaded class in memory, even after rebooting?
    Please help, I'm at a loss
    Gideon

    hi dmbdmb,
    I got following error when try to run a java code in JBoss.
    15:39:56,696 ERROR [LogInterceptor] Unexpected Error:
    java.lang.ClassFormatError: Thilina (Truncated class file)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
    at com.sun.tools.javac.v8.StringCompiler$Loader.findClass(StringCompiler
    .java:63)
    at com.sun.tools.javac.v8.StringCompiler.executeMethodWithReturnType(Str
    ingCompiler.java:120)
    at cc.aot.qVoice.domain.ejb.qVoiceManager.qVoiceManagerEJB.getVxmlString
    (qVoiceManagerEJB.java:125)
    I use JBoss 3.0.6 and sdk 1.4. In my program, classes are create and load on the fly. Then using Reflection API I called some
    methods in the dynamically created class(this class not
    write into a file and it is taken as a String variable).
    I refferd this url as a guid to write class loader and compiler.(actually same thing i copied
    from there and change it's name Pmat1 to StringCompiler)
    http://forum.java.sun.com/thread.jsp?thread=347467&forum=4&message=1439418
    When I run this as a normal application, it is work well. Then I try to run it in a jboss and it will give the above error.
    In here I Wote some EJBs and struts also and i called the methodds in the StringCompiler(Pamat1) class in a EJB. Thilina is
    the name of the dynamically created calss and StringCompiler is the class that includes the class loader and compiler methods
    as in the above url. qVoiceManagerEJB has a getvxmlString method. Whithin this method
    i called required the methods in the String compiler.
    Can u some body help me. Thanx in advanced for any help.
    anjithalb

  • Exception in thread "main" java.lang.ClassFormatError

    i was trying out a basic program just to create a button using swing, and initially it did run fine. but later on i had to scrap it and start over, and on compiling it at that point, it gave me the following error:
    Exception in thread "main" java.lang.ClassFormatError: Button1 (Truncated class
    file)
    at java.lang.ClassLoader.defineClass0(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)
    The code i used was as follows:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Button1 extends JFrame {
         private JButton enter;
         public Button1()
              super("Testing Buttons");
              Container c = getContentPane();
                   c.setLayout(new FlowLayout());
                   enter = new JButton("Click to enter");
                   c.add(enter);
                   ButtonHandler handler = new ButtonHandler();
                   enter.addActionListener(handler);
                   setSize(275, 100);
                   show();
         public static void main(String args[])
              Button1 app = new Button1();
              app.addWindowListener(
                        new WindowAdapter() {
                             public void windowClosing(WindowEvent e)
                   System.exit(0);
         private class ButtonHandler implements ActionListener {
              public void actionPerformed(ActionEvent e)
                   JOptionPane.showMessageDialog(null, "you pressed: " + e.getActionCommand());
    Could someone please help?
    Also, as i'm new to the lang, could anyone just give me a small sample snippet as to how to produce a new frame/window on clicking a button, the new frame in turn having 2 more buttons which on being clicked generate a (distinct) frame each?
    thnx!

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Button1 extends JFrame {
    private JButton enter, open;
    private static int count = 0;
    public Button1()
    super("Testing Buttons " + count);
    Container c = getContentPane();
    c.setLayout(new FlowLayout());
    enter = new JButton("Click to enter");
    c.add(enter);
    count ++ ;     
    if(count > 1){
         open = new JButton("Click to open");
         c.add(open);
         open.addActionListener(new ButtonHandler());
    enter.addActionListener(new ButtonHandler());
    this.addWindowListener(new WindowsHandler());
    setSize(275, 100);
    show();
    public static void main(String args[])
              new Button1();
    private class ButtonHandler implements ActionListener {
    public void actionPerformed(ActionEvent e)
    //JOptionPane.showMessageDialog(null, "you pressed: " + e.getActionCommand());
               new Button1();
    private class WindowsHandler implements WindowListener {
       public void windowOpened( WindowEvent e ){
       public void windowClosing( WindowEvent e ){
        System.exit(0);
       public void windowClosed( WindowEvent e ){
       public void windowIconified( WindowEvent e ){
       public void windowDeiconified( WindowEvent e ){
       public void windowActivated( WindowEvent e ){
       public void windowDeactivated( WindowEvent e ){
    }

  • Java.lang.ClassFormatError

    I have an ejb client application that works fine when deployed manually. I then decided to decided to deploy with Java Web Start, the deployment goes fine but some of the app. functions don't work and return an error on the console. Here is a copy of the error message.
    Java Web Start Console, started Thu Nov 13 10:38:39 EST 2003
    Java 2 Runtime Environment: Version 1.4.0_03 by Sun Microsystems Inc.
    Logging to file: C:\Test-me\Log.txt
    java.lang.ClassFormatError: cc/admin/email/client/AdministratorUI$18 (Illegal Variable name " val$jtf")
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader.defineClass(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader.access$1(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at cc.admin.email.client.AdministratorUI.createTermAndYearDialog(AdministratorUI.java:440)
         at cc.admin.email.client.AdministratorUI.jMenuItemSCTAY_actionPerformed(AdministratorUI.java:398)
         at cc.admin.email.client.AdministratorUI.access$6000471(AdministratorUI.java:77)
         at cc.admin.email.client.AdministratorUI$6.actionPerformed(AdministratorUI.java:212)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source).
    The portion of my code responsible for this is:
    final JTextField jtf = new JTextField(termAndYear[1]);
    jtf.addKeyListener(new JTextFieldFormat(jtf,4));
    jtf.addFocusListener(new java.awt.event.FocusAdapter() {
    public void focusGained(FocusEvent e) {
    jtf.setCaretPosition(0);
    jtf.selectAll();
    Apart from that action, the application works just fine. The interesting thing is, this does not happen if I run the application locally using the required jar files. It only happens when deployed with Java Web Start.
    I'll appreciate any help. Thanks

    hi,
    it looks like the class you want to load is broken. Can you send more information what app server do you use, which jre use this app server, and which java compiler do you use and the exact line were the exception trows.

Maybe you are looking for

  • Epub to be created and viewed with computer and ipad

    Now that Pages can work with video, we at the school would like to create content to promote the ipad while still being able to view it on a computer ereader. I've tried with Adobe which only handles SWF and with the Firefox add on EPubReader. I'm no

  • Help! How do I lengthen a still image that has another still image in front of it?

    When I try to lengthen the first of two adjacent still images in a single video track, I cannot do so. I can shorten the image, and I can both lengthen and shorten the duration of the second image, but that's all. I assume there is a very easy settin

  • Unloding point it's not maintain r/3 side but in report it display

    Hi Friends, While in companycode  5000 for  customer  DOHH0006 unloading point is not maintained in  r/3 side  but in report it display  unloading point    customer                                        unloding point DOHH0006     Haldiram House    

  • Report to compare PCA to GL

    Hello does anyone know about a report to compare Profit Center Accounting to General Ledger for a given period? Thank you

  • Can transaction OBCP be opened to be maintained in production?

    Hello My client wants to know if transaction OBCP - Define Tax Jurisdiction be opened to be maintained in production?  If so what implications might there be in setting this transaction as open in production? Can anybody please help me with the sugge