wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes JMS - ActiveMQ works, Oracle AQ JMS does not Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS - ActiveMQ works, Oracle AQ JMS does not" Watch "JMS - ActiveMQ works, Oracle AQ JMS does not" New topic
Author

JMS - ActiveMQ works, Oracle AQ JMS does not

Bear Giles
Greenhorn

Joined: Mar 16, 2006
Posts: 25
We're prototyping open source replacements for a legacy application.

When we're running a prototype again ActiveMQ, we don't have any problems. Well, we ended up running spring on the applet side(!) because of an initialization issue with the naked activemq client libraries, but that was a mere annoyance.

When we're running a prototype against the Oracle JMS wrapper on ActiveQueues, we run into a brick wall. (The legacy app uses AQ, we're prototyping on new AQ queues with JMS support enabled.) With the help of some online resources we've been able to get a test case to the point where the JMS calls throw a generic "corrupt data" exception, and the corresponding AQ-specific calls throw a NPE when writing to a HashTable in a 'convertPropertyListToHashtable' call. We're pretty confident that the JMS exception is just a wrapper for this NPE.

This suggests that we haven't specified some message property, but we're coming up blank since it works with ActiveMQ and there's no mention of this in the AQ JMS resources.

BTW this happens with test payloads of Date, String and a String containing XML text.

Ideas?

P.S., we're running 11.1g and saw a similar problem reported about 6 months ago, but no resolution was discussed.


SCJP 5 & 1.4, SCWCD 1.4, SCBCD 1.3; Security+
Bear Giles
Greenhorn

Joined: Mar 16, 2006
Posts: 25
We've made a little progress -- using the native API it looks like the underlying message payload is null. That could reasonably result in an NPE when it hits the JMS wrapper logic.

The test code is:



We can verify that the XML -is- properly written into oracle tables. We can also verify that we can see messages written into oracle tables via other mechanisms, but we still get a null payload.
Bear Giles
Greenhorn

Joined: Mar 16, 2006
Posts: 25
A group of us finally figured out how to send/receive native messages. We don't know if it's the -right- approach, but it does successfully send messages.

Enqueue:


Dequeue:
Bear Giles
Greenhorn

Joined: Mar 16, 2006
Posts: 25
And here is the code that uses AQ JMS. Still not quite pure-JMS, and we still haven't figured out how to get XMLType out of the received message. But it doesn't blow chunks any longer.

Sent:


Receiver:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS - ActiveMQ works, Oracle AQ JMS does not
 
Similar Threads
ActiveMQ 5.2.0 + REST + HTTP POST = java.lang.OutOfMemoryError
Habari ActiveMQ Client 2.9 - use Apache ActiveMQ from Delphi and Free Pascal
Java-VB interaction
Java-VB interaction
WAS5.02 and OracleAQ as Generic JMS Provider