Help reg. serialization compatibility

Hi,
We developed a web-application using J2SE 5.0. It runs in IBM Websphere 6.1(with IBM JRE 5.0). We have an applet for rendering our reports. The applet communicates with the web-application to obtain serialized form of the data that needs to be rendered in the applet. The browser in the customers' site runs jre 1.3.0 as they use other applications that depend upon it. Hence, we migrated the applet to run with jre1.3. This seems to work fine.
My question is how does jre1.3 able to deserialize the data generated by IBM jre 1.5? Is this a mere coincidence? Are there any issues to be noted while deserializing the data generated by a newer version of jre, using an older version?
The serialized data that I had mentioned is generated by a third-party library. Also, our applet is a wrapper around the third-party applet. So, I have no idea as to what kind of data is being exchanged between the servlet and the applet.
Thanks in advance..

The wire protocol for Serialization has not changed since Java 1.1 and the most of the base class library code that is serialization has serialversionUID set and is backward compatible. Therefore older version of JDK can communicate with newer version of the JDK. The only exception to this is Swing components - in the JavaDoc it has been documented that serialised Swing data is only suitable for short term storage or RMI between application.
Most of the problem you would encounter with serialization between JDK release is actually in the application code. If you have forgot to set serialVersionUID then the JDK will generate one for you using the default field hashing algorithm in serialization library at runtime. This changes from release to release and therefore would break between the release. Therefore, always remember to put serialVersionUID in any classes that can be serialised in your application.

Similar Messages

  • Help reg Product Compatibility

    HI All,
    I need a small help regarding the compatibility of the follwing components on AIX 5.2 Operating System.
    1)Oracle 9.2.0.4
    2)SAP WAS 6.40 SP13
    3)SAP Enterprise Portal software 6.0  SP 13
    4)KM & Collaboration SP 13
    5)TREX 6.1 SP13
    Does the above product compostion represent a stable environment ??
    Is SP 13 is a stable version ? Has it been released for customers??
    or Its better to go for <b>SP12</b> only !!
    Waiting for your replies!!!
    Best Regards,sandip

    Hi Jochen ,
    Thanks for your reply.
    For the TREX, we wil be installing it on a separate box.
    so, shall i go ahead with this configuration ??
    Regards,sandip
    Which version of NDS i need to go for ,12 or 13 ??
    Regards,sandip
    Message was edited by: Sandip Agarwal

  • JDK 1.5 Serialization Compatibility with assert()

    I have the following class:
    class xyz implements java.io.Serializable {
       void doNothing() {
          int x = 0;
          assert x < 5;
    }If I compile it on both JDK 1.4 (with -source=1.4) and 1.5 (with -source=1.5) platforms, the serialVersion IDs are different. If I comment out the assert statement, the serialVersion on 1.5 platform changes to be the same as the 1.4. If I rebuild the 1.4 with the assert commented out, the serialVersionID does not change.
    Am I missing something here? I have code that needs to be compatible between these versions, but it now seems that the use of assert (other than the statment "assert true") built with 1.5 effects the serialization ID.

    Sure, I can define my own version, but the point is that I've got many fielded classes that have not changed, but now will fail serialization when comunicating with the new system simply because of the use of assertions with 1.5.
    It looks like I will be forced to either go back to 1.4, test all classes for serialization compatibility with 1.4, or remove the asserts from the code.
    In any case, it does not make sence to me why adding an assertion should change the serialVersionUID of a class in the first place when compiling under 1.5 and not under 1.4.

  • Help Needed: Serialization Problem

    I've got a problem with serialization, which is better illustrated with an example (slightly modified version of example in Tech Tips, February 29, 2000, Serialization in the Real World. The problem is that comparing serialized static final fields doesn't return correct result. Any help on how to fix this problem would be greatly appreciated. Thanks in advance. Here is the code:
    ====================
    import java.io.*;
    class Gender implements Serializable {
    String val;
    private Gender(String v) {
    val = v;
    public static final Gender male = new Gender("male");
    public static final Gender female = new Gender("female");
    public String toString() {
    return val;
    public class Person implements Serializable {
    public String firstName;
    public String lastName;
    private String password;
    transient Thread worker;
    public Gender gender;
    public Person(String firstName,
    String lastName,
    String password,
    Gender gender) {
    this.firstName = firstName;
    this.lastName = lastName;
    this.password = password;
    this.gender = gender;
    public boolean isMale() {
    return gender == Gender.male;
    public boolean isFemale() {
    return gender == Gender.female;
    public String toString() {
    return new String(firstName + " " + lastName);
    public static void main(String [] args) {
    Person p = new Person("Fred", "Wesley", "cantguessthis", Gender.male);
    //-NOTE: there ia no problem with this check
    if (p.isMale()) {
    System.out.println("a male: " + p);
    } else if (p.isFemale()) {
    System.out.println("a female: " + p);
    } else System.out.println("strange");
    class WritePerson {
    public static void main(String [] args) {
    Person p = new Person("Fred", "Wesley", "cantguessthis", Gender.male);
    ObjectOutputStream oos = null;
    try {
    oos = new ObjectOutputStream(
    new FileOutputStream(
    "Person.ser"));
    oos.writeObject(p);
    catch (Exception e) {
    e.printStackTrace();
    finally {
    if (oos != null) {
    try {oos.flush();}
    catch (IOException ioe) {}
    try {oos.close();}
    catch (IOException ioe) {}
    class ReadPerson {
    public static void main(String [] args) {
    ObjectInputStream ois = null;
    try {
    ois = new ObjectInputStream(
    new FileInputStream(
    "Person.ser"));
    Person p = (Person)ois.readObject();
    //-NOTE: this is the problem: the check returns false
    if (p.isMale()) {
    System.out.println("a male: " + p);
    } else if (p.isFemale()) {
    System.out.println("a female " + p);
    } else System.out.println("strange");
    catch (Exception e) {
    e.printStackTrace();
    finally {
    if (ois != null) {
    try {ois.close();}
    catch (IOException ioe) {}
    }

    The Gender class implements a type-safe enumeration, but its implementation needs to be improved to ensure that re-creating a Gender object via deserialization doesn't create new objects but uses the existing objects. See this article for details on how that's done:
    http://developer.java.sun.com/developer/Books/shiftintojava/page1.html

  • Newbie needs help with browser compatibility

    Ok, so I'm new at this, so this may be something really
    simple, but browser compatibility? I made a site in DW;html and it
    shows up perfect in safari but internet explorer and firefox not so
    much. I did a browser compatibility test in DW and it says nothing
    is wrong with my pages, but obviously something must be!!
    On my home page, the image of a house that I have next to the
    company name shows up fine in safari but not any other browsers.
    And my page layout, everything is moved over funny in other
    browsers. Also there are link boxes around the table I created with
    different brands of products. On safari the boxes do not show, but
    all the other browsers it does!! I'm new at this and frustrated!!!
    Need help!!
    The link is holmeshifi.com and I posted code from the home
    page!

    OK thanks Ned sorry to soo dumb I'm on a learning curve here!  what 
    I'm trying to do is go to the URLs of web galleries of images from my 
    main site
    so I would presumably have to rename them on my server? i.e. does that 
    mean adding the code ", "_blank");
    to the files on the server?
    At the moment I have to use the back button on my browser window which
    takes me back to the main site which then has to reload (tediously!)

  • Help reg what formats to be used for my new 4tb mini stack to back up my macbook and 2 external hard disks

    Hey Guys,
    I need an advice from you experts regarding the different formats to be used to format my New 4 Tb ministack from OWC. I  have a  Mid 2010 Intel macbook pro with 500gb hard disk using Mountain lion and two external hard disk from Samsung and Iomega 1Tb each. I want to format this ministack into 4 partitions each of 1Tb each.
    1) 1 Tb for time machine to back up my macbook pro.
    2) 1 Tb of  Free space to be used to store extra data using both windows and mac os.
    3) 1 Tb for Samsung back up
    4) 1 Tb for my Iomega back up
    I know that for 1st option i need to format the partition (volume) to Mac os extended (journalled). I need help for  others.For  the 1 Tb free space, can i use NTFS so that i can use it on my wifes windows laptop and use a third a party application like tuxera NTFS for use on my macbook which i am already using to use my samsung and Iomega Ext HDD.
    Also  What format is required for these  two 1 Tb volumes dedicated for external hard disk backups and  how can i back up my external hard disks to these formatted volumes. Do i need to  format them to Mac os extended (journalled) as well as i shall be using macbook pro to back up these hard disks.
    Which would be the best software to back up these Ext hdd,can i use time machine? or CCC ?
    Your help help shall be gretaly appreciated.
    Thanks in advance.

    Get Disk Warrior that will repair the problems without requiring that you reformat the drive - $99.00 on a bootable CD. Will not work on a FAT formatted drive.
    You will need to use Drag and Drop to save your files by copying them from the bad drive to a good one.
    To reprep the drive:
    Drive Preparation
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.

  • Need help with XML Compatibility between CS3 and CS4

    I'm not a Dreamweaver guru but I am hoping someone will recognize my issue and be able to provide meaningful feedback.
    Background:
    A developer buddy and I are working together to create a new home page for an online retailer that utilizes flash banners.  We're using XML to update the content of the banners.  My buddy is creating the XML file and sending it to me to populate with content (i.e. descriptions, images, image paths, etc.).  He is creating the XML file in CS3 and I am editing in CS4.  Here's the issue:  Whenever he uploads the populated XML file to the server the banners are displayed correctly.  If I take the same file and upload it without editing, it works great.  However, if I open the file, edit and resave before uploading to the web server, the the banners all have extra spaces between each line of content - almost as if it were double spaced.  If you look at the code, the code looks fine.  In fact, the code looks exactly like it did when my buddy sent the file to me.  I believe we have isolated the problem to something weird with my installation of DW.  I have downloaded and installed any and all updates.  Oh yeah he's using a MAC version and I am using the PC version of DW.
    Has anyone seen anything like this before???
    Help...

    Thank you for your response.
    The code is listed below and to tell you the truth the following code is both good and bad.  As I mentioned before, if my buddy sends me this xml file and I upload it to the server, it works fine.  If I open the file and immediately save it without making any changes then upload it, I experience the previously described promblem.  It's very strange.  The code in both files is identical.
    To get a clearer picture of what I am describing, go to http://www.everythingministry.com/beta3.htm.  The book descriptions appear correctly under the "New and Recommended" tab.  However, whenever I edit any one of the six xml files that control the content for each of these tabs it ends up looking like what you currently see under the "New Music" tab.  I have actually tried to update from 2 different machines running DW CS4.
    Below are the xml files for the two tabs I referenced in the paragraph above:
    ts_new.xml
    <items>
      <config
      Milliseconds="5000"
      Distance="3"
      BorderColor="0xffffff"
      TargetLink="_top"
      TextYPosition="200"
      MaxDisplayContent="6"
      ContentWidth="148"
      ContentHeight="300"
      TransitionSpeed="0.8"
      TransitionType="0"
      ShowMouseOver="0"
      ShowBorder="1"
      ShowGlass="1"
      />
       <content>
        <image>images/crazylove.jpg</image>
        <description><![CDATA[Crazy Love
    by Chan Francis
    Price: $11.99
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/crazylove.aspx</link>
      </content>
    <content>
        <image>images/underthesheets.jpg</image>
        <description><![CDATA[Under the Sheets
    by Dr. Kevin Leman
    Price: $9.99
    You Save: 29 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/underthesheetsthesecretstohotsexinyourmarriage.aspx</link>
      </content>
    <content>
        <image>images/outliveyourlife.jpg</image>
        <description><![CDATA[Outlive Your Life
    by Max Lucado
    Price: $19.99
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/outliveyourlifebymaxlucadohardcover.aspx</link>
      </content>
    <content>
        <image>images/lovedare.jpg</image>
        <description><![CDATA[Love Dare Day By Day
    Wedding Edition
    Price: $16.79
    You Save: 27 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/lovedaredaybyday-weddingedition.aspx</link>
      </content>
         <content>
        <image>images/lifeinterrupted.jpg</image>
        <description><![CDATA[Life Interrupted
    by Priscilla Shirer
    Price: $11.99
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/lifeinterruptednavigatingtheunexpected.aspx</link>
      </content>
    <content>
        <image>images/faithfulfasting.jpg</image>
        <description><![CDATA[Faithful Fasting
    by Errica L. Williams
    Price: $8.79
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/faithfulfasting.aspx</link>
      </content>
      <content>
        <image>images/whencouples.jpg</image>
        <description><![CDATA[When Couples Walk Together
    Price: $9.59
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/whencoupleswalktogetherjan2011-paperback.aspx</link>
      </content>
    </items>
    ts_music.xml
    <items>
      <config
      Milliseconds="5000"
      Distance="3"
      BorderColor="0xffffff"
      TargetLink="_top"
      TextYPosition="200"
      MaxDisplayContent="6"
      ContentWidth="148"
      ContentHeight="300"
      TransitionSpeed="0.8"
      TransitionType="0"
      ShowMouseOver="0"
      ShowBorder="1"
      ShowGlass="1"
      />
       <content>
        <image>images/untilthewholeworldhearscd.jpg</image>
        <description><![CDATA[Until the Whole
    World Hears
    Price: $12.76
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/untilthewholeworldhearscd.aspx</link>
      </content>
    <content>
        <image>images/move.jpg</image>
        <description><![CDATA[Move
    by Thirda Day
    Price: $11.19
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/move.aspx</link>
      </content>
    <content>
        <image>images/andifourgodisforus.jpg</image>
        <description><![CDATA[And If Our God
    Is For Us
    Price: $11.19
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/andifourgodisforuscd.aspx</link>
      </content>
    </items>

  • Help  reg Down Payment - Urgent

    When i put down payment here in VA01 billing plan (WBS element linked)
    For e.g., PR00 = Rs. 1,00,000
    <b>Billing Plan</b>
    30%, 40% and remaining after the receipt of material at client's site
    but commercial and excise invoice will go with the material with 100% value
    1.30 % value - 30, 000 Billing Type FAZ - Down payment Request
    2.40%  value - 40,000  Billing Type FAZ - Down payment Request
    So now,only 70% of the PR00 is recieved
    But in the sales order if i put 30% ..it is talking 30% of net price(PR00 + EDCESSCST/VAT+ Service Tax) and  the same case with 40% DP also.
    when i create a down payment request, AZWR condition type is throwing with the information message, saying that " <u><i>Downpayment value is higher/lower than pre-set value"</i></u>
    customer down payment is normally some % of the agreed price(PR00)
    how to tell to the SAP system that when i create FAZ it shud take % of PR00 and When I do F2 invoice(1,00,000 + ED+Taxes) it shud take everything into account?
    Plz help me.
    Regards,
    Anbu

    done

  • Need help reg sender JDBC adapter

    Hi,
    I am having a requirement like, i need to fetch the data from two data base tables. and after fetching the data, i need to update those two tables.
    For selecting the data from two tables, two select statements i need to write, how i can give two select statements in sender JDBC comm channel.
    In sender JDBC channel, only one update query we can give...how i can update two tables?
    Regards,
    Venkata Ramana.

    Hello Venkat,
    For your requirement, go for stored procedure and find the below thread.
    Fetching data from JDBC without using JDBC sender adapter
    Re: Executing an Oracle Stored Procedure from Sender JDBC adapter
    Re: Sender JDBC adapter not picking up data
    Re: Retrive data from two diffirent tables
    hope this will help you
    Thanks,
    Venky

  • Help reg. multipage form

    Hi,
    I am doing a project in multipage form. I have found similar web application and it has been implemented in JSP. I have gone through the code.Not able to get it. The guy who implemented it is using one controller.jsp. when the user clicks back button then the data already selected is also displayed. If I see the code of any page one html from will be there. If the url has been observed, always directed to controller.jsp. can anyone let me know how it was implemented. The following is the link.
    http://donner.cs.uni-magdeburg.de:8080/elearning/modelschoice.jsp
    kindly let me know the basic idea. Thanks alot.

    Alright,people their are using View Controller pattern.
    Here is how they could have done it.
    They might have designed dedicated JSP for each and everyform their.
    Including same .gif file in the header part.
    However,they are calling a single JSP file/Servlet /Struts Dispatch Action/Or any backing bean(with url pattern controller.jsp).
    All they are doing their is Trying to save details of all the form inputs as respective property in a bean which is used to render contents in repective JSP page and then finally the controller forwards the page to next jsp page at the server side therefore url in the browser would not change however,response regards to new page would changed with change in url and consequently the new response would again call the same controller again & again and updates the same View Object which is scoped under session and finally when application gets the complete data regards to form it updates it DB forwards or redirects to the confirmation page.
    If you still don't understand what i'm trying to exaplain.
    It would be a great idea for you to learn MVC pattern or what is MODEL 2 pattern.
    hope the below link might be of some help :)
    http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html
    http://java.sun.com/blueprints/patterns/MVC-detailed.html
    http://java.sun.com/blueprints/patterns/MVC.html
    http://www.ftponline.com/javapro/2002_05/magazine/columns/weblication/
    http://www.javapassion.com/j2ee/MVCPatternAndFrameworks_speakernoted.pdf
    http://www.springframework.org/docs/reference/mvc.html
    http://java.sun.com/developer/EJTechTips/2004/tt0324.html#1
    http://www.developer.com/java/ent/article.php/3558501
    http://www.csis.pace.edu/~bergin/mvc/mvcgui.html
    REGARDS,
    RaHuL

  • Urgent deadline - Please help - Linux serialization problem

    Hi -
    I have a presentation on Wednesday morning of my program for my dissertation. I developed the whole thing in windows - it all works great... but the demo is on a Linux machine. Fortunately I tested today in Linux. I have a real problem. I want to save out a class instance. This code works fine in Windows:
                        String project_name = f.getAbsolutePath() + "/" + directory_name + ".oll";
                        ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(project_name));
                        out.writeObject(mainCanvas);
                        out.flush();
                        out.close();The problem is that in Linux I just don't get anything saved. There is nothing there at all. No file is saved. I cannot work this out and am in a panic. Any help really appreciated.
    Olly

    Hi ,
    Please try to add this code to u'r prg.
    private void writeFile(String s, String s1)
    throws IOException
    Object obj = null;
    FileWriter filewriter = null;
    BufferedWriter bufferedwriter = null;
    if(sfmsDebug)
    System.out.println("Before Writing Received Messages To a File.");
    String s2 = System.getProperty("file.separator");
    if(System.getProperty("os.name").toUpperCase().indexOf("WIN") !=
    -1)
    File file = new File("c:" + s2 + s1);
    boolean flag = file.createNewFile();
    filewriter = new FileWriter("c:" + s2 + s1, true);
    bufferedwriter = new BufferedWriter(filewriter);
    } else
    File file1 = new File("/home/usr2/barcwas1" + s2 + s1);
    boolean flag1 = file1.createNewFile();
    filewriter = new FileWriter("/home/usr2/barcwas1" + s2 + s1, true);
    bufferedwriter = new BufferedWriter(filewriter);
    bufferedwriter.write(s, 0, s.length());
    bufferedwriter.write("\r\n");
    bufferedwriter.close();
    filewriter.close();
    if(sfmsDebug)
    System.out.println("After Writing Received Messages To a File.");
    }

  • Want help in Serialization

    Hi all,
    My requirement is there is a DTO object which i have. called Employee with many attributes like name, age , sex etc. Instead of storing each if the fields in different columns of the databse I wanna store it by serializing the object and persisting it in the databse. The column name type will have int. Is this possible. I have never known serialization. How do i do it. Is there any good tutorial for me to start of with serialization..
    This is an urgent requirement. What all do i need to know in order to persist the data and also I should be able to retrieve the column when queried and read the data.
    Regards,
    Hemanth

    Just make the class implement Serializable. However the column type will have to be Blob, not int.

  • Need help reg SUBTOT

    Hi,
    I am using slis_sortinfo_alv for doing subtotal in a report,but the problem is i even wat to display some text like 'Subtot'before the value.
    Need help.
    I want to display my sub total like below format.
    Ex:SubTot:2345

    Hi,
    Make use of the below statement :
             display_text_for_subtotal = 'TEXT'.
    For reference you can refer to LSLVC_FULLSCREENF02 Include program.
    Thanks,
    Sriram POnna.

  • Urgent Help reg setting the maxlength of a text box

    Hi all,
    I want to set the max length or the no of characters to be entered of a textbox in parent page from a child popup window.
    Even if i use the opener property the maxlength is not set. Is there any other way to set the property. I'm not refreshing the parent page when coming back from child page. I tried to set the value of the text box from child and it's working fine. But the maxlength is not working.. Is there any way to do this.. Pls help me to solve this problem.

    this is really a js question and im not sure that you can access the formElem.maxlen property unless you get into DOM coding
    ...but ...
    maybe u could use something like this and set it from the parent window to the onkeyup event on the text box in the parent
    function textLimit(field, maxlen) {
    if (field.value.length > maxlen) {
    field.value = field.value.substring(0, maxlen);
    alert('your input has been truncated!');
    } }hth
    g00fy

  • Need Help reg Video

    Hello,
    I have written an application to show video on J2ME devices. The application shows video properly. If the video is huge it takes time to download all video and then plays it. How can I stream part of video of a huge video and we show the downloaded part of video and keep streaming video simultaneously. How to achieve such type of video from internet ?
    I look forward for any help, ideas, suggestions. Any help is highly appreciated.
    Thanks,

    Don't double post. I've removed the thread you started int he Sun Wireless Toolkit forum.
    db

Maybe you are looking for