Re: Camel zookeeper is not creating the znode

2015-11-06 Thread drmaas
Similar issue with this uri:

String fullUri =
"zookeeper:${kafkaProperties.zookeeperConnect}${endpoint.lockNode}?create=true&createMode=EPHEMERAL_SEQUENTIAL&repeat=true"

Logs:

{"@timestamp":"2015-11-06T15:19:15.026-06:00","@version":1,"message":"Node
'/imn_loader-v1/delta-test-foo/3c15c2ccbe24.com-625f789b-8809-482f-b86f-e062dd0356aa'
did not exist, creating
it.","logger_name":"org.apache.camel.component.zookeeper.ZookeeperProducer","thread_name":"Camel
(camel-1) thread #3 -
timer://products-imn-delta-mainframe-checker","level":"WARN","level_value":3,"HOSTNAME":"3c15c2ccbe24"}


{"@timestamp":"2015-11-06T15:19:15.144-06:00","@version":1,"message":"Error
setting up election node
/imn_loader-v1/delta-test-foo/3c15c2ccbe24.com-625f789b-8809-482f-b86f-e062dd0356aa","logger_name":"org.apache.camel.component.zookeeper.policy.ZooKeeperElection","thread_name":"Camel
(camel-1) thread #3 -
timer://products-imn-delta-mainframe-checker","level":"ERROR","level_value":4,"stack_trace":"org.apache.zookeeper.KeeperException$NoNodeException:
KeeperErrorCode = NoNode for
/imn_loader-v1/delta-test-foo/3c15c2ccbe24.com-625f789b-8809-482f-b86f-e062dd0356aa\n\tat
org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
~[zookeeper-3.4.6.jar!/:3.4.6-1569965]\n\tat
org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
~[zookeeper-3.4.6.jar!/:3.4.6-1569965]\n\tat
org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
~[zookeeper-3.4.6.jar!/:3.4.6-1569965]\n\tat
org.apache.camel.component.zookeeper.operations.CreateOperation.getResult(CreateOperation.java:52)
~[camel-zookeeper-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.component.zookeeper.operations.ZooKeeperOperation.get(ZooKeeperOperation.java:70)
~[camel-zookeeper-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.component.zookeeper.ZookeeperProducer.createNode(ZookeeperProducer.java:223)
~[camel-zookeeper-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.component.zookeeper.ZookeeperProducer.synchronouslySetData(ZookeeperProducer.java:239)
~[camel-zookeeper-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.component.zookeeper.ZookeeperProducer.process(ZookeeperProducer.java:90)
~[camel-zookeeper-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
~[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
~[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:68)
~[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:412)
~[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:380)
~[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:270)
~[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:380)
~[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.impl.ProducerCache.send(ProducerCache.java:205)
~[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:119)
~[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.component.zookeeper.policy.ZooKeeperElection.createCandidateNode(ZooKeeperElection.java:146)
[camel-zookeeper-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.component.zookeeper.policy.ZooKeeperElection.testAndCreateCandidateNode(ZooKeeperElection.java:116)
[camel-zookeeper-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.component.zookeeper.policy.ZooKeeperElection.isMaster(ZooKeeperElection.java:92)
[camel-zookeeper-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.component.zookeeper.policy.ZooKeeperRoutePolicy.onExchangeBegin(ZooKeeperRoutePolicy.java:78)
[camel-zookeeper-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.processor.CamelInternalProcessor$RoutePolicyAdvice.before(CamelInternalProcessor.java:482)
[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:138)
[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:165)
[camel-core-2.16.0.jar!/:2.16.0]\n\tat
org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:73)
[camel-core-2.16.0.jar!/:2.16.0]\n\tat
java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_60]\n\tat
java.util.TimerThread.run(Timer.java:505)
[na:1.8.0_60]\n","HOSTNAME":"3c15c2ccbe24"}



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-zookeeper-is-not-creating-the-znode-tp5772464p5773460.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JCIFS component and overwriting

2015-11-06 Thread Pontus Ullgren
Which version of Camel and Camel Extra are you using?

You should be able to control this using the fileExist URI option. See the
documentation on the file component (http://camel.apache.org/file2.html)

On Fri, 6 Nov 2015, 19:22 fliot33  wrote:

> Hi,
> I'm using : wireTap to smb:///
> And when trying to overwrite, I get
>
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> store file smb:///
> at
>
> org.apacheextras.camel.component.jcifs.SmbOperations.storeFile(SmbOperations.java:296)
> at
>
> org.apacheextras.camel.component.jcifs.SmbProducer.writeFile(SmbProducer.java:267)
> at
>
> org.apacheextras.camel.component.jcifs.SmbProducer.processExchange(SmbProducer.java:122)
> at
>
> org.apacheextras.camel.component.jcifs.SmbProducer.process(SmbProducer.java:70)
> at
>
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> at
>
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
> 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.processor.WireTapProcessor$1.call(WireTapProcessor.java:98)
> at
>
> org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:94)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
> Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: jcifs.smb.SmbException: The system cannot find the path
> specified.
> at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
> at jcifs.smb.SmbTransport.send(SmbTransport.java:663)
> at jcifs.smb.SmbSession.send(SmbSession.java:238)
> at jcifs.smb.SmbTree.send(SmbTree.java:119)
> at jcifs.smb.SmbFile.send(SmbFile.java:775)
> at jcifs.smb.SmbFile.open0(SmbFile.java:989)
> at jcifs.smb.SmbFile.open(SmbFile.java:1006)
> at
> jcifs.smb.SmbFileOutputStream.(SmbFileOutputStream.java:142)
> at
> jcifs.smb.SmbFileOutputStream.(SmbFileOutputStream.java:97)
> at
>
> org.apacheextras.camel.component.jcifs.JcifsSmbApiFactory.createSmbFileOutputStream(JcifsSmbApiFactory.java:50)
> at
>
> org.apacheextras.camel.component.jcifs.DefaultSmbClient.storeFile(DefaultSmbClient.java:134)
> at
>
> org.apacheextras.camel.component.jcifs.SmbOperations.storeFile(SmbOperations.java:293)
> ... 14 more
> ERROR | Camel (PoplidaysCamelContext) thread #19 - WireTap | Could not
> locate or create direction 'smb:///' due to
> 'jcifs.smb.SmbException: Cannot create a file when that file already
> exists.'
>
> I review component documentation, and I didn't find any additionnal
> parameters, is there a simple way to do so ?
>
> Thanks in advance.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JCIFS-component-and-overwriting-tp5773458.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


JMS replyTo always on Queue? (ignores "topic:" in dest param)

2015-11-06 Thread monztech
Using Camel 2.16.0

We are trying to configure a request/response using JMS topics as both the
request and reply destinations.  This is the route where we are seeing an
issue: 

  rest("/apply")
.get("applicant/{id}")
   
.to("jms:topic:T.Applicant?replyTo=topic:T.CreateApplicantResponse");

The are some other topics/queues configured but the ultimate destination
does receive the request and is able to send the reply.

The route shown above does receive the expected response, so everything
works with one small exception.  When monitoring Tibco EMS  we see that the
response goes on a *queue*  with the name T.CreateApplicantResponse and not
a topic.  It appears that the "topic:" prefix in the replyTo is either being
ignored or we are not specifying a topic correctly.

After some investigation into the Camel source code I see that in
org.apache.camel.component.jms.JmsProducer  createReplyManager() method the
ReplyManager is hard-coded to use a QueueReplyManager (there is no
TopicReplyManager class as far as I can tell.)

I see some posts on this forum that suggest that topics for replyTo
destinations has been implemented but, I may be interpreting them
incorrectly. 

Should I be able to use a topic as a JMS replyTo?  If so, please advise on
how to configure.

This is our first major effort using camel and we are very pleased with it
thus far.  

Thank you.




--
View this message in context: 
http://camel.465427.n5.nabble.com/JMS-replyTo-always-on-Queue-ignores-topic-in-dest-param-tp5773459.html
Sent from the Camel - Users mailing list archive at Nabble.com.


JCIFS component and overwriting

2015-11-06 Thread fliot33
Hi,
I'm using : wireTap to smb:///
And when trying to overwrite, I get

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file smb:///
at
org.apacheextras.camel.component.jcifs.SmbOperations.storeFile(SmbOperations.java:296)
at
org.apacheextras.camel.component.jcifs.SmbProducer.writeFile(SmbProducer.java:267)
at
org.apacheextras.camel.component.jcifs.SmbProducer.processExchange(SmbProducer.java:122)
at
org.apacheextras.camel.component.jcifs.SmbProducer.process(SmbProducer.java:70)
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
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.processor.WireTapProcessor$1.call(WireTapProcessor.java:98)
at
org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:94)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: jcifs.smb.SmbException: The system cannot find the path
specified.
at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
at jcifs.smb.SmbTransport.send(SmbTransport.java:663)
at jcifs.smb.SmbSession.send(SmbSession.java:238)
at jcifs.smb.SmbTree.send(SmbTree.java:119)
at jcifs.smb.SmbFile.send(SmbFile.java:775)
at jcifs.smb.SmbFile.open0(SmbFile.java:989)
at jcifs.smb.SmbFile.open(SmbFile.java:1006)
at jcifs.smb.SmbFileOutputStream.(SmbFileOutputStream.java:142)
at jcifs.smb.SmbFileOutputStream.(SmbFileOutputStream.java:97)
at
org.apacheextras.camel.component.jcifs.JcifsSmbApiFactory.createSmbFileOutputStream(JcifsSmbApiFactory.java:50)
at
org.apacheextras.camel.component.jcifs.DefaultSmbClient.storeFile(DefaultSmbClient.java:134)
at
org.apacheextras.camel.component.jcifs.SmbOperations.storeFile(SmbOperations.java:293)
... 14 more
ERROR | Camel (PoplidaysCamelContext) thread #19 - WireTap | Could not
locate or create direction 'smb:///' due to
'jcifs.smb.SmbException: Cannot create a file when that file already
exists.'

I review component documentation, and I didn't find any additionnal
parameters, is there a simple way to do so ?

Thanks in advance.



--
View this message in context: 
http://camel.465427.n5.nabble.com/JCIFS-component-and-overwriting-tp5773458.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Duplicate ServletName detected:

2015-11-06 Thread sekaijin
Hello
I try to deploy multiple bundles on karaf that define each of the services
with Restfull rest dsl.
I use camel-servlet.
but I did manage to deploy a single bundle at a time.

I get the error message
javax.servlet.ServletException: Duplicate ServletName detected:
CamelServlet. Existing: CamelHttpTransportServlet[name=CamelServlet] This:
CamelHttpTransportServlet[name=CamelServlet]. Its advised to use unique
ServletName per Camel application.

I tried to change the name of the servlet in blueprint without success.

I tried to declare the servlet in java


thank



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


Re: the bundle is wating for namespace handlers

2015-11-06 Thread nono
thanks for the quick reply
below is features installed, 

 features:list |grep jetty
[installed  ] [8.1.17.v20150415 ] jetty 

[installed  ] [3.0.4.redhat-620133  ] cxf-http-jetty
  
[installed  ] [8.1.17.v20150415 ] pax-jetty 
 
[installed  ] [2.15.1.redhat-620133 ] camel-jetty   
 
[uninstalled] [2.15.1.redhat-620133 ] camel-jetty9 



--
View this message in context: 
http://camel.465427.n5.nabble.com/the-bundle-is-wating-for-namespace-handlers-tp5773434p5773443.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel JMS Issue

2015-11-06 Thread james.seb7
Hi Claus,

As you suggested , I have increased connection time from 2 sec .Now I'm
getting more in the logs like below:

Nov 06, 2015 2:10:26 PM
org.springframework.jms.listener.DefaultMessageListenerContainer
handleListenerSetupFailure

INFO: JMS message listener invoker needs to establish shared Connection

Nov 06, 2015 2:10:26 PM
org.springframework.jms.listener.DefaultMessageListenerContainer
refreshConnectionUntilSuccessful

SEVERE: Could not refresh JMS Connection for destination 'myTopic/UAT/:mcf'
- retrying using FixedBackOff{interval=5000, currentAttempts=0,
maxAttempts=unlimited}. Cause: invalid name or password 

Looks like when trying to connect it was unable to proceed due to Invalid
username or password.




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


Re: file 2 transform 2 http4 (httpd status 400)

2015-11-06 Thread DaddyOh
I turned on the http wire logging and see 

HTTP/1.1 400 Parsing exception: fatal error at (7,617) : Invalid byte 1 of
1-byte UTF-8 sequence.

So I have an encoding problem that does not show up with the 
File > Transform > File > Exist-db approach

I'm staying with that approach because it will work in our environment.

Thanks
Eric



--
View this message in context: 
http://camel.465427.n5.nabble.com/file-2-transform-2-http4-httpd-status-400-tp5773400p5773444.html
Sent from the Camel - Users mailing list archive at Nabble.com.


CamelBlueprintTestSupport and cucumber

2015-11-06 Thread souciance
Hello,

Is it possible to instantiate or call the CamelBlueprintTestSupport from
another class?

I am trying to use cucumber-jvm together with camel blueprint for scenario
tests. However, since cucumber uses @RunWith (Cucumber.class) it somewhow
stops the routes and the context from starting. Hence whenver you write
template.sendbody(uri,message) it just gives you nullpointerexception.

So my question is, is there a way to call the blueprint test class from
another class or start the bundle some other way?

Thanks
Souciancee



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


Re: the bundle is wating for namespace handlers

2015-11-06 Thread Claus Ibsen
Sounds like you need to install some cxf bundle that provides that namespace.

You can do a features:list and see what cxf features there is, there
is likely something about jetty-http etc.



On Fri, Nov 6, 2015 at 2:04 PM, nono  wrote:
>
> i got below error
> the bundle
>  is waiting for namespace handlers
> [http://cxf.apache.org/transports/http-jetty/configuration]
> i also installed camel-cxf feature
>
> below is my blueprint namespace part
>
> any hints will be more than welcom!
>
> 
> http://www.osgi.org/xmlns/blueprint/v1.0.0";
>xmlns:jms="http://servicemix.apache.org/jms/1.0";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0";
>xmlns:sec="http://cxf.apache.org/configuration/security";
>xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs";
>
> xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration";
>xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> http://cxf.apache.org/blueprint/jaxrs
> http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
> http://cxf.apache.org/configuration/security
> http://cxf.apache.org/schemas/configuration/security.xsd
>
> http://cxf.apache.org/transports/http-jetty/configuration
> http://cxf.apache.org/schemas/configuration/http-jetty.xsd
> ">
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/the-bundle-is-wating-for-namespace-handlers-tp5773434.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: Camel JMS Issue

2015-11-06 Thread Claus Ibsen
And you only run the app for 2 seconds. You may want to give it more
time to startup and connect to tibco.

As camel-jms is using spring jms, so you can also search the internet
how to use tibco with spring jms as it would be the same configuration
needed on the connection factory etc.

On Fri, Nov 6, 2015 at 11:16 AM, james.seb7  wrote:
> Hi ,
>
> I'm using Apache Camel 2.15 with JMS in my application. Our JMS provider is
> customized Tibco (tibjms).
> I'm using Java DSL to define the Camel context, Routes etc.
> The following code is for JMS connectivity with Apache Camel:
>
>   public static void main(String[] args) throws Exception {
>
>CamelContext context =  new DefaultCamelContext();
> ConnectionFactory connectionFactory=getJMSConnectionFactory();
> System.out.println("Topic connection factorty is >>"+
> connectionFactory);
>
> context.addComponent("jms",JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
>  context.addRoutes(new RouteBuilder() {
>  @Override
>  public void configure() throws Exception {
>  from("jms:topic:/myTopic/UAT/:mcf")
>  .to("file://src/main/java/agn");
>
>  }
>   });
>   ProducerTemplate template = context.createProducerTemplate();
>   context.start();
>   Thread.sleep(2000);
>} finally {
>   context.stop();
>}
> Here, I'm able to see the connectionFactory values as
> "tcp://pmsjms1.com:50276;". But when I run the program I'm getting below
> error :
>
> *Nov 06, 2015 7:20:03 AM
> org.springframework.jms.listener.DefaultMessageListenerContainer
> handleListenerSetupFailure
> INFO: JMS message listener invoker needs to establish shared Connection*
>
> No messages are put into 'to' location from the topic mentioned in the from.
>
> Could anyone help me to resolve this ?.
>
> Thanks,
> James
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-JMS-Issue-tp5773432.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: Redelivery Policy set on Camel is ignored

2015-11-06 Thread Claus Ibsen
Hi

Ah you need to set the redelivery on the ActiveMQ brokerUrl as its
baked into AMQ redelivery.
I was quick reading the mails on this user forum and didnt spot your
code was the Camel AMQ redelivery class.

As you want to use TX and rollback on failure and let the AMQ broker
redeliver the message.

The Camel redelivery policy is when Camel is orchestrating the
redelivery, which is not the case when you want to use JMS TX.

There is an example here
https://github.com/camelinaction/camelinaction2/blob/master/chapter12/riderautoparts-partner/src/test/resources/camelinaction/RiderAutoPartsPartnerTransactedTest.xml

Though it uses the default redelivery options from AMQ. You can
configure those in the brokerUrl, see bottom of this page
http://activemq.apache.org/connection-configuration-uri.html

And to make confusion even bigger, then there is a AMQ broker
redelivery functionality also but its using the AMQ scheduler which is
not supported in all AMQ datastores. Both kinds have their pros/cons.





On Fri, Nov 6, 2015 at 11:35 AM, Michele
 wrote:
> Hi Claus,
>
> first of all thank you very much:).
>
> I read and followed the link that you suggested and i changed the
> configuration as you can see below:
>
>  class="org.apache.camel.component.jms.JmsConfiguration">
>  ref="pooledConnectionFactory" />
>  ref="jmsTransactionManager" />
> 
> 
>
> 
> 
> **
> 
> 
> But the result is the same. Redelivery Policy is ignored.
> I need to configure a DMLC for caching messages to re-delivery?
>
> Thanks in advance.
>
> Greeting
> Michele
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Redelivery-Policy-set-on-Camel-is-ignored-tp5773409p5773433.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: Camel JMS Issue

2015-11-06 Thread Christian Schneider

Can you show how you configure the connection factory?

Christian



On 06.11.2015 11:16, james.seb7 wrote:

Hi ,

I'm using Apache Camel 2.15 with JMS in my application. Our JMS provider is
customized Tibco (tibjms).
I'm using Java DSL to define the Camel context, Routes etc.
The following code is for JMS connectivity with Apache Camel:

   public static void main(String[] args) throws Exception {

CamelContext context =  new DefaultCamelContext();
 ConnectionFactory connectionFactory=getJMSConnectionFactory();
 System.out.println("Topic connection factorty is >>"+
connectionFactory);
 
context.addComponent("jms",JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));

  context.addRoutes(new RouteBuilder() {
  @Override
  public void configure() throws Exception {
  from("jms:topic:/myTopic/UAT/:mcf")
  .to("file://src/main/java/agn");

  }

   });
   ProducerTemplate template = context.createProducerTemplate();
   context.start();
   Thread.sleep(2000);
} finally {
   context.stop();
}
Here, I'm able to see the connectionFactory values as
"tcp://pmsjms1.com:50276;". But when I run the program I'm getting below
error :

*Nov 06, 2015 7:20:03 AM
org.springframework.jms.listener.DefaultMessageListenerContainer
handleListenerSetupFailure
INFO: JMS message listener invoker needs to establish shared Connection*

No messages are put into 'to' location from the topic mentioned in the from.

Could anyone help me to resolve this ?.

Thanks,
James



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



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: Redelivery Policy set on Camel is ignored

2015-11-06 Thread Michele
Hi Claus,

first of all thank you very much:).

I read and followed the link that you suggested and i changed the
configuration as you can see below:









**
   


But the result is the same. Redelivery Policy is ignored.
I need to configure a DMLC for caching messages to re-delivery?

Thanks in advance.

Greeting
Michele
  



--
View this message in context: 
http://camel.465427.n5.nabble.com/Redelivery-Policy-set-on-Camel-is-ignored-tp5773409p5773433.html
Sent from the Camel - Users mailing list archive at Nabble.com.


the bundle is wating for namespace handlers

2015-11-06 Thread nono

i got below error
the bundle 
 is waiting for namespace handlers
[http://cxf.apache.org/transports/http-jetty/configuration]
i also installed camel-cxf feature

below is my blueprint namespace part

any hints will be more than welcom!


http://www.osgi.org/xmlns/blueprint/v1.0.0";
   xmlns:jms="http://servicemix.apache.org/jms/1.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0";
   xmlns:sec="http://cxf.apache.org/configuration/security";
   xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs";
  
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"; 
   xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://cxf.apache.org/blueprint/jaxrs
http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
   
http://cxf.apache.org/transports/http-jetty/configuration
http://cxf.apache.org/schemas/configuration/http-jetty.xsd
">




--
View this message in context: 
http://camel.465427.n5.nabble.com/the-bundle-is-wating-for-namespace-handlers-tp5773434.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel JMS Issue

2015-11-06 Thread james.seb7
Hi ,

I'm using Apache Camel 2.15 with JMS in my application. Our JMS provider is 
customized Tibco (tibjms). 
I'm using Java DSL to define the Camel context, Routes etc.
The following code is for JMS connectivity with Apache Camel:

  public static void main(String[] args) throws Exception {

   CamelContext context =  new DefaultCamelContext();
ConnectionFactory connectionFactory=getJMSConnectionFactory();
System.out.println("Topic connection factorty is >>"+
connectionFactory);

context.addComponent("jms",JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
 context.addRoutes(new RouteBuilder() {
 @Override
 public void configure() throws Exception {
 from("jms:topic:/myTopic/UAT/:mcf")
 .to("file://src/main/java/agn");
   
 }
  });
  ProducerTemplate template = context.createProducerTemplate();
  context.start();
  Thread.sleep(2000);
   } finally {
  context.stop();
   }
Here, I'm able to see the connectionFactory values as
"tcp://pmsjms1.com:50276;". But when I run the program I'm getting below
error :

*Nov 06, 2015 7:20:03 AM
org.springframework.jms.listener.DefaultMessageListenerContainer
handleListenerSetupFailure
INFO: JMS message listener invoker needs to establish shared Connection*

No messages are put into 'to' location from the topic mentioned in the from.

Could anyone help me to resolve this ?.

Thanks,
James



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


Re: How to read XML Payload

2015-11-06 Thread calyan.bandi
Hi,

Thanks everyone for giving their suggestions. I was able to solve this using
xslt component in a camel-loop . I am giving the route here just for your
reference:

 


count(/PricePlans/Body/customer)   


CamelLoopIndex 



${header.loopIndex}++





 

In my XSLT, i am making use of the header "custIndex" to reach out to each
customer node. The XSLT looks as below. I was able to achieve this with the
feature provided in XSLT component which is "all headers are added as
parameters which are available in the XSLT". 

http://www.w3.org/1999/XSL/Transform";>
























 



What bothers me here is the use of header values twice in the route. This is
because the camel's loop property 'CamelLoopIndex' starts with zero and i
cannot pass this directly into the XSLT file. The alternative way of doing
this via message translator looks good but i haven't tried it. Any ways, the
code is working now :)

Regards,
Kalyan



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-read-XML-Payload-tp5773337p5773431.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Attachment filename encoding issue

2015-11-06 Thread creekmind
Hello,

A lot of time has passed, but at last I tried your solution. Yes, it works,
thank you!





--
View this message in context: 
http://camel.465427.n5.nabble.com/Attachment-filename-encoding-issue-tp5772410p5773429.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: jpa/hibernate casting exception

2015-11-06 Thread Christian Schneider
As EntityManagerImpl of course implements EntityManagerFactory the 
exception means that there are two different bundles that provide the 
package javax.persistence in your framework. Hibernate binds to one of 
the bundles and camel to the other. As in java classes are only the same 
if they are loaded by the same classloader there is this exception.


The best solution is to make sure there is only one bundle that exports 
the package javax.persistence.
In your case I am pretty sure that the problem is that you have 
javax.persistence 2.0.0 and 2.1.0 deployed at the same time.


I just tried to reproduce by installing:

feature:repo-add camel 2.15.2
camel-jpa hibernate

This install hibernate 4.3.6.

Unfortunately the hibernate feature installs javax.persistence / 2.1.0 
and camel-jpa install javax.persistence / 2.0.0.


So there are a few options to solve this:
1. You could patch the camel feature file to install the 2.1.0 version 
of the api (ugly but not that difficult)
2. You could install hibernate 4.2.x which will install jpa 2.0.0 (you 
will loose jpa 2.1.0 support)
3. You could update to karaf 4 which has a better feature resolver that 
can handle this case gracefully. In karaf 4 the flag dependency=true on 
bundles is honored and will make sure that only one version of a package 
is installed if possible.


If you switch to karaf 4 then you should wait for version 4.0.3 (to be 
release this week) as 4.0.2 has a severe bug in Aries blueprint that 
makes Aries JPA fail after 5 minutes.


Christian

On 06.11.2015 02:37, Pratt, Jason wrote:

Hello - I am running into an error that has me shaking my head. I've setup a 
consuming JPA route with the following blueprint. I am getting the exception at 
the bottom which is preventing me from moving further. I am using JPA/Hibernate 
in KARAF 3.0.4
Any help would be great!

Jason


from("jpa://test.ProductBean?consumer.delay=14400s&consumer.namedQuery=Product.findAllActiveOrderByExternalName").routeId("testRoute")

http://camel.apache.org/schema/blueprint id="TestReports">




   
   




Caused by: java.lang.Exception: Unable to convert value 
org.hibernate.jpa.internal.EntityManagerImpl@7413ef9 to type 
javax.persistence.EntityManagerFactory
 at 
org.apache.aries.blueprint.container.AggregateConverter.convert(AggregateConverter.java:184)[15:org.apache.aries.blueprint.core:1.4.3]
 at 
org.apache.aries.blueprint.container.BlueprintRepository.convert(BlueprintRepository.java:402)[15:org.apache.aries.blueprint.core:1.4.3]
 at 
org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.convert(ReflectionUtils.java:394)[15:org.apache.aries.blueprint.core:1.4.3]
 at 
org.apache.aries.blueprint.utils.ReflectionUtils$MethodPropertyDescriptor.internalSet(ReflectionUtils.java:628)[15:org.apache.aries.blueprint.core:1.4.3]
 at 
org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.set(ReflectionUtils.java:378)[15:org.apache.aries.blueprint.core:1.4.3]
 at 
org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:939)[15:org.apache.aries.blueprint.core:1.4.3]
 ... 31 more




--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: How to read XML Payload

2015-11-06 Thread SopwithInOut
I assume that by now, you will have already solved this. But in any case, I
would approach this with some kind of "/ Message Translator
  /" solution in mind. 

I'm very, very new to Camel. But I have a couple years experience using a
big-name proprietary ESB. I've done similar transformations using that ESB's 
"/ Message Translator   /" support. The low-level
details are different. But at a high-level...

I would start off with some kind of reference to a single empty
"/PricePlans/Body/" node (/call it $mtBody, for short/). Then for each
 I come across, I'd squirt each one in turn into my
previously-prepared /$mtBody/ node. In pseudo-code...



Or assuming each of my // elements have some unique identifier —
maybe a "/custId/" attribute, say — it should be possible to forego a
looping approach. Instead, I could envisage some kind of  "/ Message
Translator   /" that used XPath to somehow reference
each // by its /custID/ attribute.

How did you eventually solve it, by the way?





--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-read-XML-Payload-tp5773337p5773427.html
Sent from the Camel - Users mailing list archive at Nabble.com.