You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Martin Lichtin <li...@yahoo.com.INVALID> on 2016/03/24 10:39:28 UTC
Internal exception thrown for each call to
producerTemplate.sendBodyAndHeaders
When using a producer template to send messages to a JMS queue, such as
producerTemplate.sendBodyAndHeaders("jms:queue:myQ", body, headers);
we see how this internally always creates an exception:
java.lang.Throwable.<init>(String) line: 267
java.lang.Exception.<init>(String) line: 52
java.net.URISyntaxException.<init>(String, String, int) line: 62
java.net.URI$Parser.fail(String, int) line: 2848
java.net.URI$Parser.checkChars(int, int, long, long, String) line: 3021
java.net.URI$Parser.parseServer(int, int) line: 3245
java.net.URI$Parser.parseAuthority(int, int) line: 3155
java.net.URI$Parser.parseHierarchical(int, int) line: 3097
java.net.URI$Parser.parse(boolean) line: 3053
java.net.URI.<init>(String) line: 588
org.apache.camel.util.URISupport.normalizeUri(String) line: 534
org.apache.camel.impl.DefaultCamelContext.normalizeEndpointUri(String) line: 649
org.apache.camel.impl.EndpointKey.<init>(String) line: 30
org.apache.camel.impl.DefaultCamelContext.getEndpointKey(String) line: 663
org.apache.camel.impl.DefaultCamelContext.getEndpoint(String) line: 539
org.apache.camel.impl.DefaultProducerTemplate.resolveMandatoryEndpoint(String) line: 453
org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(String, Object, Map) line: 229
Could the producer template be used differently to avoid this?
Re: Internal exception thrown for each call to
producerTemplate.sendBodyAndHeaders
Posted by Martin Lichtin <li...@yahoo.com>.
Camel 2.15.5
The exception doesn't bubble to the top, Camel catches and handles this
internally. I see it in the Exception report using Java flight recorder.
Examples of used urls would be
jms:queue:myQ.msgout
or
jms:queue:my_Q.msgout
or
jms:queue:a.b.c.d8101.e
Claus Ibsen-2 wrote
> What version of Camel do you use. And what is the real stacktrace printed
>
> And what is the *actual* url you call. As that plain string should be
> parsable.
>
>
>
> On Thu, Mar 24, 2016 at 10:39 AM, Martin Lichtin
> <
> lichtin@.com
> > wrote:
>> When using a producer template to send messages to a JMS queue, such as
>>
>>
>> producerTemplate.sendBodyAndHeaders("jms:queue:myQ", body,
>> headers);
>>
>> we see how this internally always creates an exception:
>>
>>
>> java.lang.Throwable.
> <init>
> (String) line: 267
>> java.lang.Exception.
> <init>
> (String) line: 52
>> java.net.URISyntaxException.
> <init>
> (String, String, int) line: 62
>> java.net.URI$Parser.fail(String, int) line: 2848
>> java.net.URI$Parser.checkChars(int, int, long, long,
>> String) line: 3021
>> java.net.URI$Parser.parseServer(int, int) line: 3245
>> java.net.URI$Parser.parseAuthority(int, int) line:
>> 3155
>> java.net.URI$Parser.parseHierarchical(int,
>> int) line: 3097
>> java.net.URI$Parser.parse(boolean) line:
>> 3053
>> java.net.URI.
> <init>
> (String) line: 588
>>
>> org.apache.camel.util.URISupport.normalizeUri(String) line: 534
>>
>> org.apache.camel.impl.DefaultCamelContext.normalizeEndpointUri(String)
>> line: 649
>>
>> org.apache.camel.impl.EndpointKey.
> <init>
> (String) line: 30
>>
>> org.apache.camel.impl.DefaultCamelContext.getEndpointKey(String) line:
>> 663
>>
>> org.apache.camel.impl.DefaultCamelContext.getEndpoint(String) line: 539
>>
>> org.apache.camel.impl.DefaultProducerTemplate.resolveMandatoryEndpoint(String)
>> line: 453
>>
>> org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(String,
>> Object, Map) line: 229
>>
>> Could the producer template be used differently to avoid this?
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
--
View this message in context: http://camel.465427.n5.nabble.com/Internal-exception-thrown-for-each-call-to-producerTemplate-sendBodyAndHeaders-tp5779629p5779633.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Internal exception thrown for each call to producerTemplate.sendBodyAndHeaders
Posted by Claus Ibsen <cl...@gmail.com>.
What version of Camel do you use. And what is the real stacktrace printed
And what is the *actual* url you call. As that plain string should be parsable.
On Thu, Mar 24, 2016 at 10:39 AM, Martin Lichtin
<li...@yahoo.com.invalid> wrote:
> When using a producer template to send messages to a JMS queue, such as
>
>
> producerTemplate.sendBodyAndHeaders("jms:queue:myQ", body, headers);
>
> we see how this internally always creates an exception:
>
>
> java.lang.Throwable.<init>(String) line: 267
> java.lang.Exception.<init>(String) line: 52
> java.net.URISyntaxException.<init>(String, String, int) line: 62
> java.net.URI$Parser.fail(String, int) line: 2848
> java.net.URI$Parser.checkChars(int, int, long, long, String) line: 3021
> java.net.URI$Parser.parseServer(int, int) line: 3245
> java.net.URI$Parser.parseAuthority(int, int) line: 3155
> java.net.URI$Parser.parseHierarchical(int, int) line: 3097
> java.net.URI$Parser.parse(boolean) line: 3053
> java.net.URI.<init>(String) line: 588
> org.apache.camel.util.URISupport.normalizeUri(String) line: 534
> org.apache.camel.impl.DefaultCamelContext.normalizeEndpointUri(String) line: 649
> org.apache.camel.impl.EndpointKey.<init>(String) line: 30
> org.apache.camel.impl.DefaultCamelContext.getEndpointKey(String) line: 663
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(String) line: 539
> org.apache.camel.impl.DefaultProducerTemplate.resolveMandatoryEndpoint(String) line: 453
> org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(String, Object, Map) line: 229
>
> Could the producer template be used differently to avoid this?
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2