Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6203405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:54:39+00:00 2026-05-24T04:54:39+00:00

I’ve got an object that im reading and writing to and from fileinputstreams/objectinputstreams and

  • 0

I’ve got an object that im reading and writing to and from fileinputstreams/objectinputstreams and objectinputstreams/objectoutputstreams. I keep getting errors that java excpected one serialversionUID, but found another.

In my class I’ve implemented serializable and have a field like static final long serialVersionUID = 1L; which I thought was enough.

I’m new to java serialization. What am I missing here?

EDIT If it matters, I’m actually trying to write and read an **ArrayList<MyObject>**

Here’s the full trace:

java.io.InvalidClassException: com.luxurymode.pojos.Reminder; Incompatible class (SUID): com.luxurymode.pojos.Reminder: static final long serialVersionUID =4209360273818925922L; but expected com.luxurymode.pojos.Reminder: static final long serialVersionUID =1L;
W/System.err( 4504):    at java.io.ObjectInputStream.verifyAndInit(ObjectInputStream.java:2723)
W/System.err( 4504):    at java.io.ObjectInputStream.readNewClassDesc(ObjectInputStream.java:1848)
W/System.err( 4504):    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:826)
W/System.err( 4504):    at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:2066)
W/System.err( 4504):    at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:929)
W/System.err( 4504):    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2285)
W/System.err( 4504):    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2240)
W/System.err( 4504):    at java.util.ArrayList.readObject(ArrayList.java:662)
W/System.err( 4504):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 4504):    at java.lang.reflect.Method.invoke(Method.java:521)
W/System.err( 4504):    at java.io.ObjectInputStream.readObjectForClass(ObjectInputStream.java:1537)
W/System.err( 4504):    at java.io.ObjectInputStream.readHierarchy(ObjectInputStream.java:1460)
W/System.err( 4504):    at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:2139)
W/System.err( 4504):    at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:929)
W/System.err( 4504):    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2285)
W/System.err( 4504):    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2240)
W/System.err( 4504):    at com.luxurymode.singletons.RemindersSingleton.<init>(RemindersSingleton.java:54)
W/System.err( 4504):    at com.luxurymode.singletons.RemindersSingleton.getInstance(RemindersSingleton.java:66)
W/System.err( 4504):    at com.luxurymode.views.AddReminderView.saveAlarm(AddReminderView.java:290)
W/System.err( 4504):    at com.luxurymode.tab_2.RemindersActivity.onClick(RemindersActivity.java:94)
W/System.err( 4504):    at android.view.View.performClick(View.java:2554)
W/System.err( 4504):    at android.view.View$PerformClick.run(View.java:8962)
W/System.err( 4504):    at android.os.Handler.handleCallback(Handler.java:587)
W/System.err( 4504):    at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err( 4504):    at android.os.Looper.loop(Looper.java:123)
W/System.err( 4504):    at android.app.ActivityThread.main(ActivityThread.java:4627)
W/System.err( 4504):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 4504):    at java.lang.reflect.Method.invoke(Method.java:521)
W/System.err( 4504):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
W/System.err( 4504):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
W/System.err( 4504):    at dalvik.system.NativeStart.main(Native Method)
D/AndroidRuntime( 4504): Shutting down VM
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:54:41+00:00Added an answer on May 24, 2026 at 4:54 am

    Are you reading from a file? In that case, it does not matter if you added the serialVersionUID now, it is different from the one stored in the file, and that creates the exception.

    A quick solution could be to set serialVersionUID to 4209360273818925922L, which seems to be the serialVersionUID that was automatically generated by java when you saved those object in that file at that time 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I am trying to loop through a bunch of documents I have to put
I'm making a simple page using Google Maps API 3. My first. One marker
I have some data like this: 1 2 3 4 5 9 2 6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.