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

Deserialization error in JMS

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MY scenario is:

(1) My queue has old JMS object Message .Lets say the message in the queue has the serialized object of type class mail
(2)Due to a new requirement I have added a new method to the class mail
(3)Now if try to retrive the object mail from the old message in the queue,I get a "weblogic.jms.common.JMSException: Error deserializing object(local class incompatible: stream classdesc serialVersionUID = 500568024477408449, local class serialVersionUID = 3652857871964423418
)" .

Is there is any mechanism to overcome this since my requirement demands me to add a new method to the mail class.

Can any one please help me out .

Regards,

Magesh.S
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will have to delete the old messages from your queue.

Serialization works based on a serialVersionUID which you can supply in your class. If you don't, the JVM calculates one based on the fields and methods of the class. So if you change these the numbers will no longer match.
 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic