You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by mayurd <ma...@yahoo.com> on 2008/04/01 20:48:55 UTC

static configuration versus dynamic configuration

I am trying to port loan-broker example of servicemix-3.2 using non-embedded
servicemix. However i am not successful in writing jms-service-su. When
invoking from client the message can not be sent to jms endpoint and gets
stuck at "Message in = requestor.request(null, out);". The JMS SU xbean.xml
file I am using is 

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       xmlns:lb="http://servicemix.org/demos/loan-broker">

		  <jms:endpoint service="lb:jmsbinding"
                endpoint="loanBrokerJmsBinding"
                targetService="lb:loan-broker"
                targetEndpoint="loanBroker"
                role="consumer"
                connectionFactory="#jmsFactory"
                destinationStyle="queue"
                jmsProviderDestinationName="demo.org.servicemix.source"
                defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />

  <bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
    <property name="connectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="tcp://localhost:61616" />
      </bean>
    </property>
  </bean>

</beans>

On invoking client following appears on servciemix console

ERROR - MultiplexingConsumerProcessor  - Error while handling jms message
java.lang.IllegalArgumentException: JMS message should be a text or bytes
message
        at
org.apache.servicemix.jms.DefaultJmsMarshaler.toXmlInputStream(DefaultJmsMarshaler.java:159)
        at
org.apache.servicemix.jms.DefaultJmsMarshaler.toSOAP(DefaultJmsMarshaler.java:177)
        at
org.apache.servicemix.jms.AbstractJmsProcessor.toNMS(AbstractJmsProcessor.java:168)
        at
org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.access$300(MultiplexingConsumerProcessor
.java:38)
        at
org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor$1.run(MultiplexingConsumerProcessor.java
:89)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)

-- 
View this message in context: http://www.nabble.com/static-configuration-versus-dynamic-configuration-tp16421272p16421272.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: static configuration versus dynamic configuration

Posted by mayurd <ma...@yahoo.com>.
Thanks a lot for quick response. You are right. The message was Map. However
after changing to Text (as XML data in it) it works only 50% of times. Rest
of the time i get
following exception in servicemix console. The message remain on source
queue. Using JMX console i need to purge (resetStatistics()) the message
from source queue to make it run again. 

WARN  - ActiveMQMessageConsumer        - Exception while processing message:
java.lang.NullPointerException
java.lang.NullPointerException
        at
org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.onMessage(MultiplexingConsumerProcessor.
java:82)
        at
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854)
        at
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:99)
        at
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:166)
        at
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:117)
        at
org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
        at
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)

        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:619)



It works fine (Map msg) with embedded servicemix (in loan-broker example).



gnodet wrote:
> 
> Maybe the JMS message is a map message or another kind of JMS message ?
> Try sending a blob of xml as a JMS text message instead .
> 
> On Tue, Apr 1, 2008 at 8:48 PM, mayurd <ma...@yahoo.com> wrote:
> 
>>
>> I am trying to port loan-broker example of servicemix-3.2 using
>> non-embedded
>> servicemix. However i am not successful in writing jms-service-su. When
>> invoking from client the message can not be sent to jms endpoint and gets
>> stuck at "Message in = requestor.request(null, out);". The JMS SU
>> xbean.xml
>> file I am using is
>>
>> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>>       xmlns:lb="http://servicemix.org/demos/loan-broker">
>>
>>                  <jms:endpoint service="lb:jmsbinding"
>>                endpoint="loanBrokerJmsBinding"
>>                targetService="lb:loan-broker"
>>                targetEndpoint="loanBroker"
>>                role="consumer"
>>                connectionFactory="#jmsFactory"
>>                destinationStyle="queue"
>>                jmsProviderDestinationName="demo.org.servicemix.source"
>>                defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />
>>
>>  <bean id="jmsFactory"
>> class="org.apache.activemq.pool.PooledConnectionFactory">
>>    <property name="connectionFactory">
>>      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>>        <property name="brokerURL" value="tcp://localhost:61616" />
>>      </bean>
>>    </property>
>>  </bean>
>>
>> </beans>
>>
>> On invoking client following appears on servciemix console
>>
>> ERROR - MultiplexingConsumerProcessor  - Error while handling jms message
>> java.lang.IllegalArgumentException: JMS message should be a text or bytes
>> message
>>        at
>> org.apache.servicemix.jms.DefaultJmsMarshaler.toXmlInputStream(
>> DefaultJmsMarshaler.java:159)
>>        at
>> org.apache.servicemix.jms.DefaultJmsMarshaler.toSOAP(
>> DefaultJmsMarshaler.java:177)
>>        at
>> org.apache.servicemix.jms.AbstractJmsProcessor.toNMS(
>> AbstractJmsProcessor.java:168)
>>        at
>>
>> org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.access$300
>> (MultiplexingConsumerProcessor
>> .java:38)
>>        at
>> org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor$1.run
>> (MultiplexingConsumerProcessor.java
>> :89)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
>> ThreadPoolExecutor.java:885)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java
>> :907)
>>        at java.lang.Thread.run(Thread.java:619)
>>
>> --
>> View this message in context:
>> http://www.nabble.com/static-configuration-versus-dynamic-configuration-tp16421272p16421272.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/static-configuration-versus-dynamic-configuration-tp16421272p16442212.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: static configuration versus dynamic configuration

Posted by Guillaume Nodet <gn...@gmail.com>.
Maybe the JMS message is a map message or another kind of JMS message ?
Try sending a blob of xml as a JMS text message instead .

On Tue, Apr 1, 2008 at 8:48 PM, mayurd <ma...@yahoo.com> wrote:

>
> I am trying to port loan-broker example of servicemix-3.2 using
> non-embedded
> servicemix. However i am not successful in writing jms-service-su. When
> invoking from client the message can not be sent to jms endpoint and gets
> stuck at "Message in = requestor.request(null, out);". The JMS SU
> xbean.xml
> file I am using is
>
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>       xmlns:lb="http://servicemix.org/demos/loan-broker">
>
>                  <jms:endpoint service="lb:jmsbinding"
>                endpoint="loanBrokerJmsBinding"
>                targetService="lb:loan-broker"
>                targetEndpoint="loanBroker"
>                role="consumer"
>                connectionFactory="#jmsFactory"
>                destinationStyle="queue"
>                jmsProviderDestinationName="demo.org.servicemix.source"
>                defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />
>
>  <bean id="jmsFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>    <property name="connectionFactory">
>      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>        <property name="brokerURL" value="tcp://localhost:61616" />
>      </bean>
>    </property>
>  </bean>
>
> </beans>
>
> On invoking client following appears on servciemix console
>
> ERROR - MultiplexingConsumerProcessor  - Error while handling jms message
> java.lang.IllegalArgumentException: JMS message should be a text or bytes
> message
>        at
> org.apache.servicemix.jms.DefaultJmsMarshaler.toXmlInputStream(
> DefaultJmsMarshaler.java:159)
>        at
> org.apache.servicemix.jms.DefaultJmsMarshaler.toSOAP(
> DefaultJmsMarshaler.java:177)
>        at
> org.apache.servicemix.jms.AbstractJmsProcessor.toNMS(
> AbstractJmsProcessor.java:168)
>        at
>
> org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.access$300
> (MultiplexingConsumerProcessor
> .java:38)
>        at
> org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor$1.run
> (MultiplexingConsumerProcessor.java
> :89)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> ThreadPoolExecutor.java:885)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java
> :907)
>        at java.lang.Thread.run(Thread.java:619)
>
> --
> View this message in context:
> http://www.nabble.com/static-configuration-versus-dynamic-configuration-tp16421272p16421272.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: static configuration versus dynamic configuration

Posted by mayurd <ma...@yahoo.com>.
The attached file has complete source for what I am trying to do. Any help
would be highly appreciated.


mayurd wrote:
> 
> I am trying to port loan-broker example of servicemix-3.2 using
> non-embedded servicemix. However i am not successful in writing
> jms-service-su. When invoking from client the message can not be sent to
> jms endpoint and gets stuck at "Message in = requestor.request(null,
> out);". The JMS SU xbean.xml file I am using is 
> 
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>        xmlns:lb="http://servicemix.org/demos/loan-broker">
> 
> 		  <jms:endpoint service="lb:jmsbinding"
>                 endpoint="loanBrokerJmsBinding"
>                 targetService="lb:loan-broker"
>                 targetEndpoint="loanBroker"
>                 role="consumer"
>                 connectionFactory="#jmsFactory"
>                 destinationStyle="queue"
>                 jmsProviderDestinationName="demo.org.servicemix.source"
>                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />
> 
>   <bean id="jmsFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>     <property name="connectionFactory">
>       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>         <property name="brokerURL" value="tcp://localhost:61616" />
>       </bean>
>     </property>
>   </bean>
> 
> </beans>
> 
> On invoking client following appears on servciemix console
> 
> ERROR - MultiplexingConsumerProcessor  - Error while handling jms message
> java.lang.IllegalArgumentException: JMS message should be a text or bytes
> message
>         at
> org.apache.servicemix.jms.DefaultJmsMarshaler.toXmlInputStream(DefaultJmsMarshaler.java:159)
>         at
> org.apache.servicemix.jms.DefaultJmsMarshaler.toSOAP(DefaultJmsMarshaler.java:177)
>         at
> org.apache.servicemix.jms.AbstractJmsProcessor.toNMS(AbstractJmsProcessor.java:168)
>         at
> org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.access$300(MultiplexingConsumerProcessor
> .java:38)
>         at
> org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor$1.run(MultiplexingConsumerProcessor.java
> :89)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>         at java.lang.Thread.run(Thread.java:619)
> 
> 
http://www.nabble.com/file/p16421930/loan-broker-mayur.zip
loan-broker-mayur.zip 
-- 
View this message in context: http://www.nabble.com/static-configuration-versus-dynamic-configuration-tp16421272p16421930.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.