Sachin Handiekar

Sachin Handiekar


November 2011
M T W T F S S
« Oct   Dec »
 123456
78910111213
14151617181920
21222324252627
282930  

Categories


Using Spring JMS with Oracle AQ [XMLType payload]

Sachin HandiekarSachin Handiekar

Using Spring JMS with Oracle AQ [ Without Spring JDBC Extension ]

Code available at https://github.com/sachin-handiekar/spring-jms-oracle-aq

Create a queue table with XMLType payload

* Create a queue


Code 

AQ Connection factory


AQ Destination Factory


Message Listener for XMLType message


Message Listener Container


Sending XML Message to the queue

Comments 1
  • Kleber Pinel Bernardo da Silva
    Posted on

    Kleber Pinel Bernardo da Silva Kleber Pinel Bernardo da Silva

    Reply Author

    Hello.

    I'm getting the this error:

    oracle.jms.AQjmsException: JMS-120: Dequeue failed
    at oracle.jms.AQjmsError.throwEx(AQjmsError.java:315)
    at oracle.jms.AQjmsConsumer.jdbcDequeue(AQjmsConsumer.java:1630)
    at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:1037)
    at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:962)
    at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:940)
    at oracle.jms.AQjmsConsumer.receive(AQjmsConsumer.java:792)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:429)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:310)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: java.sql.SQLException: XMLTypeFactory can only work with OPAQUE
    at oracle.xdb.XMLTypeFactory.create(XMLTypeFactory.java:75)
    at oracle.jms.AQjmsConsumer.jdbcDequeue(AQjmsConsumer.java:1453)

    Could you help me ?


Leave a Reply