• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

When I deserialize my ArrayList, all the values in it are set to NULL

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I am doing my semester project and have been trying whole night to solve this bug. When I deserialize my ArrayList, its values are set to NULL and hence I am unable to continue my work on the project. I have spent whole night to figure this out but can't!

Can someone let me know why this error might be occuring. Any help would be appreciated.

My Code gist is: https://gist.github.com/waleedrana777/f2539785d1d6a2c00b5e55c6530cde96

specifically on line 116 of CMS.java when I deserialize the ArrayList called TeachersData, which I previously serialized in teachers.dat but somehow after decoding it, its values are all NULLED

Here is a video of the runtime error https://youtu.be/BiGyJPd3WaM
 
Marshal
Posts: 72905
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please tell us the errors you are suffering, and how you are serialising and deserialisng the List. What sort of objects does the List contain? Do they implement Serializable?
 
Ranch Foreman
Posts: 108
4
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

/usr/bin/brain > /dev/null
I highly recommend refactoring this mess to meet Java Coding Conventions - it's very hard to read.
Also: class Person is missing - so no way to compile.
Also also: Please post code here instead of linking external source.
Also also also: Please post error messages as text - not as images - but posting a link to a YouTube clip (no, I have NOT watched it) is a whole new level to that ...
reply
    Bookmark Topic Watch Topic
  • New Topic