Re: Camel JMS Exception - Invalid Arguments supplied to JMS method invocation

2010-03-03 Thread zen-master

Thanks for you response. I finally figured out a way for it work, not sure if
it is the right way, but it works. As Claus suggested I started with sending
a TextMessage and then after it was successful then I went on to send a
ObjectMessage. The POJO is serializable. I had to set the headers
specifically for it to work 

from(source-jms-endpoint: + sourceCtxProps.getProperty(destination.type)
+ : + sourceCtxProps.getProperty(destination.name))
.setHeader(JMSCorrelationID, new ConstantExpression(FE-AG Bridge  +
svcName))
.setHeader(JMSType, new ConstantExpression(javax.jms.ObjectMessage))
.to(sink-jms-endpoint: + sinkCtxProps.getProperty(destination.type) +
: + sinkCtxProps.getProperty(destination.name));

I am doing further testing. If there is any other feedback, it is much
appreciated.


Claus Ibsen-2 wrote:
 
 On Wed, Mar 3, 2010 at 5:20 AM, Willem Jiang willem.ji...@gmail.com
 wrote:
 Hi,
 As Tibco and Fiornao support JMS specification, you can use camel-jms to
 bridge these two JMS provider. I think you just need to make sure the
 POJO
 is serializeable, and camel-jms can take care of the rest of work.

 
 Also maybe try with something easier to send such a Hello World
 javax.jms.TextMessage to get the message flow working.
 Then after this you can take a look at sending Objects which usually
 is a bit more tricky to get working.
 
 You should most likely disable Camel to map the message as you just
 want to pass it along, eg. mapJmsMessage=false.
 
 
 Willem
 zen-master wrote:

 We are trying to use Camel to bridge two distinct JMS messaging
 environments
 - Tibco  Fiorano. When we are trying to pass simple POJO across teh
 bridge
 we get a JMS exception, which we are not able to figure out.

 from(source-jms-endpoint: +
 sourceCtxProps.getProperty(destination.type)
 + : + sourceCtxProps.getProperty(destination.name))
                    .to(sink-jms-endpoint: +
 sinkCtxProps.getProperty(destination.type) + : +
 sinkCtxProps.getProperty(destination.name));

 We have tried these 3 options -
 1) With keeping the default camel mapping
 We get a deserilaization exception

 2) using mapJmsMessage=false option
 16:38:08,387 WARN  [DefaultMessageListenerContainer] Execution of JMS
 message listener failed
 org.apache.camel.spring.spi.TransactedRuntimeCamelException:
 org.springframework.jms.UncategorizedJmsException: Uncategorized
 exception
 occured during JMS pro
 cessing; nested exception is fiorano.jms.common.FioranoException:
 Invalid
 Arguments supplied to JMS method invocation

 3) mapJmsMessage=falseuseMessageIDAsCorrelationID=true
 17:05:10,872 WARN  [DefaultMessageListenerContainer] Execution of JMS
 message listener failed
 org.apache.camel.spring.spi.TransactedRuntimeCamelException:
 org.springframework.jms.UncategorizedJmsException: Uncategorized
 exception
 occured during JMS processing; nested exception is
 fiorano.jms.common.FioranoException: Invalid arguments passed to the
 method
 :: Failed to setJMSCorrelationID for messages,the correlationID
 specified
 is
 null


 Can anybody give some pointers on what's going on here ?

 Thanks very much !



 
 
 
 -- 
 Claus Ibsen
 Apache Camel Committer
 
 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus
 
 

-- 
View this message in context: 
http://old.nabble.com/Camel-JMS-Exception---Invalid-Arguments-supplied-to-JMS-method-invocation-tp27758380p27772337.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel JMS Exception - Invalid Arguments supplied to JMS method invocation

2010-03-03 Thread Norman Maurer
BTW you should better use fromF() and toF() to build the endpoint uri ..

Just a side note..

Bye,
Norman

2010/3/3 zen-master as...@genscape.com:

 Thanks for you response. I finally figured out a way for it work, not sure if
 it is the right way, but it works. As Claus suggested I started with sending
 a TextMessage and then after it was successful then I went on to send a
 ObjectMessage. The POJO is serializable. I had to set the headers
 specifically for it to work

 from(source-jms-endpoint: + sourceCtxProps.getProperty(destination.type)
 + : + sourceCtxProps.getProperty(destination.name))
 .setHeader(JMSCorrelationID, new ConstantExpression(FE-AG Bridge  +
 svcName))
 .setHeader(JMSType, new ConstantExpression(javax.jms.ObjectMessage))
 .to(sink-jms-endpoint: + sinkCtxProps.getProperty(destination.type) +
 : + sinkCtxProps.getProperty(destination.name));

 I am doing further testing. If there is any other feedback, it is much
 appreciated.


 Claus Ibsen-2 wrote:

 On Wed, Mar 3, 2010 at 5:20 AM, Willem Jiang willem.ji...@gmail.com
 wrote:
 Hi,
 As Tibco and Fiornao support JMS specification, you can use camel-jms to
 bridge these two JMS provider. I think you just need to make sure the
 POJO
 is serializeable, and camel-jms can take care of the rest of work.


 Also maybe try with something easier to send such a Hello World
 javax.jms.TextMessage to get the message flow working.
 Then after this you can take a look at sending Objects which usually
 is a bit more tricky to get working.

 You should most likely disable Camel to map the message as you just
 want to pass it along, eg. mapJmsMessage=false.


 Willem
 zen-master wrote:

 We are trying to use Camel to bridge two distinct JMS messaging
 environments
 - Tibco  Fiorano. When we are trying to pass simple POJO across teh
 bridge
 we get a JMS exception, which we are not able to figure out.

 from(source-jms-endpoint: +
 sourceCtxProps.getProperty(destination.type)
 + : + sourceCtxProps.getProperty(destination.name))
                    .to(sink-jms-endpoint: +
 sinkCtxProps.getProperty(destination.type) + : +
 sinkCtxProps.getProperty(destination.name));

 We have tried these 3 options -
 1) With keeping the default camel mapping
 We get a deserilaization exception

 2) using mapJmsMessage=false option
 16:38:08,387 WARN  [DefaultMessageListenerContainer] Execution of JMS
 message listener failed
 org.apache.camel.spring.spi.TransactedRuntimeCamelException:
 org.springframework.jms.UncategorizedJmsException: Uncategorized
 exception
 occured during JMS pro
 cessing; nested exception is fiorano.jms.common.FioranoException:
 Invalid
 Arguments supplied to JMS method invocation

 3) mapJmsMessage=falseuseMessageIDAsCorrelationID=true
 17:05:10,872 WARN  [DefaultMessageListenerContainer] Execution of JMS
 message listener failed
 org.apache.camel.spring.spi.TransactedRuntimeCamelException:
 org.springframework.jms.UncategorizedJmsException: Uncategorized
 exception
 occured during JMS processing; nested exception is
 fiorano.jms.common.FioranoException: Invalid arguments passed to the
 method
 :: Failed to setJMSCorrelationID for messages,the correlationID
 specified
 is
 null


 Can anybody give some pointers on what's going on here ?

 Thanks very much !






 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus



 --
 View this message in context: 
 http://old.nabble.com/Camel-JMS-Exception---Invalid-Arguments-supplied-to-JMS-method-invocation-tp27758380p27772337.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




Camel JMS Exception - Invalid Arguments supplied to JMS method invocation

2010-03-02 Thread zen-master

We are trying to use Camel to bridge two distinct JMS messaging environments
- Tibco  Fiorano. When we are trying to pass simple POJO across teh bridge
we get a JMS exception, which we are not able to figure out.

from(source-jms-endpoint: + sourceCtxProps.getProperty(destination.type)
+ : + sourceCtxProps.getProperty(destination.name))
.to(sink-jms-endpoint: +
sinkCtxProps.getProperty(destination.type) + : + 
sinkCtxProps.getProperty(destination.name));

We have tried these 3 options -
1) With keeping the default camel mapping
We get a deserilaization exception

2) using mapJmsMessage=false option
16:38:08,387 WARN  [DefaultMessageListenerContainer] Execution of JMS
message listener failed
org.apache.camel.spring.spi.TransactedRuntimeCamelException:
org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occured during JMS pro
cessing; nested exception is fiorano.jms.common.FioranoException: Invalid
Arguments supplied to JMS method invocation

3) mapJmsMessage=falseuseMessageIDAsCorrelationID=true
17:05:10,872 WARN  [DefaultMessageListenerContainer] Execution of JMS
message listener failed
org.apache.camel.spring.spi.TransactedRuntimeCamelException:
org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occured during JMS processing; nested exception is
fiorano.jms.common.FioranoException: Invalid arguments passed to the method
:: Failed to setJMSCorrelationID for messages,the correlationID specified is
null


Can anybody give some pointers on what's going on here ?

Thanks very much !

-- 
View this message in context: 
http://old.nabble.com/Camel-JMS-Exception---Invalid-Arguments-supplied-to-JMS-method-invocation-tp27758380p27758380.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel JMS Exception - Invalid Arguments supplied to JMS method invocation

2010-03-02 Thread Claus Ibsen
On Wed, Mar 3, 2010 at 5:20 AM, Willem Jiang willem.ji...@gmail.com wrote:
 Hi,
 As Tibco and Fiornao support JMS specification, you can use camel-jms to
 bridge these two JMS provider. I think you just need to make sure the POJO
 is serializeable, and camel-jms can take care of the rest of work.


Also maybe try with something easier to send such a Hello World
javax.jms.TextMessage to get the message flow working.
Then after this you can take a look at sending Objects which usually
is a bit more tricky to get working.

You should most likely disable Camel to map the message as you just
want to pass it along, eg. mapJmsMessage=false.


 Willem
 zen-master wrote:

 We are trying to use Camel to bridge two distinct JMS messaging
 environments
 - Tibco  Fiorano. When we are trying to pass simple POJO across teh
 bridge
 we get a JMS exception, which we are not able to figure out.

 from(source-jms-endpoint: +
 sourceCtxProps.getProperty(destination.type)
 + : + sourceCtxProps.getProperty(destination.name))
                    .to(sink-jms-endpoint: +
 sinkCtxProps.getProperty(destination.type) + : +
 sinkCtxProps.getProperty(destination.name));

 We have tried these 3 options -
 1) With keeping the default camel mapping
 We get a deserilaization exception

 2) using mapJmsMessage=false option
 16:38:08,387 WARN  [DefaultMessageListenerContainer] Execution of JMS
 message listener failed
 org.apache.camel.spring.spi.TransactedRuntimeCamelException:
 org.springframework.jms.UncategorizedJmsException: Uncategorized exception
 occured during JMS pro
 cessing; nested exception is fiorano.jms.common.FioranoException: Invalid
 Arguments supplied to JMS method invocation

 3) mapJmsMessage=falseuseMessageIDAsCorrelationID=true
 17:05:10,872 WARN  [DefaultMessageListenerContainer] Execution of JMS
 message listener failed
 org.apache.camel.spring.spi.TransactedRuntimeCamelException:
 org.springframework.jms.UncategorizedJmsException: Uncategorized exception
 occured during JMS processing; nested exception is
 fiorano.jms.common.FioranoException: Invalid arguments passed to the
 method
 :: Failed to setJMSCorrelationID for messages,the correlationID specified
 is
 null


 Can anybody give some pointers on what's going on here ?

 Thanks very much !






-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: JMS Exception

2009-02-20 Thread onofre
Hi Nivi,

is it possible to get a XML input sample ?

Regards
JB

On Friday 20 February 2009 - 12:42, Nivetha Shri wrote:
 Hi All
 
 Am getting the following exception when i send an xml message to a output
 queue using apache camel and servicemix.
 
 My xml is a valid one
 
 Here is the stack trace:
 
 WARN  - DefaultMessageListenerContainer - Execution of JMS message listener
 failed
 javax.jms.JMSException: Error sending JBI exchange
at
 org.apache.servicemix.jms.endpoints.AbstractConsumerEndpoint.onMessage(AbstractConsumerEndpoint.java:569)
at
 org.apache.servicemix.jms.endpoints.JmsConsumerEndpoint$1.onMessage(JmsConsumerEndpoint.java:446)
at
 org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:506)
at
 org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:463)
at
 org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
at
 org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:322)
at
 org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
at
 org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
at
 org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:868)
at java.lang.Thread.run(Thread.java:595)
 Caused by: java.lang.UnsupportedOperationException: JMS message is not a
 TextMessage
at
 org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler.populateMessage(DefaultConsumerMarshaler.java:104)
at
 org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler.createExchange(DefaultConsumerMarshaler.java:72)
at
 org.apache.servicemix.jms.endpoints.AbstractConsumerEndpoint.onMessage(AbstractConsumerEndpoint.java:536)
... 9 more
 WARN  - JbiBinding - Unable to convert message body of
 type class [Ljava.lang.String; into an XML Source
 
 
 Any insight on this will be very helpful
 
 
 RegardsNivi


JMS Exception

2009-02-19 Thread Nivetha Shri
Hi All

Am getting the following exception when i send an xml message to a output
queue using apache camel and servicemix.

My xml is a valid one

Here is the stack trace:

WARN  - DefaultMessageListenerContainer - Execution of JMS message listener
failed
javax.jms.JMSException: Error sending JBI exchange
   at
org.apache.servicemix.jms.endpoints.AbstractConsumerEndpoint.onMessage(AbstractConsumerEndpoint.java:569)
   at
org.apache.servicemix.jms.endpoints.JmsConsumerEndpoint$1.onMessage(JmsConsumerEndpoint.java:446)
   at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:506)
   at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:463)
   at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
   at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:322)
   at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
   at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
   at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:868)
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.UnsupportedOperationException: JMS message is not a
TextMessage
   at
org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler.populateMessage(DefaultConsumerMarshaler.java:104)
   at
org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler.createExchange(DefaultConsumerMarshaler.java:72)
   at
org.apache.servicemix.jms.endpoints.AbstractConsumerEndpoint.onMessage(AbstractConsumerEndpoint.java:536)
   ... 9 more
WARN  - JbiBinding - Unable to convert message body of
type class [Ljava.lang.String; into an XML Source


Any insight on this will be very helpful


RegardsNivi