Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Getting Object From JMS Queue

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to get a message from a JMS queue that has an embedded object.

The program I'm writing is a utility, therefore I do no want to have the embedded object class in the utility, instead I would like to invoke methods on it using reflection.

When I try this, I get a JMSException saying that there was an error deserializing the object, and the cause is ClassNotFoundException.

If I put the embedded object into the utility so it's in the classpath, it works fine.

Is there as way to *NOT* have the class defined in the utility ?

Thanks for any help.

Regards

Dave
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I understand you can not deserialize an object if you do not have its class on your classpath. This sounds reasonable for me.
 
Dave Hewy
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks - I thought that would be the case, just wondered if anyone had any ideas !

Dave
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic