• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic