History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: HJMS-125
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Colin Crist
Reporter: David Cole
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
HermesJMS

Add Classpath group selectable for message stores

Created: 26/Apr/10 07:01 PM   Updated: 06/May/10 11:40 AM
Return to search
Component/s: GUI
Affects Version/s: 1.14
Fix Version/s: 1.14


 Description  « Hide
When I record a message to the message store, it does capable of being configured for a specific classpath group. Instead, it uses the default classpath. As a result, I get a ClassNotFoundException, which I am only capable of resolving by hardcoding my application jar files in the default Hermes classpath. It would be a great addition if I could configure a classpath group for the message store as is done for the Providers.

 All   Comments   Change History      Sort Order:
Colin Crist [06/May/10 10:53 AM]
In Options->Configuration->General tab is the option MessageStoreMessageFactory which basically means which JMS provider to use when needing to create messages from the message store - i.e. a session is created and the messages are created from that. Assuming you include the JAR files for any dependent ObjectMessage objects consumed or sent to that class path group then you should be ok. Let me know if this works for you - it should.

Change by Colin Crist [06/May/10 10:53 AM]
Field Original Value New Value
Fix Version/s 1.14 [ 10030 ]

David Cole [06/May/10 11:40 AM]
Hi Colin,

Thanks for the fast response.
I was able to make the change you suggested and set the MessageStoreMessageFactory to a Session that uses a ClassPathGroup which includes the jar file that has the ObjectMessage payload class. Unfortunately, I was still unsuccessful. Just to make sure, knowing ClassLoaders, I shutdown and restarted Hermes to see if the class was found then..still no luck. Just to be sure, I made sure I was still able to render a message witht the same payload type in the Session I had set the MessageStoreMessageFactory to. Just to try to add as much info as possible, the message in the store, was placed there by dragging (copying) one from a queue in the session. I captured the stacktrace, hopefully that will provide more of a clue:

hermes.HermesRuntimeException: com.rbs.envoy.message.EnvoyMessage
at hermes.store.jdbc.MessageResultSetHandler.getNextMessageQuietly(MessageResultSetHandler.java:189)
at hermes.store.jdbc.MessageResultSetHandler$1.nextElement(MessageResultSetHandler.java:79)
at hermes.browser.tasks.BrowseMessageStoreTask.invoke(BrowseMessageStoreTask.java:112)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Thread.java:619)
hermes.HermesException: com.rbs.envoy.message.EnvoyMessage
at hermes.impl.DefaultXMLHelper.fromXML(DefaultXMLHelper.java:201)
at hermes.store.jdbc.MessageResultSetHandler.getNextMessage(MessageResultSetHandler.java:105)
at hermes.store.jdbc.MessageResultSetHandler.getNextMessageQuietly(MessageResultSetHandler.java:183)
at hermes.store.jdbc.MessageResultSetHandler$1.nextElement(MessageResultSetHandler.java:79)
at hermes.browser.tasks.BrowseMessageStoreTask.invoke(BrowseMessageStoreTask.java:112)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Thread.java:619)
java.lang.ClassNotFoundException: com.rbs.envoy.message.EnvoyMessage
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at hermes.impl.DefaultXMLHelper.createMessage(DefaultXMLHelper.java:422)
at hermes.impl.DefaultXMLHelper.fromMessageSet(DefaultXMLHelper.java:277)
at hermes.impl.DefaultXMLHelper.fromXML(DefaultXMLHelper.java:195)
at hermes.store.jdbc.MessageResultSetHandler.getNextMessage(MessageResultSetHandler.java:105)
at hermes.store.jdbc.MessageResultSetHandler.getNextMessageQuietly(MessageResultSetHandler.java:183)
at hermes.store.jdbc.MessageResultSetHandler$1.nextElement(MessageResultSetHandler.java:79)
at hermes.browser.tasks.BrowseMessageStoreTask.invoke(BrowseMessageStoreTask.java:112)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Thread.java:619)

Let me know if there is something else I can test to help gather more information.
Thanks for looking into it.