IncompatibleClassChangeError

Hi!
I' m trying to implement a Module (stateless session bean) for XIs Module Processor. When I call a method on the ModuleContext, the following Exception is thrown:
[code]com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback.
            at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0.process(ModuleLocalLocalObjectImpl0.java:118)
            at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:252)
            at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0.process(ModuleProcessorLocalLocalObjectImpl0.java:103)
            at com.sap.aii.adapter.file.File2XI.send(File2XI.java:3125)
            at com.sap.aii.adapter.file.File2XI.processFileListFile2XI.java:1299)
            at com.sap.aii.adapter.file.File2XI.invokeFile2XI.java:650)
            at com.sap.aii.af.service.scheduler.JobBroker$Worker.runJobBroker.java:450)
            at com.sap.engine.core.thread.impl3.ActionObject.runActionObject.java:37)
            at java.security.AccessController.doPrivileged(NativeMethod)
            at com.sap.engine.core.thread.impl3.SingleThread.executeSingleThread.java:100)
            at com.sap.engine.core.thread.impl3.SingleThread.runSingleThread.java:170)
Caused by: java.lang.IncompatibleClassChangeError
            at at.snapconsult.test.AdapterModuleTest.processAdapterModuleTest.java:68)
            at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0.process(ModuleLocalLocalObjectImpl0.java:103)
            ... 10 more[/code]
Has anybody got ideas about the cause?
Regards,
Thomas

Hi Thomas,
Check your module jars version are compatible with XI's current SP level you are working on ! If they are not compatible, download the correct verion and try.
If this doesnt help, please post the complete exception stack.
Regards,
Uma

Similar Messages

  • IncompatibleClassChangeError. Caused by garbage collection?

    The problem occurs on JDK 1.3.1-b24 compiled in JBuilder Windows and
    running on Sun Solaris with identical JDK version.
    The application is a relatively complex RMI server.
    An error recovery function in the server runs in a Thread every two
    minutes. Most of the time it has nothing to do and ends without
    incident.
    Occasionally conditions require recovery that may not be successful
    for many attempts.
    Part of the recovery is a simple debug display of parameters involved
    in the recovery. There will be multiple displays during a single
    recovery cycle.
    In a recent example of problem, the recovery executed every two
    minutes for over two hours with the debug display working
    successfully.
    Suddenly one display works successfully and 5 milliseconds later the
    same display fails with a IncompatibleClassChangeError.
    The last part of the stack trace is:
    java.lang.IncompatibleClassChangeError
         at [class name].toString([class name].java:74)
         at java.lang.String.valueOf(String.java:1947)
         at java.lang.StringBuffer.append(StringBuffer.java:370)
         at java.util.AbstractMap.toString(AbstractMap.java:567)
         at java.lang.String.valueOf(String.java:1947)
    line 74 of class is
    public String toString()
    return _responses.toString();
    where _responses is an ArrayList that has been stored on Map that
    contains the parameters that is being display as part of the debug
    information.
    Once the failure occurs, it will always occur until the JVM is
    restarted. This suggests to me that something in the JVM, maybe garbage collection, has either corrupted the in-memory copy of the class or some internal table used by the JVM has become corrupted.
    Anybody else have ideas?

    java.lang.IncompatibleClassChangeError
         at [class name].toString([class name].java:74)
         at java.lang.String.valueOf(String.java:1947)
    at
    java.lang.StringBuffer.append(StringBuffer.java:370)
    at
    java.util.AbstractMap.toString(AbstractMap.java:567)
         at java.lang.String.valueOf(String.java:1947)
    Problem: The IncompatiableClassChangeError is a Symbolic resolution problem. In lamen's terms a package,class,method,or a variable name is corrupted.
    Possible problem location: Are you using a Custom ClassLoader? Do you Load and compile on the fly?
    where _responses is an ArrayList that has been stored
    on Map that
    I would look hard at the following methods in your MAP Interface:
    public void clear();
    public Object put(Object key,Object value);
    public void putAll(Map t);
    public Object remove(Object key);Is it possible that your MAP interface is corrupting your ArrayList using one of the above methods? Then, when you are building the strings using the AbstractMap's.toString() method, you are getting the IncompatiableClassChangeError?
    This is word for word listing of the MAP Interface...V1.41.
    Some map implementations have restrictions on the keys and values they may contain. For example, some implementations prohibit null keys and values, and some have restrictions on the types of their keys.
    This puzzles me
    Attempting to insert an ineligible key or value throws an unchecked exception, typically NullPointerException or ClassCastException.
    What's this, they state above that you should get a unchecked Exception, but the first sentence below makes me assume they are pulling a query on an ineligible key or value???
    Attempting to query the presence of an ineligible key or value may throw an exception, or it may simply return false; some implementations will exhibit the former behavior and some will exhibit the latter.
    Oh,OK. They are basically saying it totally depends on how you implement this Interface <grin>
    More generally, attempting an operation on an ineligible key or value whose completion would not result in the insertion of an ineligible element into the map may throw an exception or it may succeed, at the option of the implementation.
    The "optional" they are talking about are the methods that I listed above.
    Such exceptions are marked as "optional" in the specification for this interface.
    Well you asked for ideas, so there's a brain fart for you?
    ...Hope this helps

  • How to avoid the java.lang.IncompatibleClassChangeError

    Hi all!
    I have problem to make my client Java application to work under Oracle JVM. This application works fine as standalone java class. In this mode it communicates fine with a web server.
    I have loaded all needed jar files into my user (sample) using the following command:
    Loadjava -thin -r -v -f -user sample/sample@<my_url>:1521:usr10se <jar files and classes>
    When I call my public method from a PL/SQL function I receive the following error:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.IncompatibleClassChangeError
    The following is a trace context:
    *** 2006-11-29 17:28:10.134
    *** ACTION NAME:() 2006-11-29 17:28:10.134
    *** MODULE NAME:(SQL*Plus) 2006-11-29 17:28:10.134
    *** SERVICE NAME:(…) 2006-11-29 17:28:10.134
    *** SESSION ID:(49.5) 2006-11-29 17:28:10.134
    java.lang.IncompatibleClassChangeError
         at org.apache.axis.encoding.SerializationContext.startElement(SerializationContext.java:1122)
         at org.apache.axis.message.MessageElement.outputImpl(MessageElement.java:1253)
         at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
         at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
         at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
         at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
         at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
         at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
         at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
         at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:554)
         at org.apache.axis.Message.getContentType(Message.java:486)
         at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:1792)
         at org.uddi4j.transport.ApacheAxisTransport.send(ApacheAxisTransport.java:87)
         at org.uddi4j.transport.TransportBase.send(TransportBase.java:53)
         at org.uddi4j.client.UDDIProxy.send(UDDIProxy.java:1778)
         at org.uddi4j.client.UDDIProxy.find_tModel(UDDIProxy.java:823)
         at …. Call from my class
    I suspected multiple definitions of the SerializationContext.class in my jar files but was wrong: there is only one definition in the axis.jar file. For some reasons this jar file contained SerializationContext.class and SerializationContext.java modules, but I resolved this problem earlier: loadjava does not allow loading the both.
    What can be cause of the java.lang.IncompatibleClassChangeError problem?
    What I have to do to make my class work from Oracle JVM?
    Thanks,
    Roman

    Avi,
    You right, at the beginning I had problems with jar files compiled using Java 1.5. But I discovered this problem earlier, when tried to test standalone client application. Since then a whole web services tool kit, provided by my company, was recompiled with Java 1.4 and now I have no problem with standalone classes, running under Oracle JDK 1.4 environment. It means that I’m pretty sure that all Java classes that I’m loading to Oracle are compiled with JDK 1.4.
    You also right with your second guess: not all Java objects in the user_objects table of the SAMPLE user are VALID. I started from a scratch (again): dropped all Java objects from user schema and followed Kuassi Mensah instructions from the “Virtualize Your Oracle Database with Web Services” (http://www.oracle.com/technology/pub/articles/mensah_dws.html): I downloaded and then loaded to my schema the Web Service Call-out Utility jar files using the following command: loadjava -u sample/sample@usr10se -r -v -f -genmissing C:\oracle\ora10_DB\sqlj\lib\dbwsclientws.jar C:\oracle\ora10_DB\sqlj\lib\dbwsclientdb102.jar.
    This command loaded about 5000 java objects, but 400+ of them were INVALID and I saw a lot of “ORA-29534: referenced object … could not be resolved” errors.
    The tool kit provided by the group in my company only increased number of invalid objects.
    What is a strategy in this situation?
    Do all the objects have to be VALID?
    I can try to resolve the “ORA-29521: referenced name ... could not be found” errors by finding corresponding classes in some jar files and loading these jar files, but it does not guarantee that all ORA-29534 errors will go away. What else can I do to cleanup my java objects?
    Thank you very mach,
    Roman

  • Error when displaying report -IncompatibleClassChangeError

    Hi there. I am attempting to display a Crystal Report onto a JSP and im getting the following error:
    java.lang.IncompatibleClassChangeError: Implementing class
         java.lang.ClassLoader.defineClass0(Native Method)
         java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
         java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         java.lang.ClassLoader.defineClass0(Native Method)
         java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    Here's how my servlet code looks like:
    String path = "em_k_rpt_written_premium_web.rpt";
    IReportSourceFactory2 rsf = new JPEReportSourceFactory();
                   IReportSource rptSource = (IReportSource)rsf.createReportSource(path,request.getLocale());
                   ConnectionInfos connInfos = new ConnectionInfos();
                   IConnectionInfo connInfo1 = new ConnectionInfo();
                   connInfo1.setUserName("tron2000");
                   connInfo1.setPassword("tron2000");
                   connInfos.add(connInfo1);
                   CrystalReportViewer viewer = new CrystalReportViewer();
                   viewer.setDatabaseLogonInfos(connInfos);
                   viewer.setReportSource(rptSource);
                   viewer.setEnableLogonPrompt(false);
                   viewer.processHttpRequest(request, response, getServletConfig().getServletContext(),null);
    I'm using: JDK 1.4, Tomcat 5.0, Crystal Reports 9
    I already copied all JRC .jar files into my WEB-INF\lib directory.
    Dont really know what might be happening.
    Any help, will be greatly appreciated.
    Bye.
    Esteban

    even i am trying the same if u get something pls do let me know

  • Java.lang.IncompatibleClassChangeError by using AXIS in SAP NW

    Hi all,
    I wrote a web programm using AXIS 1.2. I have no problem to deploy the EAR onto NW AS and can deploy a service onto this web application. But as I try to call the service I got exception´as follow. Someone has idea?
    I am sure one or some of the jar files used in the programm are not compatible with that of SAP. But which one?
    My web application runs no problem by Tomcat.
    #1.5 #000C297AEFDA00650000002C00000A9000044155A603AAAD#1197736054125#System.err#sap.com/myAxisEar#System.err#Guest#0####a3e9b1d0ab2a11dca861000c297aefda#SAPEngine_Application_Thread[impl:3]_30##0#0#Error##Plain###15.12.2007 17:27:34 org.apache.axis.transport.http.AxisServlet logException
    INFO: Exception:
    java.lang.IncompatibleClassChangeError
         at org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1387)
         at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148)
         at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112)
         at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
         at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
         at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
         at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
         at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
         at org.apache.axis.server.AxisServer.initSOAPConstants(AxisServer.java:345)
         at org.apache.axis.server.AxisServer.invoke(AxisServer.java:279)
         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Message was edited by:
            Thomas Roland

    Folowing is the code. The exception comes from the code inside try:
    org.apache.axis.client.Call _call = super._createCall();
    try{
        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1});
    I am not sure if the class version of "org.apache.axis.client.Call" not compatible. MAybe the axis use another class an dthis is not compatible with that in SAP.
    Sounds quite difficult to figure it out.

  • Java.lang.IncompatibleClassChangeError when deploying web service

    Hi there,
    I'm trying to deploy a jax-rpc web service and get a java.lang.IncompatibleClassChangeError error when I use org.apache.axis.client.AdminClient with the following deploy.wsdd file. The funny thing is the Web Service is deployed and listed in AXIS. Can anyone help me to resolve this.
    <!-- Use this file to deploy some handlers/chains and services      -->
    <!-- Two ways to do this:                                           -->
    <!--   java org.apache.axis.client.AdminClient deploy.wsdd          -->
    <!--      after the axis server is running                          -->
    <!-- or                                                             -->
    <!--   java org.apache.axis.utils.Admin client|server deploy.wsdd   -->
    <!--      from the same directory that the Axis engine runs         -->
    <deployment
        xmlns="http://xml.apache.org/axis/wsdd/"
        xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
      <!-- Services from FlightInfoServiceIFService WSDL service -->
      <service name="flightservice" provider="java:RPC" style="rpc" use="encoded">
          <parameter name="wsdlTargetNamespace" value="urn:flightservice"/>
          <parameter name="wsdlServiceElement" value="FlightInfoServiceIFService"/>
          <parameter name="wsdlServicePort" value="flightservice"/>
          <parameter name="className" value="flightCompany.rpcservice.FlightserviceSoapBindingImpl"/>
          <parameter name="wsdlPortType" value="FlightInfoServiceIF"/>
          <parameter name="typeMappingVersion" value="1.2"/>
          <operation name="getFlights" qname="operNS:getFlights" xmlns:operNS="urn:flightservice" returnQName="getFlightsReturn" returnType="rtns:string" xmlns:rtns="http://schemas.xmlsoap.org/soap/encoding/" soapAction="" >
            <parameter qname="in0" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
          </operation>
          <parameter name="allowedMethods" value="getFlights"/>
          <parameter name="scope" value="Session"/>
      </service>
    </deployment>

    I was getting this error running AdminClient from a ant task, but the got no error when I ran it from the commanr line. But I'm getting the same thing back from the actual service itself whrn I try and invoke it using stubs generated by the wsdl2java tool with the following code
        public String getFlightsFromWSService(String date) throws Exception {
         String REMOTE_ENDPOINT_URL = "http://localhost:7070/axis/services/flightservice";
         String namespace = "flightservice";
         String portName = "FlightInfoServiceIF";
         String servicename = "flightservice";
         //make a service
         FlightInfoServiceIFService service = new FlightInfoServiceIFServiceLocator();
         //get a stub to the service
         FlightInfoServiceIF flightSvc = service.getflightservice( new URL( REMOTE_ENDPOINT_URL ));
         //make a call
         return flightSvc.getFlights(date);
        }TCPMonitor gives me this pile of stuff
    HTTP/1.1 500 Internal Server Error
    Content-Type: text/html;charset=ISO-8859-1
    Content-Language: en-IE
    Date: Tue, 31 May 2005 22:43:12 GMT
    Server: Apache-Coyote/1.1
    Connection: close
    <html>
       <head>
          <title>Apache Tomcat/4.1.31 - Error report</title>
          <STYLE>
             <!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;}
    H3{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;}
    BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;}
    B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE>
          </head>
          <body>
             <h1>HTTP Status 500 - </h1>
             <HR size="1" noshade="noshade">
                <p>
                   <b>type</b> Exception report
                </p>
                <p>
                   <b>message</b>
                   <u></u>
                </p>
                <p>
                   <b>description</b>
                   <u>The server encountered an internal error () that prevented it from
    fulfilling this request.</u>
                </p>
                <p>
                   <b>exception</b>
                   <pre>javax.servlet.ServletException: Servlet execution threw an exception
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
    (ApplicationFilterChain.java:222)     at org.apache.catalina.core.ApplicationFilterChain.doFilter
    (ApplicationFilterChain.java:146)     at  ...........lots more exceptions.........
                </p>
                <p>
                   <b>root cause</b>
                   <pre>java.lang.IncompatibleClassChangeError     at
    org.apache.axis.message.MessageElement.addTextNode
    (MessageElement.java:1387)
         at org.apache.axis.message.SOAPHandler.endElement
    (SOAPHandler.java:118)
         at org.apache.axis.encoding.DeserializationContext.endElement
    (DeserializationContext.java:1083)     at
    org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement
    (Unknown Source)     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
    Dispatcher.dispatch(Unknown Source)
         at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
    (Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at javax.xml.parsers.SAXParser.parse(Unknown Source)
         at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:226)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:645)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:595)
    </pre>
                </p>
                <HR size="1" noshade="noshade">
                   <h3>Apache Tomcat/4.1.31</h3>
                </body>
             </html>

  • Why would Object.clone cause IncompatibleClassChangeError

    I have 3 classes,
    B, A, and M
    public class B implements Clonable
    public Object clone() throws CloneNotSupportedException
    { return super.clone(); } // basically Object.clone()
    public class A extends B { ... }
    public class M extends A { ... }
    A and M do not override clone
    sometime, not all the time, I get this IncompatibleClassChangeError when
    M.clone() is invoked. I don't know why, since I'm not doing anything profound, or why it would happen only some times. I'm running java 1.4.2_04-b05

    You can try having each of your subclasses also implement Cloneable. Granted, this is a bit of copy-pasted code to keep calling super.clone(). See if that fixes it.
    - Saish
    "My karma ran over your dogma." - Anon

  • Why am I getting an IncompatibleClassChangeError, and how do I slove it

    I have a class that holds data: Book.
    I needed to swap it to being an interface.
    Easy enough - and now I have a SimpleBook class which implements Book.
    I have a Jar that refers to Book Objects.
    The jar was compiled when Book was not an interface.
    even though Book has the same methods - I get an IncompatibleClassChangeError when Book is used in the precompiled Jar
    Why is this?
    and is there a way I can fix the problem?

    the precompiled code only references Books and need
    not know how to make them or that it is now actually
    a SimpleBook.You have to recompile everything that uses Book.
    I think calling a method on a interface uses a different bytecode to calling a method on a class, but I can not find it in the VM specs.
    Edit: invokeinterface & invokespecial.

  • Dynamic classloading and incompatibleclasschangeerror

    I have different versions of my applications like v1 v2 v3 and my current version is v4.
    In my case, v4 might need to talk to v3, v2 or v1. To achevie that I need that same versions of classes from the respective versions of the applications i.e. I will make jars like v3.jar, v2.jar and v1.jar which will be loaded dynamically using my own custom class loaders. When v4 trying to access v3 it uses the classes using the classloader which loaded v3.jar
    v4 contacts v3, v2, v1 through RMI.
    Now the problem is when v4 is calling a remote method of v3 I am getting IncompatibleClassChangeError
    I tried to recompile all the required classes in v3 and created a new v3.jar and I have loaded the same dynamically in v4. I also recompiled all the classes of v4, but still the result is same.
    Both v3 classes and v4 classes are compiled using the same JRE version.
    Can somebody help me to figure out what could be the issue.
    Thanks

    If you know that there is a constructor that takes,
    for example, a single String argument you can use
    something like this:
    Class clazz = ...; // class to instantiate
    String stringArg = ...; // argument to pass to constructor
    Constructor c = clazz.getConstructor( new Class[] { String.class } );
    Object value = c.newInstance( new Object[] { stringArg > } );
    And even better, when JDK 1.5 is released, you'll be able to write:
        Class clazz = ...;
        String stringArg = ...;
        Constructor c = clazz.getConstructor(String.class);
        Object value = c.newInstance(stringArg);Geoff

  • IncompatibleClassChangeError when adding j2ee.jar to existing project

    Hi,
    Sorry if this question is obvious, but I have a hard time grasping how everything works together.
    I have installed the latest version of java SDK and created a project in Eclipse. I've created some jsp's and servlets, and I'm now working with JavaMail. I read that I need j2ee.jar in order to use the JavaMail, so I downloaded it and placed it under WEB-INF/lib. In the build path in Eclipse I added it as exernal jar. Now when I run my index file, I first get:
    HTTP ERROR 500
    Problem accessing /foo/. Reason:
    Implementing class
    Caused by:
    java.lang.IncompatibleClassChangeError: Implementing class
    and then if I refresh the page I get this:
    HTTP ERROR 500
    Problem accessing /foo/. Reason:
    Could not initialize class org.apache.jasper.compiler.JspUtil
    Caused by:
    java.lang.NoClassDefFoundError: Could not initialize class org.apache.jasper.compiler.JspUtil
    I'm wondering if I have my whole project setup wrong. Maybe if I had it right I wouldn't have to manually add the j2ee.jar? In my Java build Path in Eclipse, I have JRE System Library [JavaSE-1.6], and above I have the j2ee.jar that I added. It also appears under Web App Libraries. Please give me some guidance as to how to solve this issue.
    Thanks!

    First thing, take j2ee.jar out of your WEB-INF/lib.
    Yes it would have the java mail classes, but its also got a whole heap of other guff that you are not going to want, and is going to cause you a world of pain.
    A quick google leads to [javamail download|http://www.oracle.com/technetwork/java/index-138643.html]
    The activation framework (activation.jar) formerly also a requirement for javamail is part of Java 6. So if you already have the latest SDK, all you should need is the download from that link.
    cheers,
    evnafets

  • Exception occurred: java.lang.IncompatibleClassChangeError: Uninplemented i

    Hello all,
    I have a problem when I try to access AS400 with CrEme in my PDA.
    I have CrEme Evaluation Version V.4 in my Motorola MC55.
    For developing I have used Netbeans 6.7 with pJSCP V4.12 Emulator
    In addition, jars included are:
    jt400Micro.jar (for accesing AS400)
    symbolclases.jar (Symbol Mobility Developer Kit v1.4 for Java for scanning in the PDA)
    When I launch the application, It works fine, and I can scan with the PDA barcodes.
    But when I try to access to AS400, in the line -> com.ibm.as400.micro.JdbcMeDriver.getConnection(),
    Exception occurred: java.lang.IncompatibleClassChangeError: Uninplemented interface method
    It seems a problem with JDK but, that driver needs JDK 1.2 and CrEme V.4 support until JDK 1.3.
    Do you Know what problem can be?
    I hope your answers. Thanks in advance.

    an IncompatibleClassChangeError usually results when you have versioning problems in a serialized class. Usually the problem goes like this:
    You make a class, and make it serializable,
    You store the class persistently somewhere, or leave a process running with a serialized version of the class available,
    Then, you make a change to the class, and recompile the class.
    You try to de-serialize the first version of the class into the second version of the class.
    There are rules around what constitutes a compatible change to a serializable class, and what will break this. It is quite inflexible, that is why there are many caveats in the swing classes about not using Serializable for persistence (better to use xml in many cases).
    I recommend reading the serialization specification, particularly the part about versioning classes.
    Dave

  • WebLogic 10.3.6 IncompatibleClassChangeError

    Hi,
    Our application is running in WLS10.3.6 and it has a client jar which is used to contact another application running in WLS8.1,which hosts WebServices.
    The client jar used in our application was generated by application which we used to contact for consuming the Webservices.
    Please help us on this. . .
    below is the exception we got in our application.
    java.lang.IncompatibleClassChangeError: class com.qwt.abc.ws.OrderWebService_9jqh74_HomeImpl_816_WLStub has interface we
    blogic.rmi.extensions.server.Stub as super class
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:101)
    at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:86)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)

    In your application client jar ,please remove the stub .
    Thanks,
    Vidya Bhushan.

  • IncompatibleClassChangeError in jvm- DetachCurrentThread

    Hi,
    After recently changing from 1.5.09 to .11 (with the handle leak fixed), I now get reports from users that run my dll on JRE 1.4. about an IncompatibleClassChangeError being printed to std.err.
    I have tracked it down to calls to DetachCurrentThread. The code seems to work, despite that error, so I wonder if this is related to the fixing of the handle leak in attaching / detaching threads and if it is just some forgotten debug printout in a caught exception maybe.
    Has anybody seen this? Any ideas on how to avoid that printing, as I probably can't avoid to detach my thread?
    Thanks
    nils

    So, the problem turned out to be homemade. In a recent rewrite of a callback method I mistakenly replaced callStaticVoidMethod by callVoidMethod. This makes no problems on 1.5 & 6 as it seems, but throws errors on 1.4.2 and freezes the VM on 1.4.1.
    Sorry
    nils

  • IncompatibleClassChangeError  - help pleease

    Hi,
    I'm running a program that uses some libraries. However I recently undated the libraries and now I consistently get the run-time error:
    java.lang.IncompatibleClassChangeError
    at net.jxta.share.client.ListContentRequest.<init>(Unknown Source)
    at net.jxta.share.client.CachedListContentRequest.<init>(Unknown Source)
    at ListRequestor.<init>(ListRequestor.java:49)
    at Search.search(Search.java:103)
    at SearchManager.run(SearchManager.java:295)
    at WorkerThread.run(WorkerThread.java:103)
    The program compiles fine and I checked that no other class exists called ListContentRequest and CachedListContentRequest.
    I deleted the old libraries and still I have been getting this error for the past week.
    Any help would be greatly appreciated,
    Laurence

    Since you say you updated a library and now you have problems, that tells me your class loader is using the older cached version and not the new one your program requires. Control panel->Java Plugin Applet->Cache Tab-->Clear.

  • Getting .IncompatibleClassChangeError??

    Hi,
         This is part of a larger application that I had developed in Eclipse. I tried to get everything into a single Jar � but it would not work. So in one of the smaller packages, I added a few files which would not access the rest of the stuff � and I tried to call the main method from one of the files from the Jar, and it did not work.
         I have this class *�ProcessStaticFiles�* working in Eclipse. (It is in a package called *�temp_multilingual�* ) I located the class files of this package where Eclipse had put them and I did
    java temp_multilingual/ProcessStaticFilesand I get
    Trying to connect to MySQL Server
    class com.mysql.jdbc.JDBC4Connection
    Connection is NOT Null
    Exception in thread "main" java.lang.IncompatibleClassChangeError: Found interface com.mysql.jdbc.Connection, but class was expected
            at temp_multilingual.TransformFileLinks.connectToDB(TransformFileLinks.java:189)
            at temp_multilingual.ProcessStaticFiles.main(ProcessStaticFiles.java:93)In this part of the code (where it is crashing), I am making the connection to the mySQL Server.
    try{
          conn = (Connection) DriverManager.getConnection(JDBC_URL, USER_NAME, PASSWORD);
          System.err.println(conn.getClass());
          if(conn == null)
            System.err.println("Connection is Null");
          else
            System.err.println("Connection is NOT Null");
          if(conn.isClosed())
            System.err.println("Connection seems to be closed??");
           if(!conn.isClosed())
             st = (Statement) conn.createStatement();
        catch (SQLException se) {
          displaySQLErrors(se);
        }Why does it say *�Found interface, � but class with expected�* ?? I would like to emphasize that this works if I run it within Eclipse.
    I�d be grateful if you have any ideas.
    Thanks a lot.
    O.O.

    I really don�t know why I got this error. However this morning I noticed that even in Eclipse I was getting the same error as mentioned above.
    I then cleaned the entire project and re-built everything again. Still it did not work. Finally I shut down Eclipse and restarted it. It works now.
    I don�t know what I was doing wrong.
    I am closing this question � not because I got the answer, but because I solved my problem. I am still curious though.
    Thanks guys.
    O.O.

Maybe you are looking for

  • How do I sync my iPod to a new computer without erasing all of the data and starting my library over?

    I had a PC that crashed and recently bought a MacBook to replace it.  When I tried to import the music from my iPod to my MacBook I got the error message that iPods can only be synced to one computer at a time and I was then given two options: either

  • Field Text is a required field for G/L account 1000 301001

    Dear All, I face this problem when i am trying to post the taxes in to the g/l account. Field Text is a required field for G/L account 1000 301001.Earlier i was able to post the taxes.I checked with my FI consultant and he said that he has made text

  • How can I put non-English characters onto JMS queues?

    Hi I am posting XML documents onto a JMS queue configured in a WLS domain. The XML doc is UTF-8 but WebLogic does not seem able to handle the advanced characters and shows them as 2 chars each (such as umlauts). How can I configure WebLogic to handle

  • How can i take input from user?

    class input{ public static void main(String args[]){ int i,j,result; //i want to take input here from user. result=i+j; System.out.println(result); }

  • Failed To Convert View vemp

    Hi, While migrating MySQL DB to Oracle DB using Oracle SQL Developer, I am getting this error "Failed To Convert View vemp" , where vemp is a MySql view. Tables migrated successfully.