Re: What route returns

2018-04-25 Thread Hrvoje Djurdjevic
Hi Zoran,

I replaced the line:

.aggregate(constant(true),new AgrStrat()).completionTimeout(3000)

with:

.end()

and got the expected result. Thank you very much!
The route in short gets called by a rest route, it issues one mq request
based on parameters received from the rest request,
splits the response from the first mq response, and then reissues another
type of mq request per each splitted message,
and finally aggregates all responses and reformats the result to json.

Cheers and stay well,
Hrvoje

On Wed, Apr 25, 2018 at 2:11 PM, Zoran Regvart <zo...@regvart.com> wrote:

> Hi Hrvoje,
> there is an example[1] in the documentation that does something
> similar to what I think you want to do, also in the splitter docs[2]
> there is a note on what the splitter step returns.
>
> Here is a super simple example to illustrate this:
>
> from("timer:tick?period=1s")
> .setBody(constant("a b c"))
> .split(body().tokenize(" "), AggregationStrategies.groupedBody())
> .transform(simple("*${body}*"))
> .end()
> .marshal().json(JsonLibrary.Jackson)
> .log("${body}");
>
> Here the body of `"a b c"` is split on the space token and aggregated
> by the splitter by grouping the body of each child processing into a
> java.util.List, processing is super simple it just converts `"x"` to
> `"*x*"`, next processor after splitter now gets a java.util.List of
> bodies from transform processor, in this example that processor would
> just marshal the java.util.List to JSON array, so the output should be
> `["*a*","*b*","*c*"]`.
>
> I'm not 100% sure I follow the logic of the route you provided, but it
> seems to me that the second JMS processor, i.e. the one followed by
> the `aggregate`, should be nested within the split step.
>
> Just remember that when you use the split step with
> AggregationStrategy it's the split step the one that aggregates the
> results. A while back Torsten Mielke wrote a really good explanation
> on the aggregator[3] that you might want to take a look at.
>
> zoran
>
> [1] https://github.com/apache/camel/blob/master/camel-core/
> src/main/docs/eips/split-eip.adoc#split-aggregate-requestreply-sample
> [2] https://github.com/apache/camel/blob/master/camel-core/
> src/main/docs/eips/split-eip.adoc#what-the-splitter-returns
> [3] https://tmielke.blogspot.de/2009/01/using-camel-
> aggregator-correctly.html
>
> On Tue, Apr 24, 2018 at 5:20 PM, Hrvoje Djurdjevic
> <hrvoje.djurdje...@gmail.com> wrote:
> > Hi,
> >
> > I notice that if I split body without referencing aggregation strategy,
> > like this: split().body()
> > route returns the message like it was before splitting.
> > However, if I reference aggregation strategy in a split call like
> > this: .split(body(),new AggrStrat())
> > then route returns the message after aggregation. However, if I want to
> do
> > further tasks in a route after aggregator, in which I reference the same
> > strategy as in a splitter,
> > such as for example unmarshalling the aggregated message from fixedlength
> > format and marshalling into json, although these tasks were properly
> done,
> > which I can verify by logging body, the REST route that is calling the
> > observed route still receives the aggregated fixedlength message format.
> > So, basically I see json printed in java console, but in postman or
> browser
> > I get fixedlength format.
> > Does that mean that I have to implement conversion from fixedlength to
> json
> > in aggregation strategy class, or there is still a way to do it
> > somehow in a route builder class?
> >
> > The outline of my route is like this:
> >
> > from(getDirectRouteId(id))
> > .routeId(id)
> > .setBody(simple("original request message"))
> >
> > .setHeader("CamelJmsDestinationName",constant("queue://QM_TEST/
> inputq?targetClient=1"))
> >
> > .to(ExchangePattern.InOut,"websphere:queue:SYSTEM.DEFAULT.LOCAL.QUEUE?
> useMessageIDAsCorrelationID=true=REPLYQ")
> > .unmarshal(dataFormat)
> > .split(body(),new AgrStrat()).parallelProcessing()
> > .process(new Processor() {
> > public void process(Exchange exchange) throws Exception {
> > //assemble new mq requests based on the content of splitted
> > response mq message
> >}
> > })
> >
> > .setHeader("CamelJmsDestinationName",constant("queue://QM_TEST/
> inputq?targetClient=1"))
> >
> > .to(ExchangePattern.InOut,"websphere:queue:SYSTEM.DEFAULT.LOCAL.QUEUE?
> useMessageIDAsCorrelationID=true=REPLYQ")
> > .aggregate(constant(true),new AgrStrat()).completionTimeout(
> 3000)
> > .log("${body}")
> > .unmarshal(dataFormat1)
> > .marshal().json(JsonLibrary.Jackson)
> > .log("${body}");
> >
> > AgrStrat basically concatenates the newExchange with the oldExchange,
> > inserting "\n" in between, at the moment.
> > I guess I should move format conversion there? Thank you.
>
>
>
> --
> Zoran Regvart
>


What route returns

2018-04-24 Thread Hrvoje Djurdjevic
Hi,

I notice that if I split body without referencing aggregation strategy,
like this: split().body()
route returns the message like it was before splitting.
However, if I reference aggregation strategy in a split call like
this: .split(body(),new AggrStrat())
then route returns the message after aggregation. However, if I want to do
further tasks in a route after aggregator, in which I reference the same
strategy as in a splitter,
such as for example unmarshalling the aggregated message from fixedlength
format and marshalling into json, although these tasks were properly done,
which I can verify by logging body, the REST route that is calling the
observed route still receives the aggregated fixedlength message format.
So, basically I see json printed in java console, but in postman or browser
I get fixedlength format.
Does that mean that I have to implement conversion from fixedlength to json
in aggregation strategy class, or there is still a way to do it
somehow in a route builder class?

The outline of my route is like this:

from(getDirectRouteId(id))
.routeId(id)
.setBody(simple("original request message"))

.setHeader("CamelJmsDestinationName",constant("queue://QM_TEST/inputq?targetClient=1"))

.to(ExchangePattern.InOut,"websphere:queue:SYSTEM.DEFAULT.LOCAL.QUEUE?useMessageIDAsCorrelationID=true=REPLYQ")
.unmarshal(dataFormat)
.split(body(),new AgrStrat()).parallelProcessing()
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
//assemble new mq requests based on the content of splitted
response mq message
   }
})

.setHeader("CamelJmsDestinationName",constant("queue://QM_TEST/inputq?targetClient=1"))

.to(ExchangePattern.InOut,"websphere:queue:SYSTEM.DEFAULT.LOCAL.QUEUE?useMessageIDAsCorrelationID=true=REPLYQ")
.aggregate(constant(true),new AgrStrat()).completionTimeout(3000)
.log("${body}")
.unmarshal(dataFormat1)
.marshal().json(JsonLibrary.Jackson)
.log("${body}");

AgrStrat basically concatenates the newExchange with the oldExchange,
inserting "\n" in between, at the moment.
I guess I should move format conversion there? Thank you.


Re: How to accomplish with java?

2018-04-13 Thread Hrvoje Djurdjevic
Claus, thank you very much!

On Fri, Apr 13, 2018 at 9:58 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:

> You can turn off trim via
>
> SimpleExpression se = new SimpleExpression("a ");
> se.setTrim(false);
>
> .setBody(se)
>
>
>
> On Fri, Apr 13, 2018 at 9:48 AM, Hrvoje Djurdjevic
> <hrvoje.djurdje...@gmail.com> wrote:
> > Hi,
> >
> > .setBody(simple("a "))
> > .log("body length is ${body.length}")
> >
> > gives me this:
> >
> > body length is 1
> >
> > and I want 2 here, instead of 1, due to a trailing blank, context
> sensitive
> > help within java editor doesn't give me a clue how to suppress trim.
> > I'm using Apache Camel 2.20.1 , thanks in advance.
> >
> > Best regards
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


How to accomplish with java?

2018-04-13 Thread Hrvoje Djurdjevic
Hi,

.setBody(simple("a "))
.log("body length is ${body.length}")

gives me this:

body length is 1

and I want 2 here, instead of 1, due to a trailing blank, context sensitive
help within java editor doesn't give me a clue how to suppress trim.
I'm using Apache Camel 2.20.1 , thanks in advance.

Best regards


Fwd: Please correct ids to be unique among all your routes.

2018-03-28 Thread Hrvoje Djurdjevic
I managed to find out why rest routes seemed to stop working, although I
saw they are correctly started in java console.
I was receiving:

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this
as a fallback.
There was an unexpected error (type=Not Found, status=404). No message
available

The reason is described here:
https://stackoverflow.com/questions/41099262/camel-cant-access-rest-service
So, basically, after excluding Camel auto configuration, I had to
register Camel HTTP Servlet by adding this code to the main spring
application class:

@Bean
public ServletRegistrationBean servletRegistrationBean() {
ServletRegistrationBean registration = new
ServletRegistrationBean(new CamelHttpTransportServlet(), "/*");
registration.setName("CamelServlet");
return registration;
}

After that, everything works OK.

-- Forwarded message ------
From: Hrvoje Djurdjevic <hrvoje.djurdje...@gmail.com>
Date: Fri, Mar 23, 2018 at 6:18 PM
Subject: Re: Please correct ids to be unique among all your routes.
To: users@camel.apache.org


OK, I managed to solve the problem by excluding Camel Auto configuration,
adding this annotation:

@EnableAutoConfiguration(exclude = {CamelAutoConfiguration.class})

Plus, I added this line to application.properties:

camel.springboot.name=MyCamel

, and changed id of camelContext in camel-context.xml to the same value
like this:

http://camel.apache.org/schema/spring;>

Then all routes, rest and direct:  started OK. But I still have to figure
out why they don't seem to work now. Maybe I broke something in the process.


On Fri, Mar 23, 2018 at 4:18 PM, Hrvoje Djurdjevic <
hrvoje.djurdje...@gmail.com> wrote:

> Hi,
>
> I'm using Apache Camel 2.20.1 and spring-boot-1.5.9.RELEASE, besides that
> I see spring-context-4.3.13.RELEASE.jar and spring-beans-4.3.13.RELEASE.jar
> printed in the error stack trace.
> I don't get it, is it possible that I may be adding routes two times, once
> through an explicit Camel Context and second time through an implicit
> default Camel Context?
> I import the configuration for the first by adding this import resource
> annotation:
>
>
> @SpringBootApplication
> //load regular Spring XML file from the classpath that contains the Camel
> XML DSL
> @ImportResource({"classpath:spring/camel-context.xml"})
>
> What files exactly do you want me to send you, that are critical to
> understand my problem? I'd rather avoid sending the whole project.
>
> Error starting ApplicationContext. To display the auto-configuration
> report re-run your application with 'debug' enabled.
> 2018-03-23 15:50:33.398  INFO 10492 --- [   main]
> ationConfigEmbeddedWebApplicationContext : Closing
> org.springframework.boot.context.embedded.AnnotationConfigEm
> beddedWebApplicationContext@70f5f57d: startup date [Fri Mar 23 15:50:32
> CET 2018]; parent: org.springframework.boot.conte
> xt.embedded.AnnotationConfigEmbeddedWebApplicationContext@29ba4338
> 2018-03-23 15:50:33.414 ERROR 10492 --- [   main]
> o.s.boot.SpringApplication   : Application startup failed
>
> org.apache.camel.RuntimeCamelException: 
> org.apache.camel.FailedToStartRouteException:
> Failed to start route rest_getAccounts because of duplicate id detected:
> rest_getAccounts. Please correct ids to be unique among all your routes.
> at 
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1831)
> ~[camel-core-2.20.1.jar:2.20.1]
> at 
> org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:136)
> ~[camel-spring-2.20.1.jar:2.20.1]
> at 
> org.apache.camel.spring.CamelContextFactoryBean.start(CamelContextFactoryBean.java:369)
> ~[camel-spring-2.20.1.jar:2.20.1]
> at org.apache.camel.spring.CamelContextFactoryBean.onApplicatio
> nEvent(CamelContextFactoryBean.java:416) ~[camel-spring-2.20.1.jar:2.20.1]
> at org.apache.camel.spring.CamelContextFactoryBean.onApplicatio
> nEvent(CamelContextFactoryBean.java:94) ~[camel-spring-2.20.1.jar:2.20.1]
> at org.springframework.context.event.SimpleApplicationEventMult
> icaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
> ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.context.event.SimpleApplicationEventMult
> icaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
> ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.context.event.SimpleApplicationEventMult
> icaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
> ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.context.support.AbstractApplicationConte
> xt.publishEvent(AbstractApplicationContext.java:393)
> 

Re: Please correct ids to be unique among all your routes.

2018-03-23 Thread Hrvoje Djurdjevic
OK, I managed to solve the problem by excluding Camel Auto configuration,
adding this annotation:

@EnableAutoConfiguration(exclude = {CamelAutoConfiguration.class})

Plus, I added this line to application.properties:

camel.springboot.name=MyCamel

, and changed id of camelContext in camel-context.xml to the same value
like this:

http://camel.apache.org/schema/spring;>

Then all routes, rest and direct:  started OK. But I still have to figure
out why they don't seem to work now. Maybe I broke something in the process.


On Fri, Mar 23, 2018 at 4:18 PM, Hrvoje Djurdjevic <
hrvoje.djurdje...@gmail.com> wrote:

> Hi,
>
> I'm using Apache Camel 2.20.1 and spring-boot-1.5.9.RELEASE, besides that
> I see spring-context-4.3.13.RELEASE.jar and spring-beans-4.3.13.RELEASE.jar
> printed in the error stack trace.
> I don't get it, is it possible that I may be adding routes two times, once
> through an explicit Camel Context and second time through an implicit
> default Camel Context?
> I import the configuration for the first by adding this import resource
> annotation:
>
>
> @SpringBootApplication
> //load regular Spring XML file from the classpath that contains the Camel
> XML DSL
> @ImportResource({"classpath:spring/camel-context.xml"})
>
> What files exactly do you want me to send you, that are critical to
> understand my problem? I'd rather avoid sending the whole project.
>
> Error starting ApplicationContext. To display the auto-configuration
> report re-run your application with 'debug' enabled.
> 2018-03-23 15:50:33.398  INFO 10492 --- [   main]
> ationConfigEmbeddedWebApplicationContext : Closing
> org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApp
> licationContext@70f5f57d: startup date [Fri Mar 23 15:50:32 CET 2018];
> parent: org.springframework.boot.context.embedded.
> AnnotationConfigEmbeddedWebApplicationContext@29ba4338
> 2018-03-23 15:50:33.414 ERROR 10492 --- [   main]
> o.s.boot.SpringApplication   : Application startup failed
>
> org.apache.camel.RuntimeCamelException: 
> org.apache.camel.FailedToStartRouteException:
> Failed to start route rest_getAccounts because of duplicate id detected:
> rest_getAccounts. Please correct ids to be unique among all your routes.
> at 
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1831)
> ~[camel-core-2.20.1.jar:2.20.1]
> at 
> org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:136)
> ~[camel-spring-2.20.1.jar:2.20.1]
> at org.apache.camel.spring.CamelContextFactoryBean.start(
> CamelContextFactoryBean.java:369) ~[camel-spring-2.20.1.jar:2.20.1]
> at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(
> CamelContextFactoryBean.java:416) ~[camel-spring-2.20.1.jar:2.20.1]
> at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(
> CamelContextFactoryBean.java:94) ~[camel-spring-2.20.1.jar:2.20.1]
> at org.springframework.context.event.SimpleApplicationEventMulticas
> ter.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
> ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.context.event.SimpleApplicationEventMulticas
> ter.invokeListener(SimpleApplicationEventMulticaster.java:165)
> ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.context.event.SimpleApplicationEventMulticas
> ter.multicastEvent(SimpleApplicationEventMulticaster.java:139)
> ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.context.support.AbstractApplicationContext.
> publishEvent(AbstractApplicationContext.java:393) ~[spring-context-4.3.13.
> RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.context.support.AbstractApplicationContext.
> publishEvent(AbstractApplicationContext.java:399) ~[spring-context-4.3.13.
> RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.context.support.AbstractApplicationContext.
> publishEvent(AbstractApplicationContext.java:347) ~[spring-context-4.3.13.
> RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.context.support.AbstractApplicationContext.
> finishRefresh(AbstractApplicationContext.java:883)
> ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.boot.context.embedded.
> EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144)
> ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
> at org.springframework.context.support.AbstractApplicationContext.refresh(
> AbstractApplicationContext.java:546) ~[spring-context-4.3.13.
> RELEASE.jar:4.3.13.RELEASE]
> at org.springframework.boot.context.embedded.
> EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
> ~[spring-boot-1

Re: Please correct ids to be unique among all your routes.

2018-03-23 Thread Hrvoje Djurdjevic
Hi,

I'm using Apache Camel 2.20.1 and spring-boot-1.5.9.RELEASE, besides that I
see spring-context-4.3.13.RELEASE.jar and spring-beans-4.3.13.RELEASE.jar
printed in the error stack trace.
I don't get it, is it possible that I may be adding routes two times, once
through an explicit Camel Context and second time through an implicit
default Camel Context?
I import the configuration for the first by adding this import resource
annotation:


@SpringBootApplication
//load regular Spring XML file from the classpath that contains the Camel
XML DSL
@ImportResource({"classpath:spring/camel-context.xml"})

What files exactly do you want me to send you, that are critical to
understand my problem? I'd rather avoid sending the whole project.

Error starting ApplicationContext. To display the auto-configuration report
re-run your application with 'debug' enabled.
2018-03-23 15:50:33.398  INFO 10492 --- [   main]
ationConfigEmbeddedWebApplicationContext : Closing
org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@70f5f57d:
startup date [Fri Mar 23 15:50:32 CET 2018]; parent:
org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@29ba4338
2018-03-23 15:50:33.414 ERROR 10492 --- [   main]
o.s.boot.SpringApplication   : Application startup failed

org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToStartRouteException: Failed to start route
rest_getAccounts because of duplicate id detected: rest_getAccounts. Please
correct ids to be unique among all your routes.
at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1831)
~[camel-core-2.20.1.jar:2.20.1]
at
org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:136)
~[camel-spring-2.20.1.jar:2.20.1]
at
org.apache.camel.spring.CamelContextFactoryBean.start(CamelContextFactoryBean.java:369)
~[camel-spring-2.20.1.jar:2.20.1]
at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:416)
~[camel-spring-2.20.1.jar:2.20.1]
at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:94)
~[camel-spring-2.20.1.jar:2.20.1]
at
org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:399)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144)
~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at
org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration.createChildManagementContext(EndpointWebMvcAutoConfiguration.java:193)
~[spring-boot-actuator-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at
org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration.afterSingletonsInstantiated(EndpointWebMvcAutoConfiguration.java:156)
~[spring-boot-actuator-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:781)
~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at

AW: Please correct ids to be unique among all your routes.

2018-03-22 Thread Hrvoje Djurdjevic
 Here is the output from java console:

Error starting ApplicationContext. To display the auto-configuration report
re-run your application with 'debug' enabled.
14:52:10.154 [main] INFO
o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext
- Closing org.springframework.boot.context.embedded.AnnotationConfigEm
beddedWebApplicationContext@50f5ad90: startup date [Wed Mar 21 14:52:09 CET
2018]; parent: org.springframework.boot.context.embedded.AnnotationConfigEm
beddedWebApplicationContext@2a9377e
14:52:10.154 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Pausing
ProtocolHandler ["http-nio-0.0.0.0-8082"]
14:52:10.154 [main] INFO  o.a.catalina.core.StandardService - Stopping
service Tomcat
14:52:10.154 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Stopping
ProtocolHandler ["http-nio-0.0.0.0-8082"]
14:52:10.170 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Destroying
ProtocolHandler ["http-nio-0.0.0.0-8082"]
14:52:10.185 [main] ERROR o.s.boot.SpringApplication - Application startup
failed
org.apache.camel.spring.boot.CamelSpringBootInitializationException:
org.apache.camel.FailedToStartRouteException: Failed to start route route1
because of duplicate id detected: route2. Please correct ids to be unique
among all your routes.
at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(
RoutesCollector.java:124)
at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(
RoutesCollector.java:41)
at org.springframework.context.event.SimpleApplicationEventMulticas
ter.invokeListener(SimpleApplicationEventMulticaster.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticas
ter.multicastEvent(SimpleApplicationEventMulticaster.java:138)
at org.springframework.context.support.AbstractApplicationContext.
publishEvent(AbstractApplicationContext.java:382)
at org.springframework.context.support.AbstractApplicationContext.
publishEvent(AbstractApplicationContext.java:336)
at org.springframework.context.support.AbstractApplicationContext.
finishRefresh(AbstractApplicationContext.java:877)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.
finishRefresh(EmbeddedWebApplicationContext.java:144)
at org.springframework.context.support.AbstractApplicationContext.refresh(
AbstractApplicationContext.java:544)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.
refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApp
lication.java:761)
at org.springframework.boot.SpringApplication.refreshContext(Sp
ringApplication.java:371)
at org.springframework.boot.SpringApplication.run(SpringApplica
tion.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplica
tion.java:1186)
at org.springframework.boot.SpringApplication.run(SpringApplica
tion.java:1175)
at org.mycompany.Application.main(Application.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
ssorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(
AbstractRunMojo.java:506)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.camel.FailedToStartRouteException: Failed to start
route route1 because of duplicate id detected: route2. Please correct ids
to be unique among all your routes.
at org.apache.camel.impl.DefaultCamelContext.startRoute(Default
CamelContext.java:1019)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(
DefaultCamelContext.java:3447)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(Defau
ltCamelContext.java:3178)
at org.apache.camel.impl.DefaultCamelContext.access$000(Default
CamelContext.java:184)
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCame
lContext.java:3007)
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCame
lContext.java:3003)
at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(
DefaultCamelContext.java:3026)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCam
elContext.java:3003)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamel
Context.java:2970)
at org.apache.camel.spring.boot.RoutesCollector.maybeStart(Rout
esCollector.java:141)
at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(
RoutesCollector.java:116)
... 21 common frames omitted
14:52:10.185 [main] INFO
o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext
- Closing org.springframework.boot.context.embedded.AnnotationConfigEm
beddedWebApplicationContext@2a9377e: startup date [Wed Mar 21 14:52:01 CET
2018]; root of context hierarchy
14:52:10.185 [main] INFO  o.s.c.s.DefaultLifecycleProcessor - Stopping
beans in phase 0
14:52:10.185 [main] INFO  o.s.b.a.e.jmx.EndpointMBeanExporter -

Please correct ids to be unique among all your routes.

2018-03-20 Thread hrvoje . djurdjevic
Hi,

if I try to build this code:

package org.mycompany;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.model.rest.RestParamType;


public class MyFirstRouterBuilder extends RouteBuilder {
 @Override
public void configure() throws Exception {
try{
restConfiguration().component("servlet");
rest()
.get("/accounts/{accountId}/transactions").id("r1")
.param()
.name("accountId")
.type(RestParamType.path)
.dataType("string")
.required(true)
.endParam()
.to("direct:rest1");
 
from("direct:rest1")
 .log("${body}");
 
}catch(Exception e){

}
 }
}

I receive: 

org.apache.camel.spring.boot.CamelSpringBootInitializationException: 
org.apache.camel.FailedToStartRouteException: Failed to start route r1 
because of duplicate id detected: r1. Please correct ids to be unique 
among all your routes.

If I add .routeId("r2") or .id("r2") to the second route, immediately 
after from("direct:rest1"), nothing changes.

If I remove .id("r1") from the rest get operation, I receive:

org.apache.camel.spring.boot.CamelSpringBootInitializationException: 
org.apache.camel.FailedToStartRouteException: Failed to start route route1 
because of duplicate id detected: route2. Please correct ids to be unique 
among all your routes.

How is this supposed to be written in order to avoid that error?
I inject that into camel context like this:


http://camel.apache.org/schema/spring;>


__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Creating REST API service from yaml

2018-03-06 Thread hrvoje . djurdjevic
OK, I will wait for XML support in 2.21, and in the mean time, I managed 
to utilize RestDslGeneratorTest.java to produce Java REST DSL by dropping 
the unvisible method withGeneratedTime.
Thank you. 
Btw, I'm puzzled about why Nabble forum displayed a new thread and I have 
sent mail with the exactly same subject as before.
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Creating REST API service from yaml

2018-03-05 Thread hrvoje . djurdjevic
Hi Claus, 

thank you for your suggestion. I tried to utilize it, however I can't 
figure out how to do it.
When I tried to compile test java classes found here: 
https://github.com/apache/camel/tree/master/tooling/swagger-rest-dsl-generator/src/test/java/org/apache/camel/generator/swagger
it complains in RestDslXmlGeneratorTest.java about:  "The method 
toXml(Swagger) is undefined for the type RestDslGenerator" , and 
in RestDslGeneratorTest.java it complains about: "The method 
withGeneratedTime(Instant) from the type 
RestDslSourceCodeGenerator is not visible"

When I tried to addjust an existing project's pom.xml, to define a new 
goal of generating restdsl from yaml, add neccesary dependencies for it, 
and I don't know what else is needed,
I received some strange complaint like this: "Plugin execution not covered 
by lifecycle configuration" and I was stuck there.
Do you have somewhere the simplest possible instruction on how to use this 
code generator, please?
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Creating REST API service from yaml

2018-02-25 Thread hrvoje . djurdjevic
Hi, 

is there in Camel or in Fuse a wizard that takes yaml file as input, and 
gives as output a REST DSL skeleton code in Java or Spring XML?
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Re: Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-23 Thread hrvoje . djurdjevic
True that, this works:






http://camel.apache.org/schema/spring;>




. . .
 
This gives >>java.lang.NullPointerException: charset<< (without your fix):

http://camel.apache.org/schema/spring;>

 


. . .
 
This falls apart when message encounters diacritic signs in UTF-8, if 
stream is fixedlength:

http://camel.apache.org/schema/spring;>

 


 
Thank you Claus.
Regards,
Hrvoje
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Re: Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-22 Thread hrvoje . djurdjevic
I tried all possible to set CamelCharsetName property/header/whatever 
manually, in hope it would be used by beanio, but it doesn't work.
I even tried to convert body to ISO-8859-2, which is single byte character 
representation, but whatever I try, unmarshalling fixed length stream with 
beanio fails
as soon as there are diacritic characters in a message, otherwise it is 
OK.





queue://QM_TEST/INPUTQ?targetClient=1




UTF-8


UTF-8











This excludes everything but the first suggestion from the web as a 
possible solution with beanio, I may use something else, or get Red Hat 
support to utilize your fix.


Hrvoje Đurđević
Specijalist

IT
Raiffeisenbank Austria d.d.
Magazinska cesta 69/2, 1 Zagreb
Tel. +385 1 4695 022
Fax. +385 1 4604 907
Mob. +385 98 416 032
www.rba.hr
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Re: Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-22 Thread hrvoje . djurdjevic
This info should be available to jms layer:

https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q032060_.htm

The question is also does camel-beanio use Exchange.CHARSET_NAME property, 
even if properly set to UTF-8?
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Re: Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-22 Thread hrvoje . djurdjevic
I'm looking into it right now, here are some ideas that I found on web:

https://stackoverflow.com/questions/11580248/how-to-set-character-encoding-in-beanio
https://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html#CHARSET_NAME
http://camel.apache.org/string.html

So basically, I would like the last java dsl example rewritten in spring 
xml,

from("jms://queue/order").unmarshal().string("UTF-8").processRef("newOrder");

and I would think that I need to set string to UTF-8 charset before doing 
unmarshal with BeanIO?
There is always an alternative to use something else, like Bindy, but if 
possible I would stick to BeanIO, 
and maybe setting CHARSET_NAME property of Exchange would be an 
alternative way to pass that info to camel-beanio?
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Re: Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-21 Thread hrvoje . djurdjevic
OK, thanks, and I'm sorry I didn't notice your last reply on time, in 
order not to post mine. 
Still, being a newbie, I'm not entirely sure can I have that fix for 
camel-beanio somehow right now?
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-21 Thread hrvoje . djurdjevic
Being a newbie, I managed to have this in my pom.xml:


  org.apache.camel
  camel-core
  2.18.1.redhat-21


  org.apache.camel
  camel-spring-boot-starter
  2.18.1.redhat-21


  org.apache.camel
  camel-jms-starter
  2.18.1.redhat-21


  org.apache.camel
  camel-beanio
  2.20.0.fuse-000120-redhat-1


Most likely the version of camel-beanio library is incompatible with the 
rest of them, or this version doesn't support encoding attribute?
Or did I use a wrong string to define charset with that attribute?
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-21 Thread hrvoje . djurdjevic
Hello,

I tried to use beanio dataFormat attribute encoding, like this




...

but nothing works, I receive:

Stacktrace
---
java.lang.NullPointerException: charset
at java.io.InputStreamReader.(InputStreamReader.java:115)
at 
org.apache.camel.dataformat.beanio.BeanIODataFormat.readModels(BeanIODataFormat.java:150)
at 
org.apache.camel.dataformat.beanio.BeanIODataFormat.unmarshal(BeanIODataFormat.java:119)
at 
org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:69)
at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at 
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:542)
at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
at 
org.apache.camel.processor.Pipeline.access$100(Pipeline.java:44)
at org.apache.camel.processor.Pipeline$1.done(Pipeline.java:138)
at 
org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:257)
at 
org.apache.camel.processor.RedeliveryErrorHandler$2.done(RedeliveryErrorHandler.java:554)
at 
org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:86)
at 
org.apache.camel.processor.SendProcessor$1.done(SendProcessor.java:155)
at 
org.apache.camel.component.jms.reply.ReplyManagerSupport.processReply(ReplyManagerSupport.java:198)
at 
org.apache.camel.component.jms.reply.TemporaryQueueReplyHandler.onReply(TemporaryQueueReplyHandler.java:55)
at 
org.apache.camel.component.jms.reply.QueueReplyManager.handleReplyMessage(QueueReplyManager.java:76)
at 
org.apache.camel.component.jms.reply.ReplyManagerSupport.onMessage(ReplyManagerSupport.java:139)
at 
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:721)
at 
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:681)
at 
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:651)
at 
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:317)
at 
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
at 
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1166)
at 
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1158)
at 
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1055)
at java.lang.Thread.run(Thread.java:748)


Is that a defect, or I don't know how to use it?

Thanks in advance.

Hrvoje
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, 

How to make Camel pattern=“InOut” work with IBM MQ

2018-02-09 Thread hrvoje . djurdjevic
Hello,

can anyone please take a look at this question and answer:

https://stackoverflow.com/questions/48708716/how-to-make-camel-pattern-inout-work-with-ibm-mq

Thank you in advance.

Best regards,
Hrvoje
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.