Re: Unable to send text in mail body other than English using Camel mail

2015-01-14 Thread Claus Ibsen
Hi

It sounds like you need to set encoding to a charset for japanese characters.
I think you set that as part of the content-type header.

On Wed, Jan 14, 2015 at 3:50 PM, Mithu Tokder mithutok...@gmail.com wrote:
 Hi All,
 I have developed a mail functionality to send mail. User can put any text
 like English, Japanese or other text. When the mail body is in english mail
 successfully sent, but if the body is other that english then the mail sent
 to the receiver as  in mail body.

 Is there any way to send mail with japanese text in mail body.
 I am sending mail body as HTML markup.

 Any help is appropriated.

 Thanks in advance.

 Regards,
 Mithu Tokder



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Camel WebSocket WsEndpoint not forwarding messages

2015-01-14 Thread Aki Yoshida
I didn't see the from endpoint using ahc-ws in your description, so I
thought you didn't have the corresponding inbound ahc-ws endpoint. If you
have one and it is working when your server-side ws is jetty and not
working whe it is netty, we need to find out if and how the server is
writing back on the socket. Sorry for my delay in responding. If the debug
trace doesn't generate enough info, is it possible for you to debug the
code?
Thanks.
Aki


On Tuesday, January 6, 2015, SUNIL sunilkai...@gmail.com wrote:

 Additional Info: Am receiving message till WsEndpoint class but not to my
 from endpoint class.


 below is the log message :

 *[New I/O worker #19] WsEndpoint INFO
 received message -- my external WebSocket *



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Camel-WebSocket-WsEndpoint-not-forwarding-messages-tp5760996p5761345.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Unable to send text in mail body other than English using Camel mail

2015-01-14 Thread Mithu Tokder
Hi All,
I have developed a mail functionality to send mail. User can put any text
like English, Japanese or other text. When the mail body is in english mail
successfully sent, but if the body is other that english then the mail sent
to the receiver as  in mail body.

Is there any way to send mail with japanese text in mail body.
I am sending mail body as HTML markup.

Any help is appropriated.

Thanks in advance.

Regards,
Mithu Tokder


Re: http client - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

2015-01-14 Thread salemi
Thank you for your respond.

Below is how it can be done.

public MyHttpClientConfigurer implements HttpClientConfigurer{

void configureHttpClient(org.apache.http.impl.client.HttpClientBuilder
clientBuilder){
  SSLContext sslContext = SSLUtilityFactory.createSSLContext(); 
  clientBuilder.setSSLContext(sslContext);
}


bean id=myHttpClientConfigurer class=MyHttpClientConfigurer/

 
to
uri=https4://myhostname.com:443/myURL?httpClientConfigurer=myHttpClientConfigurer/



-
Alireza Salemi
--
View this message in context: 
http://camel.465427.n5.nabble.com/http-client-javax-net-ssl-SSLHandshakeException-Received-fatal-alert-handshake-failure-tp5761469p5761706.html
Sent from the Camel - Users mailing list archive at Nabble.com.


EventNotifierSupport in OSGI environment

2015-01-14 Thread Niels
Hey all,

I'm trying to setup a custom EventNotifierSupport within a OSGI environment
Karaf 2.3.6 and Camel 2.13.2.
Before I tried to create it in an OSGI setup I tried a local stand alone
application with a simple camel context with succes.

However now I'm creating a bean in my blueprint file with my custom
EventNotifierSupport class. The Karaf/camel log notifies me that a custom
EventNotifier is found a being used by my camel context.

But despite many efforts to log anything or debugging with breakpoints, not
a thing is captured. This is how my context looks like:

?xml version=1.0 encoding=UTF-8?
blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://www.osgi.org/xmlns/blueprint/v1.0.0
   http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;

bean class=nl.kabisa.flux.transactions.FluxEventLogger
property name=ttl value=24/
/bean

camelContext id=ID_54b681bd4e69651dd401
xmlns=http://camel.apache.org/schema/blueprint; useMDCLogging=true
streamCache=true
  streamCaching id=streamCacheConfig spoolThreshold=0
spoolDirectory=tmp/camelcontext-#camelId#
spoolUsedHeapMemoryThreshold=70/

  route
from
uri=file:/tmp/in?autoCreate=trueamp;charset=utf-8amp;delay=500amp;delete=falseamp;initialDelay=1000amp;recursive=false/
to uri=activemq:ID_2/
  /route
  route
from uri=activemq:ID_2/
to
uri=file:/tmp/out?autoCreate=trueamp;charset=utf-8amp;fileExist=Override/
  /route
/camelContext

Thanks,

Niels



--
View this message in context: 
http://camel.465427.n5.nabble.com/EventNotifierSupport-in-OSGI-environment-tp5761701.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Exchange property cannot be removed in method call

2015-01-14 Thread horyna
Hi,

using Camel 2.13.2. Problem:
.setProperty(meProperty, some old value)
.choice()
.when(method(this, removeMeProperty))
.process(new Processor() {

@Override
public void process(Exchange exchange) 
throws Exception {
Object obj = 
exchange.getProperty(meProperty);
// !!! meProperty has still old value. She was not removed from
exch.properties. Where is this behavior described?
// I can only set another value (not null) inside removeMeProperty, than obj
contains a set value
}
})

public boolean removeMeProperty(Exchange exch) {
   exch.setProperty(meProperty, null);
   return true;
}




--
View this message in context: 
http://camel.465427.n5.nabble.com/Exchange-property-cannot-be-removed-in-method-call-tp5761667.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Exchange property cannot be removed in method call

2015-01-14 Thread Claus Ibsen
 .when(method(this, removeMeProperty))

is a predicate and it should not cause side effects.
Therefore its only for returning a boolean value, not changing messages

If you want to remove a property on the exchange use .removeProperty
or use a message transformation

On Wed, Jan 14, 2015 at 9:51 AM, horyna phoffic...@centrum.cz wrote:
 Hi,

 using Camel 2.13.2. Problem:
 .setProperty(meProperty, some old value)
 .choice()
 .when(method(this, removeMeProperty))
 .process(new Processor() {

 @Override
 public void process(Exchange 
 exchange) throws Exception {
 Object obj = 
 exchange.getProperty(meProperty);
 // !!! meProperty has still old value. She was not removed from
 exch.properties. Where is this behavior described?
 // I can only set another value (not null) inside removeMeProperty, than obj
 contains a set value
 }
 })
 
 public boolean removeMeProperty(Exchange exch) {
exch.setProperty(meProperty, null);
return true;
 }




 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Exchange-property-cannot-be-removed-in-method-call-tp5761667.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Camel jms listener on JMSReplyTo bahaviour

2015-01-14 Thread Ettoregia
Hi contactreji,

thanks for your reply.

I'm getting my response back through http with 200, but that is just an ACK.
The point is, once the Camel rest consumer received the msg, that same msg
is produced to a JMS queue, where an external application will read the
message and at some point will send back a response given that I changed the
MEP to InOut.
Now, the external app should use the random replyTo value to send the
response back, and that is my question, how do I retrieve that response? If
Camel instantiate a listener on the replyTo destination, how I get hold of
msg returned on the replyTo dest?

I report the second part of my question here for easier readability:
-
On a slightly different note, how would you implement a scenario where a 
dynamic replyTo should be used? I mean from  here 

http://camel.465427.n5.nabble.com/set-jms-reply-to-in-message-header-td4420767.html
 
I got to know that Camel, and with good reason, does not implement that 
feature, but it seems to me that the replyTo is meaningless then. 
 
 If I want to send a msg using a Rest PUT, where a camel rest consumer
 would 
 read it, pass to a processor, and then sent a response back to myself on a 
 destination specified by the JMSReplyTo, how'd go with this? 
-



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-jms-listener-on-JMSReplyTo-bahaviour-tp5761654p5761669.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Data Corruption in SFTP in Parallel Multicast branches

2015-01-14 Thread Siano, Stephan
Hi,

I have had a look into the source code:

If you look into the StreamCacheConverter an InputSteam will create a 
StreamCache object by copying the data to a CachedOutputStream and then calling 
the newStreamCache() method. That will generate a FileInputStreamCache or a 
ByteArrayStreamCache. Both classes are StreamCache and InputStream at the same 
time, so if the StreamCache is converted to an InputStream the instance itself 
is returned.

In the parallel multicast case (and probably also in the splitter), having a 
StreamCache before the split will result in all branches getting the same 
InputStream instance (which will lead to a pretty garbled output if two threads 
are reading from it at the same time).

I see two potential ways how to resolve this issue:
One way would be to change the StreamCache instances to not implement 
InputStream, but to provide a type converter to InputStream which will generate 
a new InputSteam for each consumer.

The other way would be copy the StreamCache instance in case of a multicast.

What do you think would be the better solution?

Best regards
Stephan

-Original Message-
From: lakshmi.prashant [mailto:lakshmi.prash...@gmail.com] 
Sent: Mittwoch, 14. Januar 2015 12:43
To: users@camel.apache.org
Subject: Data Corruption in SFTP in Parallel Multicast branches

Hi,

 •  In case if there are SFTP receivers at the end of the branch(es) of
Parallel Multicast, the payload gets corrupted in 1 or more branches.
 oAny 1 branch / Some SFTP receivers may not receive the full data in
the respective SFTP file(s).

 
While validating it with a simple example (SFTP-parallel multicast-2*SFTP
in 2 different branches): A test with a large payload showed that both
receiver files were created but as soon as one is finished the other one
stops too. This already indicates that there are no two different streams
that are processed but just one stream that is handed to the SFTP endpoints. 


Even the trace log showed that if there is cache output stream, the same was
used by the SFTP receivers / endpoints in both the branches:

*Debug Trace:*
2015 01 13
08:45:21#+00#DEBUG#org.apache.camel.component.file.remote.SftpOperations##anonymous#Camel
(Test_Multicast) thread #7 - Multicast##avatarmercury#itjkmerct1#ifl##About
to store file: rec2 using stream:
*org.apache.camel.converter.stream.FileInputStreamCache@11ef331a|*
2015 01 13
08:45:21#+00#DEBUG#org.apache.camel.component.file.remote.SftpOperations##anonymous#Camel
(Test_Multicast) thread #6 - Multicast##avatarmercury#itjkmerct1#ifl##*About
to store file: rec1 using stream:
org.apache.camel.converter.stream.FileInputStreamCache@11ef331a|*


Both use the same stream instance. 
MulticastProcessor.createProcessorExchangePairs seems to create the copies.
The copying is based on Exchange.copy and Message.copy. Message.copy does
not copy the streams which is required for the mulicast to work properly
with streams. 

We could circumvent the issue, if we convert the payload / body  from cache
outputstream to byte[] before the multicast  or just before the SFTP
endpoints in the multicast branches (i.e. using  ${in.bodyAs(byte[])} 
within camel:simple ). 

This problem does not come in Sequential multicast.

Can you please let us knoiw if this is an issue 9or) already fixed?

Thanks,
Lakshmi







--
View this message in context: 
http://camel.465427.n5.nabble.com/Data-Corruption-in-SFTP-in-Parallel-Multicast-branches-tp5761673.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Retrieve route (object) of endpoint passed by EventObject

2015-01-14 Thread Niels
Hey all,

I'm implementing a custom EventNotifierSupport to capture events in my camel
context. 
So when I receive an EventObject I want to find out which route the endpoint
passed by EventObject belongs to. But at this point I can't find any obvious
way of retrieving a association between endpoint and route. While I can
almost with 100% certainty can tell this information should be available.

I know I have a lot of information available in the EventObject and have
acces to the camelcontext. But I guess I'm blinded by all that information.
Could anybody give me some pointers?

Thanks,

Niels




--
View this message in context: 
http://camel.465427.n5.nabble.com/Retrieve-route-object-of-endpoint-passed-by-EventObject-tp5761674.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Retrieve route (object) of endpoint passed by EventObject

2015-01-14 Thread Niels
By lookup the source code you mentioned for the ExpressionBuilder I was able
to figure out what I needed!

Thanks very much, I appreciated you helping me out!




--
View this message in context: 
http://camel.465427.n5.nabble.com/Retrieve-route-object-of-endpoint-passed-by-EventObject-tp5761674p5761679.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-Netty ReadTimeout event not trigerred

2015-01-14 Thread Willem Jiang
I guess you want to handle the ReadTimeout exception in your decoder.
As we just add the ReadTimeoutHandler after the customer decoder and encoder, 
your decoder may not get the exception as you want.

The issue could be fixed by applying the ReadTimeoutHandler at the first place.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 14, 2015 at 8:57:06 PM, V4Vaithi (alagappan.i...@gmail.com) wrote:
 ReadTimeout event is not triggered properly after adding custom
 encoder/decoder to endpoint.
  
 I am using DelimiterBasedFrameDecoder  StringEncoder as custom codecs.
  
 My Route Confuiguration is as follows
  
  
  uri=bean:messageLogger?method=log /  
  uri=netty:tcp://127.0.0.21:2626?decoders=#stxEtxDecoder,#byteToStringe‌​ncoders=#stxEtxEncodersync=truerequestTimeout=5000

 /  
  
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-Netty-ReadTimeout-event-not-trigerred-tp5761676.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: How to identify channel initialization in camel-netty

2015-01-14 Thread Willem Jiang
If you look up the calling reference of 
DefaultClientPipelineFactory.getPipeline() and 
DefaultServerPipelineFactory.getPipeline(), you should be able to find out the 
channel initialisation there.

You should create a new ChannelHandler in the ChannelHandlerFactory to avoid 
using encoders  decoders in parallel.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 14, 2015 at 8:57:16 PM, V4Vaithi (alagappan.i...@gmail.com) wrote:
 How to identify new channel initialization in camel-netty?
  
 If i am going to use ChannelHandler then is it possible to use encoders 
 decoders in parallel?
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/How-to-identify-channel-initialization-in-camel-netty-tp5761677.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Data Corruption in SFTP in Parallel Multicast branches

2015-01-14 Thread lakshmi.prashant
Hi,

 •  In case if there are SFTP receivers at the end of the branch(es) of
Parallel Multicast, the payload gets corrupted in 1 or more branches.
 oAny 1 branch / Some SFTP receivers may not receive the full data in
the respective SFTP file(s).

 
While validating it with a simple example (SFTP-parallel multicast-2*SFTP
in 2 different branches): A test with a large payload showed that both
receiver files were created but as soon as one is finished the other one
stops too. This already indicates that there are no two different streams
that are processed but just one stream that is handed to the SFTP endpoints. 


Even the trace log showed that if there is cache output stream, the same was
used by the SFTP receivers / endpoints in both the branches:

*Debug Trace:*
2015 01 13
08:45:21#+00#DEBUG#org.apache.camel.component.file.remote.SftpOperations##anonymous#Camel
(Test_Multicast) thread #7 - Multicast##avatarmercury#itjkmerct1#ifl##About
to store file: rec2 using stream:
*org.apache.camel.converter.stream.FileInputStreamCache@11ef331a|*
2015 01 13
08:45:21#+00#DEBUG#org.apache.camel.component.file.remote.SftpOperations##anonymous#Camel
(Test_Multicast) thread #6 - Multicast##avatarmercury#itjkmerct1#ifl##*About
to store file: rec1 using stream:
org.apache.camel.converter.stream.FileInputStreamCache@11ef331a|*


Both use the same stream instance. 
MulticastProcessor.createProcessorExchangePairs seems to create the copies.
The copying is based on Exchange.copy and Message.copy. Message.copy does
not copy the streams which is required for the mulicast to work properly
with streams. 

We could circumvent the issue, if we convert the payload / body  from cache
outputstream to byte[] before the multicast  or just before the SFTP
endpoints in the multicast branches (i.e. using  ${in.bodyAs(byte[])} 
within camel:simple ). 

This problem does not come in Sequential multicast.

Can you please let us knoiw if this is an issue 9or) already fixed?

Thanks,
Lakshmi







--
View this message in context: 
http://camel.465427.n5.nabble.com/Data-Corruption-in-SFTP-in-Parallel-Multicast-branches-tp5761673.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Retrieve route (object) of endpoint passed by EventObject

2015-01-14 Thread Claus Ibsen
Hi

You can get the information from the exchange itself.

See how the routeId expression is implemented in the source code
org.apache.camel.builder.ExpressionBuilder#routeIdExpression

An alternative is the message history which you can also get form the exchange
http://camel.apache.org/message-history

On Wed, Jan 14, 2015 at 12:48 PM, Niels ni...@kabisa.nl wrote:
 Hey all,

 I'm implementing a custom EventNotifierSupport to capture events in my camel
 context.
 So when I receive an EventObject I want to find out which route the endpoint
 passed by EventObject belongs to. But at this point I can't find any obvious
 way of retrieving a association between endpoint and route. While I can
 almost with 100% certainty can tell this information should be available.

 I know I have a lot of information available in the EventObject and have
 acces to the camelcontext. But I guess I'm blinded by all that information.
 Could anybody give me some pointers?

 Thanks,

 Niels




 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Retrieve-route-object-of-endpoint-passed-by-EventObject-tp5761674.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Camel-Netty ReadTimeout event not trigerred

2015-01-14 Thread V4Vaithi
ReadTimeout event is not triggered properly after adding custom
encoder/decoder to endpoint. 

I am using DelimiterBasedFrameDecoder  StringEncoder as custom codecs. 

My Route Confuiguration is as follows 

route id=route1 from uri=wmq:queue:queue1?disableReplyTo=true /
process ref=byteResponseMessage / to
uri=bean:messageLogger?method=log / to
uri=netty:tcp://127.0.0.21:2626?decoders=#stxEtxDecoder,#byteToStringamp;e‌​ncoders=#stxEtxEncoderamp;sync=trueamp;requestTimeout=5000
/ to uri=bean:messageLogger?method=fromlog / process ref=validate/
/route



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Netty-ReadTimeout-event-not-trigerred-tp5761676.html
Sent from the Camel - Users mailing list archive at Nabble.com.


How to identify channel initialization in camel-netty

2015-01-14 Thread V4Vaithi
How to identify new channel initialization in camel-netty? 

If i am going to use ChannelHandler then  is it possible to use encoders 
decoders in parallel? 



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-identify-channel-initialization-in-camel-netty-tp5761677.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Where is logName used?

2015-01-14 Thread Willem Jiang
The “com.foo.server.ngw.router” is the log name to use, I’m not sure why the 
“org.slf4j.helpers.MarkerIgnoringBase” is used. Can you double check your log 
configuration to make sure you setup the log rightly?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 13, 2015 at 6:17:48 PM, James Green (james.mk.gr...@gmail.com) wrote:
 The following code:
  
 .log(LoggingLevel.ERROR, com.foo.server.ngw.router,
 Account Not Found. Message discarded.).stop();
  
 Results in the following in the log:
  
 10:12:11,690 ERROR org.slf4j.helpers.MarkerIgnoringBase:145 error() -
 Account Not Found. Message discarded.
  
 I was expecting to see com.foo.server.ngw.router somewhere above? Not sure
 what else it is supplied for..?
  
 James
  



Re: onException is ignored

2015-01-14 Thread Willem Jiang
I just saw the org.slf4j.helpers.MarkerIgnoringBase is use to write the warning 
and error message. I guess it may relate to your log configuration.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 12, 2015 at 10:41:43 PM, James Green (james.mk.gr...@gmail.com) 
wrote:
 Mea culpa. Who knew AccountNumberFoundException was part of
 javax.security..! Fixed the import, the onException now executes.
  
 However, the .log line:
 .log(LoggingLevel.ERROR, com.foo.server.ngw, Account Not
 Found. Message discarded.).stop();
  
 Actually writes the line:
  
 14:22:03,993 ERROR org.slf4j.helpers.MarkerIgnoringBase:145 error() -
 Account Not Found. Message discarded.
  
 So what was the point of supplying a logName?
  
  
 On 12 January 2015 at 12:05, James Green wrote:
  
  As suggested:
 
  errorHandler(transactionErrorHandler().maximumRedeliveries(3));
  onException(AccountNotFoundException.class)
  .log(LoggingLevel.ERROR, com.foo.server.ngw, Account
  Not Found. Message discarded.).stop();
 
 
  from(source())
  .transacted()
  .unmarshal(jacksonUnmarshall)
  .process(router)
  .recipientList(simple(${body.media}));
 
  I can see Camel attempt redelivery three times as a result of catching
  AccountNotFoundException. After the fourth and final attempt fails I can't
  actually see much different to that logged for the previous three attempts.
  I've kept the reporting down to what I hope is pertinent below:
 
  10:32:23,885 ERROR org.slf4j.helpers.MarkerIgnoringBase:161 error() -
  Failed delivery for (MessageId:
  queue_inbound_ID_JGREENWIN7-54570-142105884-3_1_1_1_3 on ExchangeId:  
  ID-JGREENWIN7-54739-1421058738390-0-6). Exhausted after delivery attempt: 4 
   
  caught: com.foo.server.ngw.router.AccountNotFoundException: Account not
  found
  ...
  10:32:23,932 WARN org.apache.camel.spring.spi.TransactionErrorHandler:287  
  logTransactionRollback() - Transaction rollback (0x2017df6a)
  redelivered(true) for (MessageId:
  ID:JGREENWIN7-54570-142105884-3:1:1:1:3 on ExchangeId:
  ID-JGREENWIN7-54739-1421058738390-0-7) caught:
  com.foo.server.ngw.router.AccountNotFoundException: Account not found
  10:32:23,932 WARN org.slf4j.helpers.MarkerIgnoringBase:136 warn() -
  Execution of JMS message listener failed. Caused by:
  [org.apache.camel.RuntimeCamelException -
  com.foo.server.ngw.router.AccountNotFoundException: Account not found]
  org.apache.camel.RuntimeCamelException:
  com.foo.server.ngw.router.AccountNotFoundException: Account not found
  at
  org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1364)

  at
  org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:188)

  at
  org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34)

  at
  org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)

  at
  org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:174)

  at
  org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:134)

  at
  org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:103)

  at
  org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:112)

  at
  org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

  at
  org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

  at
  org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)

  at
  org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)

  at
  org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)

  at
  org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)

  at
  org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)

  at
  org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)

  at
  org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)

  at
  org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:243)

  at
  org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101)

  at
  

Re: Intermittent error: No content to map due to end-of-input

2015-01-14 Thread Willem Jiang
When you convert the message into String, the message can be read more than 
once.
When you reset the stream cache, you can read the message again.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 14, 2015 at 10:21:47 AM, shanaloh (shana...@gmail.com) wrote:
 I read this thread and added convertBodyTo(String.class) after the wiretap
 and before unmarshal(). the error is gone.
  
 http://t166678.apache-camel-user.apacheforum.info/wiretap-problem-t166678.html
   
  
 any idea why a convert to string will resolve the issue?
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Intermittent-error-No-content-to-map-due-to-end-of-input-tp5760725p5761661.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.