Serialize/deserialize between Class versions

I am new at programming.
I am working on an application that saves serialized classes files. As I make changes to the classes, I can't deserialize old files into the new types. That makes sense to me.
My question is what makes them compatible or incompatible and is there any to anticipate changes so that I can avoid this problem.
If I don't change class variables(or something like that) can I remain compatible?
Thanks,
LNMEgo

If I don't change class variables(or something like
that) can I remain compatible?
If you define the static final long serialVersionUID to be constant and take care of the serialization versioning, then no problems will arise due to class versioning.
In general if you only add fields and don't change the order in which they are written or read, the no problems are to be expected. There is also a tutorial on serial persistent fields, which make the whole thing even more 'clean'
See
http://java.sun.com/j2se/1.4/docs/guide/serialization/examples/altimpl/index3.html

Similar Messages

  • How to improve the performance of serialization/deserialization?

    Hi, Friends,
    I have a question about how to improve the performance of serialization/deserialization.
    When an object is serialized, the entire tree of objects rooted at the object is also serialized. When it is deserialized, the tree is reconstructed. For example, suppose a serializable Father object contains (a serializable field of) an array of Child objects. When a Father object is serialized, so is the array of Child objects.
    For the sake of performance consideration, when I need to deserialize a Father object, I don't want to deserialize any Child object. However, I should be able to know that Father object has children. I should also be able to deserialize any child of that Father object when necessary.
    Could you tell me how to achieve the above idea?
    Thanks.
    Youbin

    You could try something like this...
    import java.io.*;
    import java.util.*;
    class Child implements Serializable {
        int id;
        Child(int _id) { id=_id; }
        public String toString() { return String.valueOf(id); }
    class Father implements Serializable
        Child[] children = new Child[10];
        public Father() {
         Arrays.fill(children, new Child(1001));
        public void readObject(ObjectInputStream stream)
         throws IOException, ClassNotFoundException
         int numchildren = stream.readInt();
         for(int i=0; i<numchildren; i++)
             children[i] = (Child)stream.readObject();
         stream.close();
        public void writeObject(ObjectOutputStream stream) throws IOException
         stream.writeInt(children.length);
         for(int i=0; i<children.length; i++)
             stream.writeObject(children);
         stream.close();
    Child[] getChildren() { return children; }
    class FatherProxy
    int numchildren;
    String filename;
    public FatherProxy(String _filename) throws IOException
         filename = _filename;
         ObjectInputStream ois =
         new ObjectInputStream(new FileInputStream(filename));
         numchildren = ois.readInt();
         ois.close();
    int getNumChildren() { return numchildren; }
    Child[] getChildren() throws IOException, ClassNotFoundException
         ObjectInputStream ois =
         new ObjectInputStream(new FileInputStream(filename));
         Father f = (Father)ois.readObject();
         ois.close();     
         return f.getChildren();
    public class fatherref
    public static void main(String[] args) throws Exception
         // create the serialized file
         Father f = new Father();
         ObjectOutputStream oos =
         new ObjectOutputStream(new FileOutputStream("father.ser"));
         oos.writeObject(f);
         oos.close();
         // read in just what is needed -- numchildren
         FatherProxy fp = new FatherProxy("father.ser");
         System.out.println("numchildren: " + fp.getNumChildren());
         // do some processing
         // you need the rest -- children
         Child[] c = fp.getChildren();
         System.out.println("children:");
         for(int i=0; i<c.length; i++)
         System.out.println("i " + i + ": " + c[i]);

  • Custom serializer/deserializer in Weblogic 9 web service

    We are able to select XML from the database which is properly formatted to the schema definition of the method return type. Therefore, the serialization/deserialization of XML to JAVA and then back to XML does not make sense.
    Is there a way to use a custom serializer/deserializer in a Weblogic 9.1 web service like we could do in Weblogic 8.1? I have read where the 8.1 web services are still supported but we would like to migrate everything over now. In 8.1 the serializer/deserializer was defined in the deployment descriptor. However, I have seen nothing of this kind in Weblogic 9 documentation and all of those classes are now marked Deprecated.
    Any help is greatly appreciated. Thanks!

    Why dont you try removing the ejb-jar.xml and using annotations. You can use @JndiName and @FileGeneration annotations, this should work ...
    -Jesus

  • No serializer found for class com.sun.xml.messaging.saaj.soap.ver1_1.Messag

    Hi,
    I am developing a soap web service using apache axis tool. I am using tomcat6 and jdk6. I need to return SOAPMessage as return object from remote interface methods. Now I have success fully deploy web service in tomcat. Also I have create client too, but when I am trying to call web service throw client then it show me a exception on client is
    org.xml.sax.SAXParseException: Premature end of file.
    and on server log, it show me this exception
    java.io.IOException:
    xisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.io.IOException: No serializer found for class com.sun.xml.messaging.saaj.soap.ver1_1.M
    ssage1_1Impl in registry org.apache.axis.encoding.TypeMappingDelegate@98062f
    faultActor:
    faultNode:
    faultDetail:
           {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class com.su
    .xml.messaging.saaj.soap.ver1_1.Message1_1Impl in registry org.apache.axis.encoding.TypeMappingDelegate@
    8062f
           at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507)
           at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
           at org.apache.axis.encoding.SerializationContext.outputMultiRefs(SerializationContext.java:1055)
           at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145)
           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.Message.writeTo(Message.java:539)
           at org.apache.axis.transport.http.AxisServlet.sendResponse(AxisServlet.java:902)
           at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:777)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
           at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:2
    0)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:58
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:619)
           {http://xml.apache.org/axis/}hostname:EMRG-409964-L19
    ava.io.IOException: No serializer found for class com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl
    n registry org.apache.axis.encoding.TypeMappingDelegate@98062f
           at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
           at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:317)
           at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
           at org.apache.axis.Message.writeTo(Message.java:539)
           at org.apache.axis.transport.http.AxisServlet.sendResponse(AxisServlet.java:902)
           at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:777)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
           at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:2
    0)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:58
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:619)
    aused by: java.io.IOException: No serializer found for class com.sun.xml.messaging.saaj.soap.ver1_1.Mess
    ge1_1Impl in registry org.apache.axis.encoding.TypeMappingDelegate@98062f
           at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507)
           at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
           at org.apache.axis.encoding.SerializationContext.outputMultiRefs(SerializationContext.java:1055)
           at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145)
           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)
           ... 19 moreI have deploy new version of saa-impl.jar and saaj-api.jar too. And I also have deploy webservice-rt.jar too in server lib and application lib folder. but still this exception is there. I dont understand, how can I over come from this error. If some one have resolved this type of exception then please reply. Please reply me on [email protected]
    --Thanks in Advance
    Umashankar Adha
    Sr. Soft. Eng.
    United States

    FYI, now I'm in work:
    import javax.xml.namespace.*;
    import javax.xml.rpc.*;
    import javax.activation.*;
    import javax.mail.*;
    import com.sun.xml.messaging.saaj.*;
    -classpath D:\jwsdp-1.3\jaxp\lib\endorsed\dom.jar;D:\jwsdp-1.3\jaxp\lib\endorsed\xercesImpl.jar;D:\jwsdp-1.3\saaj\lib\saaj-impl.jar;D:\jwsdp-1.3\saaj\lib\saaj-api.jar;D:\jwsdp-1.3\jwsdp-shared\lib\activation.jar;D:\jwsdp-1.3\jwsdp-shared\lib\mail.jar;D:\jwsdp-1.3\jaxrpc\lib\jaxrpc-api.jar;D:\jwsdp-1.3\jaxrpc\lib\jaxrpc-impl.jar;D:\jwsdp-1.3\jaxrpc\lib\jaxrpc-spi.jar;D:\jwsdp-1.3\jwsdp-shared\lib\jax-qname.jar
    Those are what I had to use to get it working.
    Chris

  • SOS!Serialization/Deserialization in Web Services!!!!!

    Hello, I have done some serialization/deserialization jobs before which is just about JavaBeans, but when it comes to Object Arrays, errors occured when the problem become more complex.Suppose I have an Object Array called params, nd params[0] is a JavaBean instance,params[1] is a String, while params[2] is a Float. I have tried many times, but the serialization works still failed.So anyone having met and solved such problem please share your code with me(my email is [email protected]), thanks very very much!

    Hi
    Elvez,
        Thanks for answering.I have created the web service client jar file through the NW studio standalone proxy wizrd which creates a jar file so that external java application can invoke the web service outside of the portal. The web service is called dynamically by the following code ...
    TestService service = new TestServiceImpl();
    TestBindingStub port = (TestBindingStub)service.getTestService();
    Pip3A2PriceAndAvailabilityRequest   request  = new Pip3A2PriceAndAvailabilityRequest();
    populateRequest( request );
    Pip3A2PriceAndAvailabilityResponse  response = port.getInventory( request );
    If I have issued Netweaver Studio to both publish the service as well as to consume the web service, I think then the issue is on the client side wizard which creates the proxy classes for the web service client in the jar file. The wsdl specifies the xml namespace for the Arrays but the generated client code probably is not setting the name space correctly.
    Thanks
    Bhabesh Patel

  • Can anyone tell me the major differences between the versions

    hi all,
    what is the difference between the versions 4.6c 4.7EE and 5.0.
    Atleast anyone suggest where i can get the difference exactly.
    Thanks,
    Saroja.

    <b>Difference between SAP 4.6b, 4.6c, 4.7e and ECC 5.0 Versions</b>
    If you are an existing user of SAP, you will probably be aware that as from January 2007 all releases below 4.6c will no longer officially be supported by SAP. Maintenance costs for releases 3.1 - 4.6b inclusive will also attract a total charge of 21% during 2005/6.
    So what are your upgrade options?
    You could upgrade to release 4.6c - or the more comprehensive mySAP.com - which are both currently scheduled to be supported by SAP until December 2009. These products have been available since 1999 and already have a broad user base. Bear in mind however that maintenance costs for this release will be 19% during 2007 and 21% during 2008/9.
    If you wish to avoid the expense and disruption of a potential further upgrade in 2006/7, you may want to consider upgrading to release 4.7 (SAP R/3 Enterprise). Whilst this product incorporates relatively new technology, it has the advantage of being supported by SAP until March 2012 and provides new functionality in many areas.
    SAP is encouraging existing users to go beyond the 4.7 (SAP R/3 Enterprise) environment and upgrade to mySAP ERP as a stepping stone to mySAP Business Suite. However, you should note that an upgrade to mySAP ERP requires a change in licensing plan. mySAP ERP licences are role-based, so you need to assess the number of finance, logistics, HR users etc. and pay accordingly. This is a radical change from previous licensing schemes operated by SAP, whereby each seat purchased was accorded full usage of the entire SAP environment (in line with user authorisations).
    No technology upgrade is necessary to move from 4.7 (SAP R/3 Enterprise) to mySAP ERP. You simply add the benefits of mySAP ERP to your installation as you go along. The upgrade from mySAP ERP to mySAP Business Suite is equally straightforward – you just add those mySAP products available in the latter that you require. The alternative strategy would be to remain on 4.7 (SAP R/3 Enterprise) or mySAP ERP and purchase mySAP products available with mySAP Business Suite as add-ons.
    Please see below the current maintenance schedule for SAP products:
    SAP R/3 3.1 - 4.6b
    Maintenance extension until December 2006
    2005/2006: additional fee of 4% (17% plus 4%)
    SAP R/3 4.6c
    Maintenance extension until December 2009
    2007: additional fee of 2% (17% plus 2%)
    2008/2009: additional fee of 4% (17% plus 4%)
    SAP R/3 Enterprise:
    Maintenance extension possible until March 2012, available to all customers
    April 1, 2009 - March 31,2010: additional fee of 2% (17% plus 2%)
    April 1, 2010 - March 31, 2012: additional fee of 4% (17% plus 4%)
    MySAP ERP 2003
    Mainstream maintenance until end of March 2009
    April 1, 2009 - March 31,2010: additional fee of 2% (17% plus 2%)
    April 1, 2010 - March 31, 2012: additional fee of 4% (17% plus 4%)
    MySAP ERP 2004
    Mainstream maintenance until end of March 2010
    April 1, 2010 - March 31, 2011: additional fee of 2% (17 plus 2%)
    April 1, 2012 - March 31, 2014: additional fee of 4% (17 plus 4%)
    All of the above maintenance durations and extensions include all industry add-ons and all legal charges for HR and FI/LO.
    If you are contained in say Financials and HR - then your burden to go to mySAP ERP is smaller - as you go from one system to another system.... on the opposite - if you use R/3 and use customer processes, manufacturing and purchasing processes - and you do not use yet mySAP CRM, mySAP SCM, mySAP SRM... then you not only have to pay more for the license - not only for mySAP ERP - but also for mySAP CRM, mySAP SRM, mySAP SCM... - the mySAP Business Suite may be interesting pricing option then...
    But then to pricing - SAP says they will reduce the credit on your R/3 payments with the change of the calendar year... for some a big motivation to move to mySAP ERP license... but as a Gartner report from today pointed out - not many of these customers really upgrade to mySAP ERP in terms of functionality - but use it more as a license centralization for some instance consolidation - as well as only a technical upgrade. And then there are the many SAP customers who buy mySAP ERP - but stay on R/3 - but get this as they buy the mySAP BW license for all their users with it... and it's cheaper to buy mySAP ERP (as you need it sooner or later anyway) - than buying mySAP BW standalone now - and mySAP ERP in a few years...
    One final argument... remember when mySAP ERP shipped first - March 2003. SAP said they would have the vertical code of R/3 by end of 2003... well they had not - all of it will be out only now in Q2 2006 with mySAP ERP 2005 --- three years later! How did SAP's world class engineering team miss dates so badly? It's tough to move working R/3 code over to the mySAP xxx world with NetWeaver! And no the secret: Is there a difference between you modifying a R/3 system -- and SAP development creating a vertical piece of code? Not really - or better - not at all... so have a very good luck at your modification...
    Finally - there are some tools in the market which have a very good handle on estimating the implementation cost... take a look at them.
    Bottom line: If you are using a lot of R/3 - you have major license cost and a major risk to upgrade... you should even look at alternatives to SAP then - as you spend as much in upgrading than switching... take advantage of some of the attractive commercial offerings from SAP competitors - even if you do this only to negotiate a better price from SAP.
    If you are using a little R/3 only - and that is contained in mySAP ERP... then it comes back to how much license you want to pay now (or later - so it's really a financial consideration) - and your overall risk readiness. If you are happy to pay now and risk averse - you go for mySAP ERP 2004 or 2005... if you are risk sensitive and don't want to pay now and wait for others to be the "guinea pigs" for mySAP ERP 2007 / 2005 etc - then you go to R/3 Enterprise. Easier upgrade, no license cost. Sit on the fence and see what SAP and competitors do to service enable their apps.
    Hope this helps a bit...

  • GET WRONG with ICON serialization/deserialization!!!

    GET WRONG with ICON serialization/deserialization!!!
    I have my own class X, which implements Serializable.
    My own class X contains an Icon and a String!
    I've created an obj (type X) !
    set its Icon = UIManager.getIcon("Tree.closedIcon);
    set its String = "yyyy";
    i 've serialized it , and then deserialized , read it into my new var !
    (my new var is also X obj!)
    i've debugged my code : the Icon field and the String in my new var had
    new values !
    ( the new values are not null ,and seem to be the original values)!
    But when i put those values into a jLabel ,
    the label show just the String !
    i dont know how to over come it !
    plz help ...

    it's me urgent !
    plz help !

  • How to switch between JRE version dynamically

    hi,
    I have got both jre1.4.1 and jre1.5.0_07 installed on y machine. But i need different version of jre to access two different applications.
    How can i switch between jdk versions.

    Are the JREs being invoked by a browser, if so you can define the preferred version.
    In IE
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
        width="100" height="100" name="anApplet">
        <PARAM NAME="code" VALUE="yourClass.class">
        <PARAM NAME="type" VALUE="application/x-java-applet;version=1.4.1">
        <PARAM NAME="scriptable" VALUE="true">
            No JDK 1.2 support for APPLET!!
    </OBJECT>Substitute type paramter for
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.5.0">When running a Java 5 applet
    In Firefox
    <object classid="java:yourClass.class"
                  type="application/x-java-applet;version=1.5.0"
                  height="100" width="100" >
    </object>Bamkin

  • Serialization/Deserialization Error

    Hi..my aim is to serialize/deserialize my "SoapPair" class , that contains Axis MessageContext obj (SoapPair receives this from its constructor), not serializable object(when trying to normally serialize , it returns "axis MessageContext not serializable")..
    How do I serialize/deser the SoapPair class?
    Do I have to use SerializationContext/Deser context? How?
    Thanks in Advance.

    This forum for Networking and has nothing to do with axis Serialization.
    I am not sure if I remember axis has a deployment descriptor for the web service and there you can define you Serialize/Dez your bean if you do not want to use the default one or you can specify for certain class a serialize/Dez factory serializer.
    Regards,
    Alan Mehio
    London,UK

  • Serialization/Deserialization Error - Axis

    Hi..my aim is to serialize/deserialize my "SoapPair" class , that contains Axis MessageContext obj (SoapPair receives this from its constructor), not serializable object(when trying to normally serialize , it returns "axis MessageContext not serializable")..
    How do I serialize/deser the SoapPair class?
    Do I have to use SerializationContext/Deser context? How?
    Thanks in Advance.

    This forum for Networking and has nothing to do with axis Serialization.
    I am not sure if I remember axis has a deployment descriptor for the web service and there you can define you Serialize/Dez your bean if you do not want to use the default one or you can specify for certain class a serialize/Dez factory serializer.
    Regards,
    Alan Mehio
    London,UK

  • Custom Events and Listeners between classes

    I've got a project I've been working on for weeks that I'm
    having yet another problem with. I'm trying to learn AS3 which is
    why it's taking so long but that's not important for this post.
    I wanted to create a custom event class so that I could make
    sure the event does not interfere with other "COMPLETE" events that
    are being passed between classes. In other words, I have a few
    things that need to complete prior to a function being called...
    one is some XML being loaded and another is a font loaded. So, I
    thought I would create a custom FontLoaded class that extends Event
    and make the type something like "FontLoadedEvent.LOADED". That way
    I could listen for the XML "Event.COMPLETE" and this font event
    also.
    Please tell me if I'm going down the wrong path here but I
    don't seem to be getting the dispatched event for my new custom
    event. Also, how does one detect if it's being dispatched other
    than if the eventListener is fired? Any other ways to test
    this?

    You can trace the event to see if it dispatched.
    Also, this is not a good case to create a new event. Custom
    events are used to store additional information. MouseEvent exists
    because Event doesn't have localX, localY, etc. properties. Since
    you don't seem to be throwing additional properties, you can use a
    regular event.
    trace(dispatchEvent(new Event("panelFontsLoaded"));
    addEventListener("panelFontsLoaded", onFontsLoaded);
    Static consts are used to help debug typos. The event type is
    just a string, often stored in a const.

  • Fatal error C1900: Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'

    Hi all,
    I have a Team Foundation Build Agent that has Visual Studio Team System 2008 Test Edition installed. One of the solutions that I compile with that Build Agent gives me the following errors:
      VCBUILD : fatal error C1047: The object or library file '.\bin\Release\main.obj' was created with an older compiler than other objects; rebuild old objects and libraries
      LINK : fatal error LNK1257: code generation failed
      VCBUILD : fatal error C1900: Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'
      LINK : fatal error LNK1257: code generation failed
    I've searched online and found that other people have experienced the same problem:
    http://software.intel.com/en-us/forums/intel-c-compiler/topic/62516/
    http://nuicode.com/issues/266
    In the second posting one states "I had the same Error! After installing Service Pack1 for VS2008 it worked!". Thats great for him but I don't see any such update for the Test Edition of Visual Studio Team System 2008 - Test Edition.
    What can I do to get rid of that problem?
    Thanks!

    Hello ACKH
    I once handled a similar case in newsgroups. That case exhibit a almost same symptom. Please check out my summary below:
    Problem
    In that case, the customer has a DLL project that you had built on a machine where VS 2008 SP1 was installed. You then attempted to rebuild that project on a machine without SP1, and got a fatal compiler error C1900 “IL mismatch between ‘P1’ version ‘20080116’ and ‘P2’ version ‘20070207’”, and then LNK1257 “Code generation failed”. He found that rebuilding your static library alleviated the errors, but cannot accept this as a workaround because your clients will not have the ability to rebuild the libraries you distribute before they use them.
    Cause
    You had built the static library with the /GL (Whole Program Optimization) compiler switch, which requires Link Time Code Generation (/LTCG) when the static library is subsequently linked. These features require that all linked modules be built by the same version of the compiler. In fact, if precompiled headers are used, the same machine must build and link all the involved object code. Therefore, it is highly recommended that static libraries not be built with the /GL switch, since their intended use is quite frequently to support reuse by others.
    Solution
    You rebuilt the static library on your VS2008 SP1 machine without the /GL switch, and you no longer encounter this problem.
    Please let me know if this info is helpful to you or not.
    Regards,
    Jialiang Ge
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact [email protected]
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

  • Java Mapping - Class versions are incompatible (linkage error)

    Hi Friends,
        While testing java mapping in Integration Repository i am getting an error - "Class versions are incompatible (linkage error)". Can anyone plz tell what might be the reason.
    Regards,
    Gowtham Kuchipudi.

    hello
    I have this message but my trace look like this:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Trace xmlns:SAP="http://sap.com/xi/XI/Message/30">
    - <Trace level="1" type="B" name="interface activity determination">
      <Trace level="1" type="T">Version 000</Trace>
      <Trace level="1" type="T">Message status 000</Trace>
      <Trace level="1" type="T">Interface action INIT</Trace>
      <Trace level="1" type="T">(must be INIT for a new determination)</Trace>
      <Trace level="1" type="T">Message type BEST EFFORT. -> No determination</Trace>
      <Trace level="1" type="T">Set interface action INIT into *MAST*</Trace>
      </Trace>
      <Trace level="1" type="E">CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST</Trace>
    - <Trace level="1" type="B" name="PLSRV_RECEIVER_DETERMINATION">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_RD_PLSRV-ENTER_PLSRV">
      <Trace level="1" type="T">R E C E I V E R - D E T E R M I N A T I O N</Trace>
      <Trace level="1" type="T">Cache Content is up to date</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
    - <Trace level="1" type="B" name="PLSRV_INTERFACE_DETERMINATION">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_ID_PLSRV-ENTER_PLSRV">
      <Trace level="1" type="T">I N T E R F A C E - D E T E R M I N A T I O N</Trace>
      <Trace level="1" type="T">Cache Content is up to date</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
    - <Trace level="1" type="B" name="PLSRV_RECEIVER_MESSAGE_SPLIT">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_XMS_PLSRV_RECEIVER_SPLIT-ENTER_PLSRV">
      <Trace level="1" type="T">number of receivers: 1</Trace>
      <Trace level="1" type="T">Single-receiver split case</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
      <Trace level="1" type="B" name="PLSRV_MAPPING_REQUEST" />
    - <!--  ************************************
      -->
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">Interface Mapping http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService ProposalDeatailsService_WS2RFC_IM</Trace>
      <Trace level="1" type="T">LinkageError at JavaMapping.load(): Could not load class: xmlpayload</Trace>
      <Trace level="1" type="T">java.lang.UnsupportedClassVersionError: xmlpayload (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at com.sap.aii.ibrun.server.mapping.MappingLoader.findClass(MappingLoader.java:158) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:95) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy158.processFunction(Unknown Source) at sun.reflect.GeneratedMethodAccessor428.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:107) at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequestInternal(RFCJCOServer.java:113) at com.sap.engine.services.rfcengine.RFCJCOServer$ApplicationRunnable.run(RFCJCOServer.java:157) 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:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)</Trace>
      <Trace level="1" type="T">Linkage error occurred when loading class xmlpayload (http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService, d7e31f30-53be-11dc-8fbd-ee09c0a8664d, -1)</Trace>
      <Trace level="1" type="T">com.sap.aii.ibrun.server.mapping.MappingRuntimeException: Linkage error occurred when loading class xmlpayload (http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService, d7e31f30-53be-11dc-8fbd-ee09c0a8664d, -1) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:115) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy158.processFunction(Unknown Source) at sun.reflect.GeneratedMethodAccessor428.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:107) at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequestInternal(RFCJCOServer.java:113) at com.sap.engine.services.rfcengine.RFCJCOServer$ApplicationRunnable.run(RFCJCOServer.java:157) 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:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172) Root Cause: java.lang.UnsupportedClassVersionError: xmlpayload (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at com.sap.aii.ibrun.server.mapping.MappingLoader.findClass(MappingLoader.java:158) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:95) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy158.processFunction(Unknown Source) at sun.reflect.GeneratedMethodAccessor428.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:107) at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequestInternal(RFCJCOServer.java:113) at com.sap.engine.services.rfcengine.RFCJCOServer$ApplicationRunnable.run(RFCJCOServer.java:157) 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:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)</Trace>
      <Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    - <!--  ************************************
      -->
      </SAP:Trace>
    the error that I recieve in the SXMB is:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">LINKAGE_ERROR</SAP:Code>
      <SAP:P1>xmlpayload</SAP:P1>
      <SAP:P2>http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsS~</SAP:P2>
      <SAP:P3>d7e31f30-53be-11dc-8fbd-ee09c0a8664d</SAP:P3>
      <SAP:P4>-1</SAP:P4>
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Class versions are incompatible (linkage error)</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    this is my XI information
    Runtime Environment
    Java version:1.4.2_12
    Java vendor:Sun Microsystems Inc.
    Version
    Service pack:21
    Release:30_VAL_REL
    Latest change:409678
    Sync time:200709211024
    since I already have the SP required by the note, any other suggestions?
    Thanks
    Kfir

  • Differences between Automator versions

    Hello All,
    It looks like they made some changes between Automator version 2.1.1 (os x 10.6.8) and version 2.2 (OS X 10.7).
    I'm trying to do a simple SMB mount of some network drive shares.
    Steps followed are the same with both versions.
    On the 10.7 computer when I reopen the workflow it is blank, none of the steps I've added showup.  If I close Automator down and right click on the workflow file and use the Automator Runner application it follows all the steps that I layed out (drive shares map correctly).
    In 10.6.8, if I create the same exact workflow, save it, close down, reopen the workflow all the step show up correctly and again map correctly when run.
    How in 10.7 Automator do I view the steps that I've entered?
    Mark

    THanks so much for your help.
    My automater workflow consists of "get specified Finder items" where I have to open the time capsule, then open the external drive to finally see the sparse image which I can then add and place in the item list. THen I add "open finder items"  to open the sparse image. I have tried "reveal finder items"  but that makes no difference.  
    I'm not sure how to mount the time capsule on the desktop. Do I just drag it there?  It is listed on the left side of the Finder window under SHARED.
    Here is a screen shot of what it looks like when I double click it. There you can see my time capsule (data)  and the 3 external usb drives attached to my time capsule. By the way, I have the same problem if I attach just the mbp superduper backup to the TC directly.
    In Automator I have to open the  mbp superduper backup to get the ADD button functioning where I can select the actual sparse image file.
    Even though I didn't copy the TC to the desktop,when  I added the Connect to Server step I got an error message: 
    "there was a problem connecting to the server.
    URLs with the type "file" are not supported"
    Cindy

  • Differences between different  versions of BW 2.1C,3.0A and 3.5

    Can anybody tell me the differences between different versions of BW.
    I m new to SAP BW,i directly learned in BI7.0.So please anybody let me know the difference in implementation of features in 2.1C, 3.0A ,3.5 ,if possible BI7.0 also

    please read this:
    http://help.sap.com/saphelp_nw70/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm

Maybe you are looking for

  • HT1926 itunes store

    why can't I access my itunes store through my account

  • SPA112 not picking up firmware

    Hi, about 60-70% of the SPA112s that I have deployed are not requesting firmware even after it picks up a new upgrade rule. The current firmware they are running is 1.2.0 (028). The firmware we are trying to upgrade to is 1.2.1 (004). I have checked

  • Re-imported Library

    I had to re-import my iTunes library as yesterday it was suddenly empty... but now all my mobile apps do not appear. As with my entire library yesterday, all the music, apps, videos appear in the itunes music folder... but despite copying the library

  • Switch from one application  to another without entered a login detail

    Hi, I have two application in same workspace and they have same authentication or login detail. if i switch from one application to another then it do not ask for login . for examle if i switch to sample application there login detail is diffrent it

  • Yahoo mail and MACmail

    Hopefully I will get an answer to this. I just bought an iMAC, so I am still a newbie. I have had a Yahoo Plus account for over 3 years and have a lot of information and folders to seperate old emails and the sort. I also have had an Iphone for 3 yea