camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Matveev (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CAMEL-2909) Oracle AQ does not support the JMSReplyTo property and therefore throws a "JMS-102: Feature not supported" exception when the JMS provider tries to get it.
Date Mon, 05 Jul 2010 14:59:54 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-2909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60427#action_60427
] 

Max Matveev edited comment on CAMEL-2909 at 7/5/10 10:58 AM:
-------------------------------------------------------------

I'm using Oracle AQ 10.2.0.2, reproduced this error on Windows XP and RHEL 5 linux.

This exception will appear in few different places, namel everywhere where jmsMessage.getReplyTo()
is called. For example in public Map extractHeadersFromJms(Message, Exchange) method in JmsBinding
class (line number 174 in 2.3.0 version):
       map.put("JMSReplyTo", jmsMessage.getJMSReplyTo());

Stacktrace is the following:
org.apache.camel.RuntimeCamelException: oracle.jms.AQjmsException: JMS-102: Feature not supported

	at org.apache.camel.component.jms.JmsBinding.extractHeadersFromJms(JmsBinding.java:181)
	at org.apache.camel.component.jms.JmsMessage.populateInitialHeaders(JmsMessage.java:191)
	at org.apache.camel.impl.DefaultMessage.createHeaders(DefaultMessage.java:178)
	at org.apache.camel.component.jms.JmsMessage.ensureInitialHeaders(JmsMessage.java:176)
	at org.apache.camel.component.jms.JmsMessage.setHeader(JmsMessage.java:152)
	at org.apache.camel.processor.RedeliveryErrorHandler.incrementRedeliveryCounter(RedeliveryErrorHandler.java:524)
	at org.apache.camel.processor.RedeliveryErrorHandler.handleException(RedeliveryErrorHandler.java:294)
	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:101)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:89)
	at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
	at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:75)
	at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:70)
	at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:84)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:543)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
	at java.lang.Thread.run(Thread.java:619)
Caused by: oracle.jms.AQjmsException: JMS-102: Feature not supported 
	at oracle.jms.AQjmsError.throwEx(AQjmsError.java:288)
	at oracle.jms.AQjmsAdtMessage.getJMSReplyTo(AQjmsAdtMessage.java:145)
	at org.apache.camel.component.jms.JmsBinding.extractHeadersFromJms(JmsBinding.java:174)
	... 24 more

I meant Camel JMS Component, not Provider, sorry.

For your reference: similar bug was in Mule framework: http://www.mulesoft.org/jira/browse/MULE-489
and it was fixed by ignoring this exception for Oracle AQ.

Related config is:
<camelContext xmlns="http://camel.apache.org/schema/spring">
        <route>
            <from uri="jms:topic:TOPIC_NAME"/>
            <to uri="mock:result"/>
        </route>
    </camelContext>

    <bean id="aqConfiguration" class="com.example.aqsupport.AqJmsConfiguration">
        <property name="connectionFactory" ref="aqConnectionFactory"/>
        <property name="destinationResolver" ref="aqDestinationResolver"/>
        <property name="durableSubscriptionName" value="SUBSCRIPTION_NAME"/>
        <property name="subscriptionDurable" value="true"/>
    </bean>

    <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
        <property name="configuration" ref="aqConfiguration"/>
    </bean>

    <bean id="aqDestinationResolver" class="com.example.aqsupport.AqDestinationResolver">
        <property name="ownerName" value="OWNER"/>
    </bean>

    <bean id="oracleAqJdbcDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
        <property name="url" value="jdbc:oracle:thin:host:port:schema"/>
        <property name="username" value="USERNAME"/>
        <property name="password" value="PASSWORD"/>
    </bean>

    <bean id="aqConnectionFactory" class="oracle.jms.AQjmsFactory" factory-method="getQueueConnectionFactory">
        <constructor-arg index="0" ref="oracleAqJdbcDataSource"/>
    </bean>

AqDestinationResolver is DestinationResolver thaht supports AQ's Owner property, actually
there is 1 line of code there:
public class AqDestinationResolver implements DestinationResolver {
    private String ownerName;
    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName;
    }
    public Destination resolveDestinationName(Session session, String destinationName, boolean
pubSubDomain) throws JMSException {
        return ((AQjmsSession) session).getTopic(ownerName, destinationName);
    }
}
AqJmsConfiguration class extends camel' JmsConfiguration class by adding support for custom
MessageListenerContainer, it is needed to support Oracle AQ Payload Factory
public class AqJmsConfiguration extends JmsConfiguration {
    @Override
    public AbstractMessageListenerContainer createMessageListenerContainer(JmsEndpoint endpoint)
{
        AbstractMessageListenerContainer messageListenerContainer = new AqMessageListenerContainer();
        configureMessageListenerContainer(messageListenerContainer, endpoint);
        return messageListenerContainer;
    }
}
and AqMessageListenerContainer is 
public class AqMessageListenerContainer extends DefaultMessageListenerContainer {
    @Override
    protected MessageConsumer createConsumer(Session session, Destination destination) throws
JMSException {
        TopicSubscriber consumer = ((AQjmsSession) session).getDurableSubscriber((Topic) destination,
                getDurableSubscriptionName(), new ExamplePayloadFactory());
        return consumer;
    }
}

Sorry, cannot find related Oracle docs.

      was (Author: mmatveev):
    I'm using Oracle AQ 10.2.0.2, reproduced this error on Windows XP and RHEL 5 linux.

This exception will appear in few different places, namel everywhere where jmsMessage.getReplyTo()
is called. For example in public Map extractHeadersFromJms(Message, Exchange) method in JmsBinding
class (line number 174 in 2.3.0 version):
       map.put("JMSReplyTo", jmsMessage.getJMSReplyTo());

Stacktrace is the following:
org.apache.camel.RuntimeCamelException: oracle.jms.AQjmsException: JMS-102: Feature not supported

	at org.apache.camel.component.jms.JmsBinding.extractHeadersFromJms(JmsBinding.java:181)
	at org.apache.camel.component.jms.JmsMessage.populateInitialHeaders(JmsMessage.java:191)
	at org.apache.camel.impl.DefaultMessage.createHeaders(DefaultMessage.java:178)
	at org.apache.camel.component.jms.JmsMessage.ensureInitialHeaders(JmsMessage.java:176)
	at org.apache.camel.component.jms.JmsMessage.setHeader(JmsMessage.java:152)
	at org.apache.camel.processor.RedeliveryErrorHandler.incrementRedeliveryCounter(RedeliveryErrorHandler.java:524)
	at org.apache.camel.processor.RedeliveryErrorHandler.handleException(RedeliveryErrorHandler.java:294)
	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:101)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:89)
	at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
	at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:75)
	at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:70)
	at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:84)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:543)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
	at java.lang.Thread.run(Thread.java:619)
Caused by: oracle.jms.AQjmsException: JMS-102: Feature not supported 
	at oracle.jms.AQjmsError.throwEx(AQjmsError.java:288)
	at oracle.jms.AQjmsAdtMessage.getJMSReplyTo(AQjmsAdtMessage.java:145)
	at org.apache.camel.component.jms.JmsBinding.extractHeadersFromJms(JmsBinding.java:174)
	... 24 more

I meant Camel JMS Component, not Provider, sorry.

For your reference: similar bug was in Mule framework: http://www.mulesoft.org/jira/browse/MULE-489
and it was fixed by ignoring this exception for Oracle AQ.

Related config is:
<camelContext xmlns="http://camel.apache.org/schema/spring">
        <route>
            <from uri="jms:topic:TOPIC_NAME"/>
            <to uri="mock:result"/>
        </route>
    </camelContext>

    <bean id="aqConfiguration" class="com.example.aqsupport.AqJmsConfiguration">
        <property name="connectionFactory" ref="aqConnectionFactory"/>
        <property name="destinationResolver" ref="aqDestinationResolver"/>
        <property name="durableSubscriptionName" value="SUBSCRIPTION_NAME"/>
        <property name="subscriptionDurable" value="true"/>
    </bean>

    <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
        <property name="configuration" ref="aqConfiguration"/>
    </bean>

    <bean id="aqDestinationResolver" class="com.example.aqsupport.AqDestinationResolver">
        <property name="ownerName" value="OWNER"/>
    </bean>

    <bean id="oracleAqJdbcDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
        <property name="url" value="jdbc:oracle:thin:host:port:schema"/>
        <property name="username" value="USERNAME"/>
        <property name="password" value="PASSWORD"/>
    </bean>

    <bean id="aqConnectionFactory" class="oracle.jms.AQjmsFactory" factory-method="getQueueConnectionFactory">
        <constructor-arg index="0" ref="oracleAqJdbcDataSource"/>
    </bean>

AqDestinationResolver is DestinationResolver thaht supports AQ's Owner property, actually
there is 1 line of code there:
public class AqDestinationResolver implements DestinationResolver {
    private String ownerName;
    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName;
    }
    public Destination resolveDestinationName(Session session, String destinationName, boolean
pubSubDomain) throws JMSException {
        return ((AQjmsSession) session).getTopic(ownerName, destinationName);
    }
}
AqJmsConfiguration class extends camel' JmsConfiguration class by adding support for custom
MessageListenerContainer, it is needed to support Oracle AQ Payload Factory
public class AqJmsConfiguration extends JmsConfiguration {
    @Override
    public AbstractMessageListenerContainer createMessageListenerContainer(JmsEndpoint endpoint)
{
        AbstractMessageListenerContainer messageListenerContainer = new AqMessageListenerContainer();
        configureMessageListenerContainer(messageListenerContainer, endpoint);
        return messageListenerContainer;
    }
}
and AqMessageListenerContainer is 
public class AqMessageListenerContainer extends DefaultMessageListenerContainer {
    @Override
    protected MessageConsumer createConsumer(Session session, Destination destination) throws
JMSException {
        TopicSubscriber consumer = ((AQjmsSession) session).getDurableSubscriber((Topic) destination,
                getDurableSubscriptionName(), new OraOratorQueueMessage());
        return consumer;
    }
}

Sorry, cannot find related Oracle docs.
  
> Oracle AQ does not support the JMSReplyTo property and therefore throws a "JMS-102: Feature
not supported" exception when the JMS provider tries to get it.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2909
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2909
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 2.3.0
>            Reporter: Max Matveev
>
> Oracle AQ does not support the JMSReplyTo property and therefore throws a "JMS-102: Feature
not supported" exception when the JMS provider tries to get it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message