Lost Object[] data after serialization

Hi all,
I posted this problem already in the servlet forum, but now I found out that it's more a serialization problem. I hope you guys can help me!!!!
I have a problem sending a serialized object from a java application to a servlet (inside Tomcat).
I'm using Commons HttpClient's PostMethod to get a connection to the servlet over https. The encryption should be done automatically within HttpClient and Tomcat.
The object container I'm sending contains a few Strings and an Object[] that is filled with Strings.
The container i'm sending implements Serializable.
The connection is working fine, and the object has no serialization problems but the incoming request at server-side is kind of broken.... The single Strings are the same I've set on client-side, but the Object[] is null. I tried it with directly sending the ArrayList but with the same result.
The size of the incoming data stream is the same as it was on client side.
The funny thing is that sending data back from server to client works perfectly fine. My Object[] goes through without any problems!
Here is the client code I'm using:
PostMethod method = new PostMethod(mServerUrl);
MyContainer container = new MyContainer("Message2Server",new Object[]{"ArrayElement1"});
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
ObjectOutputStream serializer = new ObjectOutputStream(byteStream);
serializer.writeObject(container);
serializer.flush( );
serializer.close();
method.setRequestHeader("Content-Type","binary/x-java-serialized");
ByteArrayRequestEntity output = new ByteArrayRequestEntity(byteStream.toByteArray());
method.setRequestEntity(output);
mClient.executeMethod(method);...and here is the servlet code:
InputStream is = request.getInputStream();
ObjectInputStream ois = new ObjectInputStream(is);
MyContainer out = (MyContainer) ois.readObject();
out.getString1(); //<-- is OK!
out.getString2(); //<-- is OK!
out.getObjectArray(); //<-- is null!!!!!!
out.setObjectArray(new Object[]{"Message for the Client!!!"});
response.setContentType("binary/x-java-serialized");
// get output stream and send it back
OutputStream os = response.getOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(os);
oos.writeObject(out);
oos.flush();
oos.close();Does anybody see a solution????
I think it just could be two things:
- Serialization fails for any reason?!
- The Servlet InputStream fails?
Thanx for any help!
CU Jan

This looks very useful to me. Can you tell us what
the typo was?Considering he/she hasn't posted for 4 months, I'd doubt it.

Similar Messages

  • Lost calendar data after upgrade to OS X 10.10.3 from 10.10.2

    Using MacBook Pro 13 inch Mid 2009, Processor: 2.26 GHz Intel Core 2 Duo, Memory: 8 GB 1067 MHz DD3; Graphics: NVIDIA GeForce 9400M 256 MB
    Upgraded to OS X 10.10.3 from OS X 10.10.2 and lost all data appointments, etc in Calendar.
    Tried retrieving calendar from Time Machine, but unable to recover as part running system.
    What do I do to retrieve data?  All my medical appointments are on this calendar.
    Please help.

    I found that is a hardware problem, because the 9600MGT didn't shown when I reinstall OS X Lion 10.7.4.
    It seems that I have to buy a new one

  • Lost Quickbooks data after System Recovery

    Is there anyway to recover Quickbooks data after system recovery?

    Quickbooks is an accounting tool designed and marketed by the Intuit Inc. mostly used for financially-related processes anywhere in any big or small organization. So, financial means quite important and very useful data to store..so there are number of possibilities of QBW file or QuickBooks database corruption.
    Read More:  http://www.filesrecoverytool.com/quickbooks-recovery.html
    use free trail version demo

  • IPAD2 calendar lost all data after 5.1 upgrade

    I just upgraded my iPad via iTunes to v5.1 today, and just like my upgrade previously  to 5.01, my calendar lost all data.  Somehow, I think I was able to recall the data under 5.01 whereby it just magically came back.  I don't remember  how it  came back.  How do I get my calendar data back??

    1). Re how are u syncing calendar.  And "info" :  answer: the entire "sync calendars with .....". Box is all gray.  When I click a check to the left of Sync, the Outlook field comes alive, and no other choices in that drop down field.
    "All calendars" is radio buttoned, and Do not sync events older tha .30. days ischecked. 
    I'll now leave it like that but since I don't use OUTLOOK on mt laptop I don't see how it wll affect anything .
    Further own on th screen, under ADVANCED, checking Calendars. Apparently willrlac "the selected information in this iPad with information from this omputer".   I don't know how to interpret this, do you?  If I check it it will get information form the computer ?   What info? A previous cal data file?
    2). Re page 70.  If you had not told me (sent a ref URL in one of u'r replies tonite), I wouldn't have even known about the iPad 5.1 manual. 
    Pager 70 : I read pg 70 and don't see any related advice. 
    In the meantime, no data, just like the last upgrade problem.  Since this is exclusively related to calendar, I must conclude whatever events file that existed  was lost in the process.  Although the US, FRENCH, AND GERMAN HOLIDAYS DID GET TRANSFERRED!  And a recurring event file also (time card every Friday)
    Ideas? 

  • Lost ALL DATA after OS update on MAC.

    Coming back from Walt Disney World with my daughter during the holidays.  Took some nice pictures with my BB Curve 8530.  Once back home, try to download all the picture on my macbook using the desktop manager.  Plugged my BB using the provided cable, then immediately was proposed to update my device software.  So the update go on.  Took a while and finally was asked to restore my data on the device, which of course I accepted.  Took about a quarter of a second, then done!  So unplugged the device from the computer and surprise!  Nothing, Nada, Zero...  All my contacts, media, email, everything was wiped very clean.  I'm kind of furious. 
    I've done some research over several forum it append to A LOT of people.  Some were lucky enough to find a backup file on there system, but nothing on mine searching with spotlight.
    RIM as no right at all to erase all the data on my device.  I was never warned and I never accepted the risk associated with that update.
    I'm asking for a solution to get back all my data.

    i'm having the same problem!
    i finally got around to upgrading to IOS5 last night and also got an error whilst restoring the back up. I also assumed the date would be there.
    now i've restored my phone all apps etc have returned to phone but lost all data from them, ive lost all my contacts and diary appointments etc.
    Nightmare!
    how do i get it back???? any help would be appreciated

  • Iphone 4 Lost all Data after updating

    Hi there..
    i got headache reading everywhere to find a solution to my problem, and didn't find any useful tips so far, i haven't slept for the past 24 hours because of this..
    last day i did an update to my itunes to the latest version, and upgraded my iphone, while doing that my iphone got an error that it couldn't be updated and got stuck on recovery mode, and itunes asked me to do a restore to factory sitting, which i did, but in the last few seconds it just shows an error message that it cant update, and i get error 10, so i did what the manual said and tried using another computer which fortunately worked..
    so i return to my first computer and tried to restore my backup files, and then i faced another problem, there was not enough space on my hard drive, i kept moving files away, deleting others and trying again, and every time i try, it takes up more space and i end up with few Kb on the drive.. i didn't know what to do, and got confused i think i click on back up instead of sync at some point, and when i realized that i hurried and unplugged the USP from the iphone, and in that moment a 3GB worth of data disappeared from my hard drive (i think it was the data the ituens kept creating while restoring back up) and a new back up worth 5mb was created on my back up folder..
    now what i have on my iphone are my contact list, and my notes ..
    what i don't have is 6 months worth of pictures and videos taken from the iphone, and my apps that are worth around $40 - $50
    i read that iphone sync your data before doing a full restore, and i found 3 files on my back up folder one is 902 mb, secound 1.06GB and the third is 508 MB the first two dating today's date on 8:03 AM, the last one is also today on 6:33 AM which was the time i unplugged my USP from my iphone (i think)
    i'v downloaded a program called "iPhone Backup Extractor" and saw that these folders contain all contacts, 300+ calender stuff and some messages (which i totally don't care for)but the photos and videos are marked None T_T
    the question i'm asking is, how can i restore those lost pictures and videos, since they are very important to me, and how can i get my apps back?? i'v tried going to app store and downloading Whatsapp which i bought before, but now it asks me to pay again
    i have some apps that is worth $5 and $10 each, i wouldn't mind paying for $.99 app again, but i can't pay more for an already paid app for that much yet again!!
    by the way I have a windows Xp which i'm using, the restore worked on a windows 7 laptop
    Plz help me, i'm starting to have a stomachache because all of this other than my headache T_T
    Message was edited by: Hschi

    so i was playing around seeing if i can get the apps back, and after going through the payment process it recognized that i'v bought this already, so i was able to download my stuff back.. (should have figured this out already, since it was an online transaction)
    Still want to recover my camera roll, and i was wondering if chat logs could be recovered too, such as for the whatsapp???

  • Lost all data after a clean install

    Hi,
    I did a clean install of my Leopard/Snow Leopard as I was having a few probs after a Firefox update, anyway, I did the norm. . backup, unmount, erase and reinstall, when it started up and asked if I wanted to migrate my data from another mac, time capsule etc, I clicked on my time capsule and it went to the page where I could choose what i wanted to retrieve from the time capsule and then I had the spinning wheel of death for what seamed ages and nothing would respond, after a while I had to switch off my macbook and try again. . and guess what, there were no files on my TC, a year and a half of data gone. . my only saving grace was I went out and bought a WD passport to back-backup just in case this happened. I am lucky, but I have still lost everything and data from a long time ago. . anyone else had this or know how I can throw a few F**ks into apple as a piece of kit ive bought hasnt done what its supposed to do?? Thanks

    slikt wrote:
    All the dates are still showing in the right hand side of the screen when in the time capsule, but anything before the reinstalled date are blank, if I click on the earlier dates nothing happens??
    Try not to confuse Time Capsule (an Apple Wi-Fi base station with an internal disk drive) with Time Machine (backup software included with OS X).
    I wonder if Time Machine created a whole new backup set for your computer. Try a click-and-hold on the Time Machine icon in the Dock or an option-click on the Time Machine icon in the menu bar, then select "Browse Other Time Machine disks".

  • Lost All Data after Restore

    I was getting an error message when I tried to sync my iPhone, so I eventuall decided to do a restore.  I figured after I had restored, it would be simple to go to a backup and have all my data back.  Problem was that during the restore, my hard drive got full, and now I've lost all my data.  It won't let me get to my back up.
    Can anyone help get to the back up data?
    -John

    If there's no backup, there's no way to restore the data.

  • Lost steps data after ios 8.0.2 upgrade

    My steps data isn't showing in the graphs after upgrading to ios 8.0.2. The data is still there and my flights of stairs and distance history shows up but steps are showing 0 For the last week in the graph even though the data is there.

    Hey prakash12305,
    I have an article for you that will help you troubleshoot this issue with your cellular data connection on your iPhone:
    iPhone cellular data connection issues
    http://support.apple.com/kb/ts3780
    Take care, and thanks for visiting the Apple Support Communities.
    Cheers,
    Braden

  • Lost user data after upgrade bios in G580

    HI
    I have strange problem with Lenovo G580 with Windows 7. After upgrade bios to newest version and reboot my system start without any user data (no documents, no programs installed earlier), All reboot take short time, about 1-2 minutes. Only username stay the same.
    Is it possible that upgrade BIOS was bring recover system to factory?
    Does data can I recover somehow?
    I need help because there was important databases of company.
    Thanks
    Dariusz

    hi Dariusz,
    Welcome to the Lenovo Forums.
    That's really strange indeed and very unusual as I've never seen a BIOS update delete a user's data before. Perhaps you're logged-in to a temporary user profile?
    To check if you're logged-in to a temp profile, show hidden files and navigate to C:\Users and check if you have an identical username with a dollar sign right next to it and apply this fix:
    Fix Corrupt Windows 7 Temporary Profile
    For data recovery, check these Free File Recovery Software Programs.
    Hope this helps
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Lost Calendar data after update and hotsync

    Okay, I hope someone can help with this. I updated my Treo 650 at the Palm site tonight. And I'm gonna try to recall the exact order in which I did everything so that this is clear. (Also know that I Hotsync every night, without fail.) You should know that I work on a PC using Windows XP. After I downloaded the update and opened it, it instructed me to Hotsync. I did. The stuff in the update took a while, but it finally worked. There were a couple problems with this Hotsync though. First I got an error message that all of my original applications could not be re-uploaded because some of them were not Palm compatible. (Or some such.) Fine. I'd just go to wherever the file was and see if I could live without whatever was not uploaded. (I still haven't found the file, and I don't know HOW to find it.) Then I got a Hotsync error message that stuff had to be deleted so that the Hotsync of the updated software could be successful. No problem. I deleted some photos and Voila, it worked. New software installed. I first went to my Apps page on the Palm to see if the important Apps were still there. And they seemed to be. Then I noticed the calendar, which was showing TODAY'S date, and that looked fine too. Now this is where I get confused. SOMETHING moved me to Hotsync AGAIN. Not sure why I felt I had to, but I did. When THAT Hotsync was finished, my calendar was wiped clean. Now this is where I may have shot myself in the foot. (I read another post that seemed similar to mine and the person was told that it was fortunate that she did NOT Hotsync AFTER data disappeared. Then he went on to show the person how to reclaim her data, and his explanation went WAY "over my head".) So I Hotsynced again to see if any magic would get my calendar, and the 7-8 years of dates and info from my M103 days, back onto my Treo. It did not. My Treo has no calendar dates whatsoever. What's strange is that the address book is totally intact. Can someone talk me through a way, if there is one, to get my calendar dates and data back? And a way to back up all of this precious information should I ever get it back. And if you offer me directions, give them to me as if you were directing a really SLOW child.   
    Post relates to: Treo 650 (Unlocked GSM)
    Message Edited by kenmoo on 08-04-2008 09:31 PM

    Try doing a global search of your system.
    Right click Local disk (C) then select search and type in datebook.bak under "All or part of the file name" entry and hit on search. If their are some items found just look for the biggest file size of the datebook.bak and copy it then paste it to the desktop then do the import process again but it's gonna be on the desktop location that you are importing the file from.
    1st Open Palm Desktop Software then open your emptied calendar.
    2nd Click File then Import.
    3rd Locate the datebook.bak that you pasted on the desktop - once you're on the desktop you just type in the asterisk symbol * then press enter on your keyboard to show those hidden files then you shoudl be seeing a datebook.bak and some other icons and files on your desktop. I recon to just double click on the datebook.bak folder then that should import all your calendar data if it contains anything and if not then i gues this will be the last resort.
    You don't need to worry about the message that says something like "Not all imported datebook will be viewed on the current view because the default view is unfiled and if you do have some categorized data on the calendar.
    This will be the last resort.
    Post relates to: Treo 680 (Unlocked GSM)
    Message Edited by skirmish on 08-05-2008 10:58 PM

  • Lost All data after iPhone 3GS upgrade .. Help needed to RECOVER !!..

    Hi ,
    I have been backing up my iPhone in my laptop for almost 3 years. My laptop is crashed now.
    Today I thought of upgrading the software from my PC. so I installed itunes and upgraded the software.
    I am sure it made a copy of back up before doing SOFTWARE update.
    But when the update is about to finish. It throwed an error message popup and said update failed.
    I got instructions on the display that my iPHONE is been restored.
    But after RESTORING, I am not able to see any APPs in my phone. It looks like a clean phone.
    I am worried as I have plenty of apps and data on it.
    I am able to see several backup with different time when I click RESTORE backup. I almost tried everything and still could nt see the apps.
    Is there a way I can restore my old apps with data?
    Thanks.

    See my solution at http://discussions.apple.com/message.jspa?messageID=11757732#11757732
    It's pretty much guaranteed to work if it's at all possible to recover your contacts, although other simpler solutions may work too and some are discussed there.

  • Lost iCal data after attempt to use iCloud...possible to sync from iPhone to Macbook?

    I attempted to enable iCloud on my MacBook Pro, and after seeing that it was deleting all of the data on my iCal, I realized that it wiped out all of the data on my iCal . I stopped the iCloud sync quickly after.
    However, my iPhone 4 has a recently synced copy of all the data, and I was wondering if anyone knew of a way to transfer the events on my iPhone to my Macbook?
    I am running OSX Mountain Lion 10.8.2.
    Thank you, any help is much appreciated!

    I believe sync is working.  I think IOS 6.1.2 caused some new attribute in the event record that Calendar doesn't recognize.
    I do not use iCloud (had the same problem with multiple duplicate events which took hours to fix) for calendars or contacts.  I sync wirelessly with my MacBook Pro once or twice a day: very painless.
    Since I updated my iPhone to IOS 6.1.2, events created on the iPhone do not show up in Calendar.  Events created in Calendar do show up on the iPhone.
    I also have an iPad which I updated to IOS 6.1.2 over the weekend.
    If I create an event on the iPhone, then sync with the Mac, then sync the iPad, the event shows up on the iPad.  The only place the event could have come from is the Mac.  Calendar still does not show the event.
    My guess is that there will be a Calendar update soon.  I hope so.  It was driving me nuts.

  • Recovering Lost iPhone Data After Failed Backup

    So my mother is somewhat technically challenged and has never backed up her iphone before.. Basically I told her to do so and get the newest software update but I think an error occurred during the backup procedure and she continued with the update/restore anyways. So she lost all of her data and is very sad . Is there any possible way to find the data either on the restored empty phone, or on the computer from the failed backup (maybe it made a corrupted file that we can fix?)
    Please help!
    Thanks!

    No, sorry.  Without a backup it is gone.  Did you backup to iCloud by chance?

  • IPod touch 4th generation lost all data after updating to iOS 5.0

    I recently updated my iPod touch 4th generation from iOS 4.3 to iOS 5.0. However, when I went to access my iPod touch, all the app data was gone. My spending app was blank, my game stats were gone, and everything was lost.

    Try to restore from the latest backup taken before the update.
    Apps can be downloaded again for free: Downloading past purchases from the App Store, iBookstore, and iTunes Store

Maybe you are looking for