• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Getting Object From JMS Queue

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, thanks - I thought that would be the case, just wondered if anyone had any ideas !

Dave
reply
    Bookmark Topic Watch Topic
  • New Topic