• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.io.InvalidClassException

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Could anyone help me in the below error.

I am getting the below error when i try to execute my application in WAS 6.1, which was working fine in WAS 5.1

java.io.InvalidClassException: com.acnielsen.arch.config.service.Service; local class incompatible: stream classdesc serialVersionUID = 987267098049263698, local class serialVersionUID = 8439492350081587999

I had tried hardcoding both these values one by one, but it doesnt work even then.

Thanks in advance.

Regards,
Barath
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Isn't this a serialization problem?

I've encountered this sort of issues when changing classes of serialized objects on say, the client side, but not updating the same serialized class on the server side.

As far as I know, the serialVersionUID number is used to identify which "version" of the serialized class are you using to make sure both (client and server) are using the same one.
 
Barath Dhandapani
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are writing a java object in OutputStream,with defined serialVersionUID (4197884), and reading the java object again from the OutputStream.

But while reading we are getting the following exception


java.io.InvalidClassException: com.acnielsen.arch.config.service.ServiceConfig; local class incompatible: stream classdesc serialVersionUID = 2787697398409320177, local class serialVersionUID = 4197884

Is there any way to make the serialVersionUID compatible for stream classdesc and local class.

Thanks in advance.

Regards,
Barath


 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Specify the serialVersionUID explicitly:
Usually, you create one the first time (e.g. using the serialver.exe tool, or using your IDE). Afterwards, you simply keep it the same.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic