Re: Activemq consumer is closing

2016-12-01 Thread nitinaggarwal
Hi,

I am using apache-activemq-5.14.1 and getting the below issue.

javax.jms.IllegalStateException: The Consumer is closed
at
org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:880)
at
org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:678)
at
org.apache.activemq.jms.pool.PooledMessageConsumer.receiveNoWait(PooledMessageConsumer.java:72)
at
com.irdeto.manager.endpoint.activemq.MessageConsumerManager$2.run(MessageConsumerManager.java:105)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


Can you please tell how did you resolved it or in which file did you make
the change.

Thanks in advance



--
View this message in context: 
http://camel.465427.n5.nabble.com/Activemq-consumer-is-closing-tp5731140p5790912.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Simple IN with empty value in list

2016-12-01 Thread souciance
fails as in gives you an exception or fails as in not the behavior you
expected.

On Thu, Dec 1, 2016 at 11:33 PM, Karts [via Camel] <
ml-node+s465427n5790907...@n5.nabble.com> wrote:

> Hi,
>
> I'm trying to use simple to test for an empty value in a list, so
> something like:
>
> simple("${body.stringValue} in ',gold,silver'")
>
> It doesn't seem to work though, if body.stringValue is '' this fails.
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Simple-IN-with-empty-
> value-in-list-tp5790907.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Simple-IN-with-empty-value-in-list-tp5790907p5790908.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Simple IN with empty value in list

2016-12-01 Thread Karts
Hi,

I'm trying to use simple to test for an empty value in a list, so something
like:

simple("${body.stringValue} in ',gold,silver'")

It doesn't seem to work though, if body.stringValue is '' this fails.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Simple-IN-with-empty-value-in-list-tp5790907.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel body is coming as null to processor

2016-12-01 Thread Josef Ludvíček
Hi,

Claus had good tip with reading Stream twice.

I just wanted to ask - does your  public class DetailsInfoProcessorV2 
implements org.apache.camel.Processor ?
If so, it might be better/readable to "call processor" directly, instead of 
bean invocation.


Cheers, Josef


On Thursday 01 of December 2016 20:57:44 Claus Ibsen wrote:
> Hi
> 
> See this FAQ
> http://camel.apache.org/why-is-my-message-body-empty.html
> 
> On Thu, Dec 1, 2016 at 7:37 PM, reddy.janke  wrote:
> >
> > 
> > 
> >  > logName="com.skandha.eim.air" />
> > 
> > ${body}
> >  > uri="bean:dcDetailsInfoProcessorV2?method=process" />
> > 
> > I am able to print camel body from camel context. But when I am trying to
> > unmarshal through ref or pass to processor Body convert as null and getting
> > below exception.
> >
> > org.apache.camel.TypeConversionException: Error during type conversion from
> > type: org.apache.camel.converter.stream.InputStreamCache to the required
> > type: com.skandha.eim.air.jaxb.v1.AirLowFareSearchRQ with value
> > org.apache.camel.converter.stream.InputStreamCache@bbf9b0a due null
> > at
> > org.apache.camel.converter.jaxb.FallbackTypeConverter.convertTo(FallbackTypeConverter.java:103)
> > at
> > org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:316)
> > at
> > org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:114)
> > at 
> > org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:72)
> > at 
> > org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:47)
> > at
> > com.skandha.eim.air.processor.DcDetailsInfoProcessorV2.process(DcDetailsInfoProcessorV2.java:82)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at 
> > org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:408)
> > at
> > org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:279)
> > at
> > org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:252)
> > at
> > org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:167)
> > at
> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
> > at
> > org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:67)
> > at
> > org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:103)
> > at
> > org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)
> > at
> > org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> > at 
> > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)
> > at
> > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
> > at
> > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
> > at
> > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> > at
> > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> > at
> > org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)
> > at 
> > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)
> > at
> > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
> > at
> > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
> > at
> > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> > at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
> > at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
> > 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.http.CamelServlet.service(CamelServlet.java:144)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> > 

Re: Camel body is coming as null to processor

2016-12-01 Thread Claus Ibsen
Hi

See this FAQ
http://camel.apache.org/why-is-my-message-body-empty.html

On Thu, Dec 1, 2016 at 7:37 PM, reddy.janke  wrote:
>
> 
> 
>  logName="com.skandha.eim.air" />
> 
> ${body}
>  uri="bean:dcDetailsInfoProcessorV2?method=process" />
> 
> I am able to print camel body from camel context. But when I am trying to
> unmarshal through ref or pass to processor Body convert as null and getting
> below exception.
>
> org.apache.camel.TypeConversionException: Error during type conversion from
> type: org.apache.camel.converter.stream.InputStreamCache to the required
> type: com.skandha.eim.air.jaxb.v1.AirLowFareSearchRQ with value
> org.apache.camel.converter.stream.InputStreamCache@bbf9b0a due null
> at
> org.apache.camel.converter.jaxb.FallbackTypeConverter.convertTo(FallbackTypeConverter.java:103)
> at
> org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:316)
> at
> org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:114)
> at 
> org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:72)
> at 
> org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:47)
> at
> com.skandha.eim.air.processor.DcDetailsInfoProcessorV2.process(DcDetailsInfoProcessorV2.java:82)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:408)
> at
> org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:279)
> at
> org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:252)
> at
> org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:167)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
> at
> org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:67)
> at
> org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:103)
> at
> org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)
> at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> at 
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> at
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)
> at 
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
> 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.http.CamelServlet.service(CamelServlet.java:144)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at 
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.apache.camel.component.swagger.RestSwaggerCorsFilter.doFilter(RestSwaggerCorsFilter.scala:44)
> 

Camel body is coming as null to processor

2016-12-01 Thread reddy.janke





${body}


I am able to print camel body from camel context. But when I am trying to
unmarshal through ref or pass to processor Body convert as null and getting
below exception.

org.apache.camel.TypeConversionException: Error during type conversion from
type: org.apache.camel.converter.stream.InputStreamCache to the required
type: com.skandha.eim.air.jaxb.v1.AirLowFareSearchRQ with value
org.apache.camel.converter.stream.InputStreamCache@bbf9b0a due null
at
org.apache.camel.converter.jaxb.FallbackTypeConverter.convertTo(FallbackTypeConverter.java:103)
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:316)
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:114)
at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:72)
at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:47)
at
com.skandha.eim.air.processor.DcDetailsInfoProcessorV2.process(DcDetailsInfoProcessorV2.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:408)
at
org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:279)
at
org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:252)
at
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:167)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
at
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:67)
at
org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:103)
at
org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)
at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
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.http.CamelServlet.service(CamelServlet.java:144)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at 
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.camel.component.swagger.RestSwaggerCorsFilter.doFilter(RestSwaggerCorsFilter.scala:44)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at

Re: camel-jms

2016-12-01 Thread sa_james
See this link
  for
how my problem was solved.
 BAsically, use /main.run()/ instead of /main.start()/



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


Re: Throwing Disconnected Exception with camel-sjms

2016-12-01 Thread sa_james
It seems the  right way
   to
run a camel application is by using /main.run()/ instead of /main.start()/
It solved almost all of my problems.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Throwing-Disconnected-Exception-with-camel-sjms-tp5790882p5790899.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: stand-alone problem

2016-12-01 Thread sa_james
Wow, 
it works. I have been struggling for two days as to why it would all of a
sudden stop working. And to make matter worse, the connect/reconnect from
spring that I reported in  this post
   also started
working.
Thanks a log Claus.
Camel rocks.



--
View this message in context: 
http://camel.465427.n5.nabble.com/stand-alone-problem-tp5790885p5790897.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-jms

2016-12-01 Thread sa_james
Funnily enough, when I swap the activeMQConnectionFactory with
websphereConnectionFactory, spring does the reconnect.
I might be missing something.



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


Re: stand-alone problem

2016-12-01 Thread souciance
Did you look here for an example for how to keep it running forever as a
standalone app?
http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html

On Thu, Dec 1, 2016 at 4:29 PM, sa_james [via Camel] <
ml-node+s465427n5790889...@n5.nabble.com> wrote:

> So If I ditch spring and go back to using setters, everything will be
> fine?
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/stand-alone-problem-
> tp5790885p5790889.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/stand-alone-problem-tp5790885p5790891.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: stand-alone problem

2016-12-01 Thread Claus Ibsen
Use the run method instead of start.

On Thu, Dec 1, 2016 at 4:07 PM, sa_james  wrote:
> Here I am again with a simple test:
>
> /from("jms:queue").to("log:test")/
>
> /   class="org.springframework.jms.connection.CachingConnectionFactory">
>  ref="webSphereConnectionFactory" />
> 
>   /
>
> After I have started the app:
>
>  INFO  Route: route1 started and consuming from: jms://queue
>  INFO  Total 1 routes, of which 1 are started.
>  INFO  Apache Camel 2.18.0 (CamelContext: camel-1) started in 0.481 seconds
>
> Application has now been started. You can press ctrl + c to stop.
>
> Then here the app exits.
>
> Main function as usual:
>
> /Main main = new Main();
> main.setApplicationContextUri("META-INF/spring/camel-context.xml");
> main.start();
> System.out.println("\n\nApplication has now been started. You can
> press ctrl + c to stop.\n\n");/
>
>
> What is happening? Any idea?
> I could not find anything in the mailing list.
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/stand-alone-problem-tp5790885.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: stand-alone problem

2016-12-01 Thread sa_james
So If I ditch spring and go back to using setters, everything will be fine?



--
View this message in context: 
http://camel.465427.n5.nabble.com/stand-alone-problem-tp5790885p5790889.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: stand-alone problem

2016-12-01 Thread souciance
I am not experienced with spring but it seems your context is started and
then there is nothing to keeps it going to so it dies straight away.
Normally with a Main() you need to add code to keep it running forever. Via
blueprint or spring the context is injected..

On Thu, Dec 1, 2016 at 4:23 PM, sa_james [via Camel] <
ml-node+s465427n5790887...@n5.nabble.com> wrote:

> If I set a breakpoint at the last statement, it will consumes messages
> from the queue.
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/stand-alone-problem-
> tp5790885p5790887.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/stand-alone-problem-tp5790885p5790888.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: stand-alone problem

2016-12-01 Thread sa_james
If I set a breakpoint at the last statement, it will consumes messages from
the queue.




--
View this message in context: 
http://camel.465427.n5.nabble.com/stand-alone-problem-tp5790885p5790887.html
Sent from the Camel - Users mailing list archive at Nabble.com.


stand-alone problem

2016-12-01 Thread sa_james
Here I am again with a simple test:

/from("jms:queue").to("log:test")/

/  


  /

After I have started the app:

 INFO  Route: route1 started and consuming from: jms://queue
 INFO  Total 1 routes, of which 1 are started.
 INFO  Apache Camel 2.18.0 (CamelContext: camel-1) started in 0.481 seconds

Application has now been started. You can press ctrl + c to stop.

Then here the app exits.

Main function as usual:

/Main main = new Main();
main.setApplicationContextUri("META-INF/spring/camel-context.xml");
main.start();
System.out.println("\n\nApplication has now been started. You can
press ctrl + c to stop.\n\n");/


What is happening? Any idea?
I could not find anything in the mailing list.






--
View this message in context: 
http://camel.465427.n5.nabble.com/stand-alone-problem-tp5790885.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Durable subscriber on an Oracle Advanced Queue (Topic)

2016-12-01 Thread janssen
Found the solution to our problem.

The problem was caused by a difference in character sets. The database uses
WE8ISO8859P15 which is not directly supported. The difference can cause
issues when setting the subscriber or reading / writing jmsproperties. 
The issue was solved by adding the ojdbc and the orai18n as embedded
dependency of our bundle.

Make sure you add the optional part as well otherwise osgi will not resolve
the bundle. 
 orai18n, ojdbc5, aqapi
 *;resolution:=optional




--
View this message in context: 
http://camel.465427.n5.nabble.com/Durable-subscriber-on-an-Oracle-Advanced-Queue-Topic-tp5790149p5790884.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Throwing Disconnected Exception with camel-sjms

2016-12-01 Thread sa_james
In case you wonder about the route, it is really simple:

/from("jms:TEST")
 .to("log:test")/

Thx.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Throwing-Disconnected-Exception-with-camel-sjms-tp5790882p5790883.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Throwing Disconnected Exception with camel-sjms

2016-12-01 Thread sa_james
The ride continues between camel-jms and camel-sjms

While consuming from a jms-queue, I would like to log exceptions when the
queue has crashed. When I disconnect the queue from the network, camel-sjms
does not thrown any exception. How can I do that? I tried with 
/onException(Exception.class)
.to("log:jms?level=ERROR");/

nothing is showing.

How can I monitor my application in case the server has gone down so that I
can alert the staff of a problem?
Thx.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Throwing-Disconnected-Exception-with-camel-sjms-tp5790882.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-jms

2016-12-01 Thread sa_james

Id did the testing with Spring trying to reconnect to a Websphere and I did
configured the factory as follows:






Sadly it does not reconnect. What I am missing?

Thanks. 



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


Re: camel-jms

2016-12-01 Thread Claus Ibsen
JMS connection pool configurations may have failover / reconnect logic.
As well as JMS clients may have vendor specific features for this,
such as ActiveMQ with the failover url. Other vendors have likely
something similar.
Its not in the JMS spec and thus not a general way of configuring and
setting this up.

So both camel-jms and camel-sjms can do reconnect if you configure it
correctly with your JMS client / connection pool.

On Wed, Nov 30, 2016 at 9:19 PM, Quinn Stevenson
 wrote:
> You’re not missing anything - that’s the way the camel-jms and camel-sjms 
> components work.  They get a connection from the connection factory when they 
> startup, and the keep using it.  You can configure the Camel route to handle 
> some JMS Exceptions and sometimes get the reconnect to work that way.
>
> But the easiest way (and what I usually do) is connect to ActiveMQ using a 
> failover URL.  If you do that, you’ll see the ActiveMQ client trying to 
> reconnect periodically.  You don’t need to have more than one ActiveMQ server 
> in the URL - with one, it will just keep trying to reconnect using the same 
> URL.
>
>> On Nov 30, 2016, at 12:48 PM, sa_james  wrote:
>>
>> What u describe is failover. What I mean is for the client to wait until a
>> machine that went down, comes back up while the client is looping waiting to
>> reconnect.
>> camel-sjms does not even let you know that the connection has been lost.
>> Camel just silently continues to run while the connection is gone. Am I
>> missing something?
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/camel-jms-tp5790832p5790836.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


camel-kafka 2.18.0 KafkaConsumer manual commit

2016-12-01 Thread smalisi
Hi,

i have a camel route consuming from kafka. When an unhandled Exception is
thrown within that route i do not want the kafka offset to be committed.

As a first step i set the autoCommitEnable property to false. This is my
route:

public static final String START_KAFKA_RECEIVER =
"kafka:localhost:9092?topic=test=test-service=earliest=1=false";

from( START_KAFKA_RECEIVER )
.routeId( ROUTE_START_KAFKA_RECEIVER )
.log( "Process received Kafka message." )
.process( new Processor() {
@Override
public void process( Exchange exchange ) throws
Exception {
throw new Exception( "Let the route fail."
);
}
} )

After throwing the exception the offset is committed to Kafka.

https://github.com/apache/camel/blob/master/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
-> Line 149: consumer.commitSync[...]

This is done even if an exception is thrown.

Is this the right way it should work?
Is there any possibility to really manually commit the offsets or just don't
commit if an unhandled exception is thrown?

Thanks for your help.

Regards,
smalisi 



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-kafka-2-18-0-KafkaConsumer-manual-commit-tp5790873.html
Sent from the Camel - Users mailing list archive at Nabble.com.


stand-alone starts and stops after switching to spring

2016-12-01 Thread sa_james
Testing Spring reconnect with camel and I did configured the factory as
follows:






Sadly it does not reconnect. Anyway to achieve this?
Thanks.



--
View this message in context: 
http://camel.465427.n5.nabble.com/stand-alone-starts-and-stops-after-switching-to-spring-tp5790872.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Cassandra 3/CQL 3.4 support for camel-cassandraql component

2016-12-01 Thread Andrea Cosentino
And Camel 2.18.0 is already released.
 --
Andrea Cosentino 
--
Apache Camel PMC Member
Apache Karaf Committer
Apache Servicemix Committer
Email: ancosen1...@yahoo.com
Twitter: @oscerd2
Github: oscerd



On Thursday, December 1, 2016 9:38 AM, Andrea Cosentino  
wrote:
Cassandra 3.x is supported from Camel 2.18.0

The driver used in 2.18.x branch is the 3.1.0
--
Andrea Cosentino 
--
Apache Camel PMC Member
Apache Karaf Committer
Apache Servicemix Committer
Email: ancosen1...@yahoo.com
Twitter: @oscerd2
Github: oscerd




On Thursday, December 1, 2016 9:33 AM, Shoaib Khan  
wrote:
Hi,

Have tried camel from version 2.15.0 to 2.17.3 but have found that it still 
doesn't support Cassandra 3 or CQL version 3.4 yet.
Currently I can see camel-cassandraql component supports Cassandra version 
2.2.x  (Ex - apache-cassandra-2.2.8) and CQL Version 3.3.x (Ex - CQL spec 3.3.1)

Newer version such as Cassandra 3.x (Ex - apache-cassandra-3.9) and CQL Version 
3.4.x (Ex - CQL spec 3.4.2) is not yet supported.

Can we get it supported in the next release or is it already on the roadmap for 
coming releases or so, please advise?





Thanks & Regards,
Shoaib R Khan


Re: Cassandra 3/CQL 3.4 support for camel-cassandraql component

2016-12-01 Thread Andrea Cosentino
Cassandra 3.x is supported from Camel 2.18.0

The driver used in 2.18.x branch is the 3.1.0
 --
Andrea Cosentino 
--
Apache Camel PMC Member
Apache Karaf Committer
Apache Servicemix Committer
Email: ancosen1...@yahoo.com
Twitter: @oscerd2
Github: oscerd



On Thursday, December 1, 2016 9:33 AM, Shoaib Khan  
wrote:
Hi,

Have tried camel from version 2.15.0 to 2.17.3 but have found that it still 
doesn't support Cassandra 3 or CQL version 3.4 yet.
Currently I can see camel-cassandraql component supports Cassandra version 
2.2.x  (Ex - apache-cassandra-2.2.8) and CQL Version 3.3.x (Ex - CQL spec 3.3.1)

Newer version such as Cassandra 3.x (Ex - apache-cassandra-3.9) and CQL Version 
3.4.x (Ex - CQL spec 3.4.2) is not yet supported.

Can we get it supported in the next release or is it already on the roadmap for 
coming releases or so, please advise?





Thanks & Regards,
Shoaib R Khan


Cassandra 3/CQL 3.4 support for camel-cassandraql component

2016-12-01 Thread Shoaib Khan
Hi,

Have tried camel from version 2.15.0 to 2.17.3 but have found that it still 
doesn't support Cassandra 3 or CQL version 3.4 yet.
Currently I can see camel-cassandraql component supports Cassandra version 
2.2.x  (Ex - apache-cassandra-2.2.8) and CQL Version 3.3.x (Ex - CQL spec 3.3.1)

Newer version such as Cassandra 3.x (Ex - apache-cassandra-3.9) and CQL Version 
3.4.x (Ex - CQL spec 3.4.2) is not yet supported.

Can we get it supported in the next release or is it already on the roadmap for 
coming releases or so, please advise?





Thanks & Regards,
Shoaib R Khan



AW: How to use the InOut (Request-Reply) pattern in combination with REST/Jetty?

2016-12-01 Thread Wein, Frank (RRZE)
Hi,
ok, more or less got what was the problem (user mistake): I used SSH port 
forwarding on 61616 for the application/client to be able to connect to 
ActiveMQ (runs on a server that's hidden inside a private network). This does 
not work (of course) because ActiveMQ uses tcp sockets (at least I did in this 
case). I guess the confusing thing was that it was able to send messages to the 
ActiveMQ bus, that is why I did not assume a connection problem at first. 
Lesson learned, case closed!

Frank

Von: Quinn Stevenson [qu...@pronoia-solutions.com]
Gesendet: Mittwoch, 30. November 2016 16:45
An: users@camel.apache.org
Betreff: Re: How to use the InOut (Request-Reply) pattern in combination with 
REST/Jetty?

Strange - the ActiveMQ configuration shouldn’t have anything to do with this.  
What versions of Camel and ActiveMQ are you using?  I’ve had to use 
more/different URI options in the JMS URIs in older versions of Camel - I just 
don’t remember what they are right off hand.

> On Nov 30, 2016, at 3:58 AM, Wein, Frank (RRZE)  wrote:
>
> Hi all,
> just a short update: It looks like I made a mistake on the activemq 
> configuration(?) itself, with an embedded ActiveMQ instance it seems to work 
> fine 
> ("ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false"));).
>  I will take a look at this then. Thanks for everyone who thought about this.
>
> Best regards
> Frank
> 
> Von: Wein, Frank (RRZE) [frank.w...@fau.de]
> Gesendet: Dienstag, 29. November 2016 21:49
> An: users@camel.apache.org
> Betreff: AW: How to use the InOut (Request-Reply) pattern in combination with 
> REST/Jetty?
>
> Hi Claus,
> unfortunately this still results in a the same error message (The OUT message 
> was not received...).
> Route now looks like this, rest of the code stayed the same:
>
>rest("/API/")
>.get("/object/{ID}/")
>.to("direct:objectGet");
>
>from("direct:objectGet").to(ExchangePattern.InOut, "activemq:test");
>
>from("activemq:test").process(resultProcessor);
>
> The message history tells me:
> RouteId  ProcessorId  Processor   
>  Elapsed (ms)
> [route1] [route1] 
> [jetty:http://0.0.0.0:8080/API/object/%7BID%7D?httpMethodRestrict=GET   ] [   
>   21035]
> [route1] [restBinding1  ] [   
>] [ 6]
> [route1] [route1] [direct:objectGet   
>] [ 21019]
> [route2] [to1   ] [activemq:test  
>  ] [ 21018]
>
> So somehow the messages do not get fetched from the activemq bus, do I see 
> this correctly? Could this also be an ActiveMQ configuration problem? I'm a 
> little bit stuck at this point.
>
> Regards
> Frank
> 
> Von: Claus Ibsen [claus.ib...@gmail.com]
> Gesendet: Dienstag, 29. November 2016 18:49
> An: users@camel.apache.org
> Betreff: Re: How to use the InOut (Request-Reply) pattern in combination with 
> REST/Jetty?
>
> Ah you need to break this up into two separate routes
>
>
> from direct foo
>   to activemq test
>
>
> from activemq test
>   process replyProcessor
>
>
> On Tue, Nov 29, 2016 at 6:21 PM, Wein, Frank (RRZE)  wrote:
>> Hi,
>> thanks for the link, unfortunately it still doesn't seem to work. The 
>> Exchange does not receive a reply message:
>> "org.apache.camel.ExchangeTimedOutException: The OUT message was not 
>> received within: 2 millis due reply message with correlationID: 
>> [...]-33309-1480438574020-0-3 not received on destination: 
>> temp-queue://ID:[...]-35217-1480438579489-1:1:1. 
>> Exchange[ID-[...]-33309-1480438574020-0-1]"
>>
>> The incoming messages on the ActiveMQ queue from the REST endpoint end up in 
>> the dead-letter queue:
>> dlqDeliveryFailureCause java.lang.Throwable: Message Expired. 
>> Expiration:1480439266246
>>
>> I tried quite a few things (inOut at different position in the route 
>> description, getIn, getOut, shared queue, ...), but nothing seems to work 
>> (always timeout waiting for the reply). Is it possible at all what I want to 
>> accomplish (reminder: Jetty REST endpoint passes message to queue, other 
>> route fetches from queue, modifies message and the original endpoint should 
>> reply with modified message).
>>
>> Is there a mistake in my current code?
>>
>> Processor resultProcessor = new Processor() {
>>@Override
>>public void process(Exchange exchange) throws Exception {
>>exchange.getIn().setBody( "response");
>>return;
>>}
>>};
>>
>>