Re: java.lang.NullPointerException in Camel JDBC component for Select statement

2014-05-06 Thread Charles Moulliard
Hy Abby,

Such a message should not be posted here on that mailing list. I would like
to invite you to use social media like Apache Camel group on linkedin or
Google+ Apache Camel for such announcement.

Regards,


On Tue, May 6, 2014 at 1:54 AM, Abby Van Rooyen 
a...@precisionsourcing.com.au wrote:

 Hey guys and girls!

 I wonder if you can help me at all?

 I am currently working with a client of mine to find some strong
 integration developers who have quality Fuse and Camel skills to work on
 either a contract or permanent basis in Sydney.

 Can anyone suggest a suitable candidate for me? We also offer a $500
 referral scheme if someone that you refer secures the role.

 Thanks

 Kind Regards,

 Abby Van Rooyen
 Practice Team Lead - Development
 Precision Sourcing
 D: +61 2 8246 7702


 -Original Message-
 From: Charles Moulliard [mailto:ch0...@gmail.com]
 Sent: Tuesday, 6 May 2014 4:52 AM
 To: users@camel.apache.org
 Subject: Re: java.lang.NullPointerException in Camel JDBC component for
 Select statement

 That means that Spring JDBC has not been able to load your MSQL Driver
 Class. I recommend that you have a look to the classpath.


 On Mon, May 5, 2014 at 8:00 PM, Shiv shiv.dixit@gmail.com wrote:

  I do not see any log statement from DriverManagerDataSource class in
  my log file :(.
 
  Thanks
  Shiv
 
 
 
  --
  View this message in context:
  http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Ca
  mel-JDBC-component-for-Select-statement-tp5750783p5750881.html
  Sent from the Camel - Users mailing list archive at Nabble.com.
 



 --
 Charles Moulliard
 Apache Committer / Architect @RedHat
 Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io




-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io


Issue with digital signature using raw keys

2014-05-06 Thread sreejeb2
Hi All,I'm using camel 2.13. I have my private key and public key generated.
The secring and pubring file are also available. 
I'm getting an error when I try to sign the document. 
I'm trying to encrypt a text file and sign it before send to my client. I
added the dataFormats 

http://camel.465427.n5.nabble.com/file/n5750891/1.jpg 
The route is defined as 

http://camel.465427.n5.nabble.com/file/n5750891/2.jpg  

But on execution im getting

 2014-05-06 15:33:35,740 [ERROR] {Camel (camel-1) thread #0 -
file://D:/Temp/Camel/D/} org.apache.camel.processor.DefaultErrorHandler -
Failed delivery for (MessageId: ID-WS11193-51917-1399354412481-0-5 on
ExchangeId: ID-WS11193-51917-1399354412481-0-6). Exhausted after delivery
attempt: 1 caught: java.lang.IllegalStateException: Cannot sign message as
no Private Key has been supplied. Either supply one in the route definition
sign(keystore, alias) or sign(privateKey) or via the message header
'CamelSignaturePrivateKey'Message
History---RouteId
 
ProcessorId  Processor  
 
Elapsed (ms)[Samle_Encrypt ] [Samle_Encrypt ]
[file://D:/Temp/Camel/D/  
] [ 1][Samle_Encrypt ] [to1   ]
[crypto:sign://basic?privateKey=my_private_key.ppk ] [
0]Exchange---Exchange[
Id  ID-WS11193-51917-1399354412481-0-6  ExchangePattern
InOnly  Headers {breadcrumbId=ID-WS11193-51917-1399354412481-0-5,
CamelFileAbsolute=true, CamelFileAbsolutePath=D:\Temp\Camel\D\dec.txt,
CamelFileLastModified=1399348842338, CamelFileLength=2014,
CamelFileName=dec.txt, CamelFileNameConsumed=dec.txt,
CamelFileNameOnly=dec.txt, CamelFileParent=D:\Temp\Camel\D,
CamelFilePath=D:\Temp\Camel\D\dec.txt, CamelFileRelativePath=dec.txt,
CamelRedelivered=false, CamelRedeliveryCounter=0}   BodyType   
org.apache.camel.component.file.GenericFile Body[Body is
file based:
GenericFile[D:\Temp\Camel\D\dec.txt]]]Stacktrace---java.lang.IllegalStateException:
Cannot sign message as no Private Key has been supplied. Either supply one
in the route definition sign(keystore, alias) or sign(privateKey) or via the
message header 'CamelSignaturePrivateKey'   at
org.apache.camel.component.crypto.processor.SigningProcessor.getPrivateKeyFromKeystoreOrExchange(SigningProcessor.java:68)
~[camel-crypto-2.13.0.jar:2.13.0]   at
org.apache.camel.component.crypto.processor.SigningProcessor.initSignatureService(SigningProcessor.java:51)
~[camel-crypto-2.13.0.jar:2.13.0]   at
org.apache.camel.component.crypto.processor.SigningProcessor.process(SigningProcessor.java:39)
~[camel-crypto-2.13.0.jar:2.13.0]   at
org.apache.camel.component.crypto.DigitalSignatureProducer.process(DigitalSignatureProducer.java:36)
~[camel-crypto-2.13.0.jar:2.13.0]   at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
~[camel-core-2.13.0.jar:2.13.0] at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:113)
~[camel-core-2.13.0.jar:2.13.0] at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
~[camel-core-2.13.0.jar:2.13.0] at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
~[camel-core-2.13.0.jar:2.13.0] at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:401)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
[camel-core-2.13.0.jar:2.13.0]  at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

Re: java.lang.NullPointerException in Camel JDBC component for Select statement

2014-05-06 Thread Abby Van Rooyen
Ok my apologies, I will re direct my self to those groups...

Abby Van Rooyen 
Practice Team Lead- Development 
Precision Sourcing 

 On 6 May 2014, at 4:16 pm, Charles Moulliard ch0...@gmail.com wrote:
 
 Hy Abby,
 
 Such a message should not be posted here on that mailing list. I would like
 to invite you to use social media like Apache Camel group on linkedin or
 Google+ Apache Camel for such announcement.
 
 Regards,
 
 
 On Tue, May 6, 2014 at 1:54 AM, Abby Van Rooyen 
 a...@precisionsourcing.com.au wrote:
 
 Hey guys and girls!
 
 I wonder if you can help me at all?
 
 I am currently working with a client of mine to find some strong
 integration developers who have quality Fuse and Camel skills to work on
 either a contract or permanent basis in Sydney.
 
 Can anyone suggest a suitable candidate for me? We also offer a $500
 referral scheme if someone that you refer secures the role.
 
 Thanks
 
 Kind Regards,
 
 Abby Van Rooyen
 Practice Team Lead - Development
 Precision Sourcing
 D: +61 2 8246 7702
 
 
 -Original Message-
 From: Charles Moulliard [mailto:ch0...@gmail.com]
 Sent: Tuesday, 6 May 2014 4:52 AM
 To: users@camel.apache.org
 Subject: Re: java.lang.NullPointerException in Camel JDBC component for
 Select statement
 
 That means that Spring JDBC has not been able to load your MSQL Driver
 Class. I recommend that you have a look to the classpath.
 
 
 On Mon, May 5, 2014 at 8:00 PM, Shiv shiv.dixit@gmail.com wrote:
 
 I do not see any log statement from DriverManagerDataSource class in
 my log file :(.
 
 Thanks
 Shiv
 
 
 
 --
 View this message in context:
 http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Ca
 mel-JDBC-component-for-Select-statement-tp5750783p5750881.html
 Sent from the Camel - Users mailing list archive at Nabble.com.
 
 
 
 --
 Charles Moulliard
 Apache Committer / Architect @RedHat
 Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
 
 
 
 -- 
 Charles Moulliard
 Apache Committer / Architect @RedHat
 Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io


Re: lazyLoad with CSV blows up on last line?

2014-05-06 Thread Willem Jiang
I filled JIRA[1] for it and the patch is on the way.

[1]https://issues.apache.org/jira/browse/CAMEL-7415

--  
Willem Jiang

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



On May 6, 2014 at 11:18:53 AM, Willem Jiang (willem.ji...@gmail.com) wrote:
 OK, I managed to reproduce the error.
 I will keep digging the code to see if I can find a solution here.
  
 --
 Willem Jiang
  
 Red Hat, Inc.
 Web: http://www.redhat.com
 Blog: http://willemjiang.blogspot.com (English)
 http://jnn.iteye.com (Chinese)
 Twitter: willemjiang
 Weibo: 姜宁willem
  
  
  
 On May 6, 2014 at 1:23:30 AM, Tim Dudgeon (tdudgeon...@gmail.com) wrote:
  I don't think that's the problem. I added long sleep before shutting
  down the camel context and still get the error (my test file is very
  small so gets processed almost instantly).
  So think it must be something else closing the stream prematurely.
 
  Tim
 
  On 05/05/2014 02:50, Willem Jiang wrote:
   The Stream is closed by other thread.
   I think you need to let the main thread sleep for few minutes to let the 
   camel route finish  
  the processing of the message.
  
   --
   Willem Jiang
  
   Red Hat, Inc.
   Web: http://www.redhat.com
   Blog: http://willemjiang.blogspot.com (English)
   http://jnn.iteye.com (Chinese)
   Twitter: willemjiang
   Weibo: 姜宁willem
  
  
  
   On May 4, 2014 at 11:26:27 PM, Tim Dudgeon (tdudgeon...@gmail.com) wrote:
   I'm trying to use the CSV data format to handle a large file.
   Thinking I should use CsvDataFormat.setLazyLoad(true)
   I sort of got it working but it blows up on the last line of the file
   with a java.io.IOException: Stream closed exception.
   Is this a bug, or am I dong it wrong? This is with Camel 2.13.0
  
   Here is example of what I'm doing:
  
   CsvDataFormat csv = new CsvDataFormat()
   csv.setDelimiter(' ')
   csv.setSkipFirstLine(false)
   csv.setLazyLoad(true)
  
   CamelContext camelContext = new DefaultCamelContext()
   camelContext.addRoutes(new RouteBuilder() {
   def void configure() {
   from('direct:start')
   .unmarshal(csv)
   .split(body()).streaming()
   .log('row: ${body}')
   }
   })
   camelContext.start()
  
   ProducerTemplate t = camelContext.createProducerTemplate()
   t.sendBody('direct:start', new File('/Users/timbo/data/test.txt'))
  
   camelContext.stop()
  
   And here is exception.
  
   java.lang.IllegalStateException: java.io.IOException: Stream closed
   at
   org.apache.camel.dataformat.csv.CsvIterator.next(CsvIterator.java:61)  
   at
   org.apache.camel.processor.Splitter$SplitterIterable$1.next(Splitter.java:170)
 
   at
   org.apache.camel.processor.Splitter$SplitterIterable$1.next(Splitter.java:146)
 
   at
   org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:502)
 
   at
   org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:215)
 
   at org.apache.camel.processor.Splitter.process(Splitter.java:98)
   at
   org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
 
   at
   org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
 
   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.component.direct.DirectProducer.process(DirectProducer.java:51)
 
   at
   org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
 
   at
   org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:73)
 
   at
   org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:378)
 
   at
   org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:346)
 
   at
   org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:242) 

   at
   org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:346) 

   at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:184)
   at
   org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:124)
 
   at
   org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:137)
 
   at
   org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:144)
 
   at org.apache.camel.ProducerTemplate$sendBody.call(Unknown Source)
  
   Thanks
   Tim
  
  
 
 
  
  



Re: Netty consumer fixed message size.

2014-05-06 Thread Cecilio Alvarez
Thanks Claus for your answer.

I'm sure I'm sending blocks of 100 bytes. 
You are right, sometimes is posting to the route two or more of this blocks
together.
Is there a way to ensure that each 100 bytes received, the netty component
will post a new message?
Or I have to create a custom decoder with a variable length as you
suggested?

Thanks you in advance.





--
View this message in context: 
http://camel.465427.n5.nabble.com/Netty-consumer-fixed-message-size-tp5750868p5750895.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Issue with digital signature using raw keys

2014-05-06 Thread Charles Moulliard
You get this exception
(org.apache.camel.component.crypto.processor.SigningProcessor)
because Camel processor is not able to retrieve from the header '
CamelSignaturePrivateKey'. I suspect that the crypto sign endpoint has not
been able to load your file 'my_private_key.ppk'. Can you check that this
file is well packaged in the jar/bundle/war please ?



On Tue, May 6, 2014 at 8:23 AM, sreejeb2 
sreejith.gopinat...@lumoenergy.com.au wrote:

 Hi All,I'm using camel 2.13. I have my private key and public key
 generated.
 The secring and pubring file are also available.
 I'm getting an error when I try to sign the document.
 I'm trying to encrypt a text file and sign it before send to my client. I
 added the dataFormats

 http://camel.465427.n5.nabble.com/file/n5750891/1.jpg
 The route is defined as

 http://camel.465427.n5.nabble.com/file/n5750891/2.jpg

 But on execution im getting

  2014-05-06 15:33:35,740 [ERROR] {Camel (camel-1) thread #0 -
 file://D:/Temp/Camel/D/} org.apache.camel.processor.DefaultErrorHandler -
 Failed delivery for (MessageId: ID-WS11193-51917-1399354412481-0-5 on
 ExchangeId: ID-WS11193-51917-1399354412481-0-6). Exhausted after delivery
 attempt: 1 caught: java.lang.IllegalStateException: Cannot sign message as
 no Private Key has been supplied. Either supply one in the route definition
 sign(keystore, alias) or sign(privateKey) or via the message header
 'CamelSignaturePrivateKey'Message

 History---RouteId
 ProcessorId  Processor
 Elapsed (ms)[Samle_Encrypt ] [Samle_Encrypt ]
 [file://D:/Temp/Camel/D/
 ] [ 1][Samle_Encrypt ] [to1   ]
 [crypto:sign://basic?privateKey=my_private_key.ppk ] [

 0]Exchange---Exchange[
 Id  ID-WS11193-51917-1399354412481-0-6  ExchangePattern
 InOnly  Headers
 {breadcrumbId=ID-WS11193-51917-1399354412481-0-5,
 CamelFileAbsolute=true, CamelFileAbsolutePath=D:\Temp\Camel\D\dec.txt,
 CamelFileLastModified=1399348842338, CamelFileLength=2014,
 CamelFileName=dec.txt, CamelFileNameConsumed=dec.txt,
 CamelFileNameOnly=dec.txt, CamelFileParent=D:\Temp\Camel\D,
 CamelFilePath=D:\Temp\Camel\D\dec.txt, CamelFileRelativePath=dec.txt,
 CamelRedelivered=false, CamelRedeliveryCounter=0}   BodyType
 org.apache.camel.component.file.GenericFile Body[Body
 is
 file based:

 GenericFile[D:\Temp\Camel\D\dec.txt]]]Stacktrace---java.lang.IllegalStateException:
 Cannot sign message as no Private Key has been supplied. Either supply one
 in the route definition sign(keystore, alias) or sign(privateKey) or via
 the
 message header 'CamelSignaturePrivateKey'   at

 org.apache.camel.component.crypto.processor.SigningProcessor.getPrivateKeyFromKeystoreOrExchange(SigningProcessor.java:68)
 ~[camel-crypto-2.13.0.jar:2.13.0]   at

 org.apache.camel.component.crypto.processor.SigningProcessor.initSignatureService(SigningProcessor.java:51)
 ~[camel-crypto-2.13.0.jar:2.13.0]   at

 org.apache.camel.component.crypto.processor.SigningProcessor.process(SigningProcessor.java:39)
 ~[camel-crypto-2.13.0.jar:2.13.0]   at

 org.apache.camel.component.crypto.DigitalSignatureProducer.process(DigitalSignatureProducer.java:36)
 ~[camel-crypto-2.13.0.jar:2.13.0]   at

 org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
 ~[camel-core-2.13.0.jar:2.13.0] at
 org.apache.camel.processor.SendProcessor.process(SendProcessor.java:113)
 ~[camel-core-2.13.0.jar:2.13.0] at

 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
 ~[camel-core-2.13.0.jar:2.13.0] at

 org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
 ~[camel-core-2.13.0.jar:2.13.0] at

 org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
 [camel-core-2.13.0.jar:2.13.0]  at
 org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
 [camel-core-2.13.0.jar:2.13.0]  at
 org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
 [camel-core-2.13.0.jar:2.13.0]  at

 org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
 [camel-core-2.13.0.jar:2.13.0]  at

 org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:401)
 [camel-core-2.13.0.jar:2.13.0]  at

 org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201)
 [camel-core-2.13.0.jar:2.13.0]  at

 org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165)
 

RE: Issue with digital signature using raw keys

2014-05-06 Thread Siano, Stephan
Hi,

I am not sure what you want to do; signature with X.509 keys or with PGP (the 
key rings in the data format indicate PGP whereas your route indicates X.509). 
Can you clear this up?

Best regards
Stephan

-Original Message-
From: sreejeb2 [mailto:sreejith.gopinat...@lumoenergy.com.au] 
Sent: Dienstag, 6. Mai 2014 08:23
To: users@camel.apache.org
Subject: Issue with digital signature using raw keys

Hi All,I'm using camel 2.13. I have my private key and public key generated.
The secring and pubring file are also available. 
I'm getting an error when I try to sign the document. 
I'm trying to encrypt a text file and sign it before send to my client. I
added the dataFormats 

http://camel.465427.n5.nabble.com/file/n5750891/1.jpg 
The route is defined as 

http://camel.465427.n5.nabble.com/file/n5750891/2.jpg  

But on execution im getting

 2014-05-06 15:33:35,740 [ERROR] {Camel (camel-1) thread #0 -
file://D:/Temp/Camel/D/} org.apache.camel.processor.DefaultErrorHandler -
Failed delivery for (MessageId: ID-WS11193-51917-1399354412481-0-5 on
ExchangeId: ID-WS11193-51917-1399354412481-0-6). Exhausted after delivery
attempt: 1 caught: java.lang.IllegalStateException: Cannot sign message as
no Private Key has been supplied. Either supply one in the route definition
sign(keystore, alias) or sign(privateKey) or via the message header
'CamelSignaturePrivateKey'Message
History---RouteId
 
ProcessorId  Processor  
 
Elapsed (ms)[Samle_Encrypt ] [Samle_Encrypt ]
[file://D:/Temp/Camel/D/  
] [ 1][Samle_Encrypt ] [to1   ]
[crypto:sign://basic?privateKey=my_private_key.ppk ] [
0]Exchange---Exchange[
Id  ID-WS11193-51917-1399354412481-0-6  ExchangePattern
InOnly  Headers {breadcrumbId=ID-WS11193-51917-1399354412481-0-5,
CamelFileAbsolute=true, CamelFileAbsolutePath=D:\Temp\Camel\D\dec.txt,
CamelFileLastModified=1399348842338, CamelFileLength=2014,
CamelFileName=dec.txt, CamelFileNameConsumed=dec.txt,
CamelFileNameOnly=dec.txt, CamelFileParent=D:\Temp\Camel\D,
CamelFilePath=D:\Temp\Camel\D\dec.txt, CamelFileRelativePath=dec.txt,
CamelRedelivered=false, CamelRedeliveryCounter=0}   BodyType   
org.apache.camel.component.file.GenericFile Body[Body is
file based:
GenericFile[D:\Temp\Camel\D\dec.txt]]]Stacktrace---java.lang.IllegalStateException:
Cannot sign message as no Private Key has been supplied. Either supply one
in the route definition sign(keystore, alias) or sign(privateKey) or via the
message header 'CamelSignaturePrivateKey'   at
org.apache.camel.component.crypto.processor.SigningProcessor.getPrivateKeyFromKeystoreOrExchange(SigningProcessor.java:68)
~[camel-crypto-2.13.0.jar:2.13.0]   at
org.apache.camel.component.crypto.processor.SigningProcessor.initSignatureService(SigningProcessor.java:51)
~[camel-crypto-2.13.0.jar:2.13.0]   at
org.apache.camel.component.crypto.processor.SigningProcessor.process(SigningProcessor.java:39)
~[camel-crypto-2.13.0.jar:2.13.0]   at
org.apache.camel.component.crypto.DigitalSignatureProducer.process(DigitalSignatureProducer.java:36)
~[camel-crypto-2.13.0.jar:2.13.0]   at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
~[camel-core-2.13.0.jar:2.13.0] at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:113)
~[camel-core-2.13.0.jar:2.13.0] at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
~[camel-core-2.13.0.jar:2.13.0] at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
~[camel-core-2.13.0.jar:2.13.0] at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:401)
[camel-core-2.13.0.jar:2.13.0]  at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201)
[camel-core-2.13.0.jar:2.13.0]  at

Re: Weblogic cluster context loading issue

2014-05-06 Thread GrahamEwings2
Thanks Preben, this change to our ear deployment descriptor
(weblogic-application.xml) fixed it: 

wls:prefer-application-packages
..
..
wls:package-namecom.sun.xml.*/wls:package-name
/wls:prefer-application-packages

We did try something similar before but I suspect there was another problem
at the time or a just a typo.

P.S. replying from another account due to registration problems...




--
View this message in context: 
http://camel.465427.n5.nabble.com/Weblogic-cluster-context-loading-issue-tp5750693p5750905.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Error loop CannotGetJdbcConnectionException, from route

2014-05-06 Thread kalber
How can i handle this error ? On first exchange i get this error and the
program
loops over it.

How can i intercept this error ?

onExectption(CannotGetJdbcConnectionException.class) not works.


--   error message ---
[org.springframework.jdbc.CannotGetJdbcConnectionException - Could not get
JDBC Connection; nested exception is org.postgresql.util.PSQLException:
FATAL: no pg_hba.conf entry for host 192.168.201.172, user paginfor,
database testdb, SSL off]
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get
JDBC Connection; nested exception is org.postgresql.util.PSQLException:
FATAL: no pg_hba.conf entry for host 192.168.201.172, user paginfor,
database testdb, SSL off
at
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:575)
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:617)
at org.apache.camel.component.sql.SqlConsumer.poll(SqlConsumer.java:94)
Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry
for host 122.333.33.11, user , database testdb, SSL off



-
kh
--
View this message in context: 
http://camel.465427.n5.nabble.com/Error-loop-CannotGetJdbcConnectionException-from-route-tp5750911.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Apache Camel | Custom Error Handler to control behavior per Exception.

2014-05-06 Thread manchandap
Apache Camel provides 2 ways for error handling at context level:
/errorHandler /and /onException/.

I am looking for a solution that provides best of both the worlds in one
configuration. /*What I want is that I should configure one error handler
(may be a custom one) and within that custom error handler, I should be able
to control the behavior on per exception basis*/ For Example:

/if I get IOException, I would make 3 redelivery attempts at an interval
of 3 seconds

if I get FileNotFoundException, I would make 5 redelivery attempts at an
interval of 10 seconds/

errorHandler would enable me to use one of the provided Error Handlers and
would handle all the exception in a similar ways. For example using this
approach I can’t have different redelivery attempts for different
exceptions.

So, here where onException comes into picture, which is equivalent of
try-catch at camel context level. I can use this to define per Exception
behavior.

I tried to use a custom bean with Dead Letter Channel in an attempt to
control the redelivery attempts from the bean. However, Camel attempts
redelivery before it passes the control to the custom bean.

Any thoughts about implementing the solution that I want.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-Custom-Error-Handler-to-control-behavior-per-Exception-tp5750913.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Optional sync for Netty

2014-05-06 Thread Muhammad Ichsan
Hi All

Is it possible to make response to be optional in Netty component?

The following routes still make all the response sent back to its
clients, regardless the body is.

route
   from uri=netty:tcp://localhost:5150?textline=true /
   to uri=replyMaker /
   choice
  when
 simple${body} == 'intan'/simple
 to uri=direct:just-in /
  /when
   /choice
/route

route
   from uri=direct:just-in /
   setExchangePattern pattern=InOnly /!-- No effect. Implicit
sync=true in netty is stronger? --
   to uri=printingProcessor /
/route

Thanks

-- 
~The best men are men who benefit to others
http://www.michsan.web.id 一緒に勉強しましょう!

Yang berkualitas memang beda rasanya!
http://rizqi-cookies.com


Re: SMPP type connection.

2014-05-06 Thread PinkSs
Hi All,

I am using amq+camel+smpp for working with SMSC. I used SMPP as camel
coponent and use these endpoints in routes. I want to monitor on SMPP
connection bind, logs every SMSC bind and unbind in separate file than
activemq.log.

Kindly guide me in approaching the mentioned event scenario.



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


Re: Error loop CannotGetJdbcConnectionException, from route

2014-05-06 Thread Charles Moulliard
Syntax to be used is onException(CannotGetJdbcConnectionException.class)
and not onExectption(CannotGetJdbcConnectionException.class).


On Tue, May 6, 2014 at 11:51 AM, kalber karlheinz.al...@swslt.com wrote:

 How can i handle this error ? On first exchange i get this error and the
 program
 loops over it.

 How can i intercept this error ?

 onExectption(CannotGetJdbcConnectionException.class) not works.


 --   error message ---
 [org.springframework.jdbc.CannotGetJdbcConnectionException - Could not get
 JDBC Connection; nested exception is org.postgresql.util.PSQLException:
 FATAL: no pg_hba.conf entry for host 192.168.201.172, user paginfor,
 database testdb, SSL off]
 org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get
 JDBC Connection; nested exception is org.postgresql.util.PSQLException:
 FATAL: no pg_hba.conf entry for host 192.168.201.172, user paginfor,
 database testdb, SSL off
 at

 org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
 at
 org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:575)
 at
 org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:617)
 at
 org.apache.camel.component.sql.SqlConsumer.poll(SqlConsumer.java:94)
 Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry
 for host 122.333.33.11, user , database testdb, SSL off



 -
 kh
 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Error-loop-CannotGetJdbcConnectionException-from-route-tp5750911.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io


Re: Optional sync for Netty

2014-05-06 Thread Charles Moulliard
If the response is optional, what did you plan to return to your client
calling your TCP Server exposed by netty component ?


On Tue, May 6, 2014 at 12:26 PM, Muhammad Ichsan ich...@gmail.com wrote:

 Hi All

 Is it possible to make response to be optional in Netty component?

 The following routes still make all the response sent back to its
 clients, regardless the body is.

 route
from uri=netty:tcp://localhost:5150?textline=true /
to uri=replyMaker /
choice
   when
  simple${body} == 'intan'/simple
  to uri=direct:just-in /
   /when
/choice
 /route

 route
from uri=direct:just-in /
setExchangePattern pattern=InOnly /!-- No effect. Implicit
 sync=true in netty is stronger? --
to uri=printingProcessor /
 /route

 Thanks

 --
 ~The best men are men who benefit to others
 http://www.michsan.web.id 一緒に勉強しましょう!

 Yang berkualitas memang beda rasanya!
 http://rizqi-cookies.com




-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io


Re: Error loop CannotGetJdbcConnectionException, from route

2014-05-06 Thread kalber
Sorry i tiping erros, naturly its
onException(CannotGetJdbcConnectionException.class).
Nevertheless it does not work.





-
kh
--
View this message in context: 
http://camel.465427.n5.nabble.com/Error-loop-CannotGetJdbcConnectionException-from-route-tp5750911p5750918.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Error loop CannotGetJdbcConnectionException, from route

2014-05-06 Thread Claus Ibsen
Hi

See these links

http://camel.apache.org/why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.html
http://camel.apache.org/how-do-i-handle-failures-when-consuming-for-example-from-a-ftp-server.html
https://camel.apache.org/polling-consumer.html

There is an option to use the consumer.bridgeErrorHandler=true so
Camel's error handler can react upon the exception.

On Tue, May 6, 2014 at 1:20 PM, kalber karlheinz.al...@swslt.com wrote:
 Sorry i tiping erros, naturly its
 onException(CannotGetJdbcConnectionException.class).
 Nevertheless it does not work.





 -
 kh
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Error-loop-CannotGetJdbcConnectionException-from-route-tp5750911p5750918.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Netty consumer fixed message size.

2014-05-06 Thread Claus Ibsen
Hi

Its more of a netty question than Camel. You need to use a netty codec
that matches the protcol you use for the data transfer. Is it 100
fixed length, or is it something else. eg how do you know when you got
all the data for a single message.

There is some out of  the box codec's for fixed length, line
terminator etc codecs that netty/camel supports.

On Tue, May 6, 2014 at 9:08 AM, Cecilio Alvarez
cecilio.alva...@hotmail.com wrote:
 Thanks Claus for your answer.

 I'm sure I'm sending blocks of 100 bytes.
 You are right, sometimes is posting to the route two or more of this blocks
 together.
 Is there a way to ensure that each 100 bytes received, the netty component
 will post a new message?
 Or I have to create a custom decoder with a variable length as you
 suggested?

 Thanks you in advance.





 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Netty-consumer-fixed-message-size-tp5750868p5750895.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: best way to unit test quartz routes

2014-05-06 Thread Minh Tran
No one else unit tests their quartz routes? 

On 06/05/2014, at 8:51 AM, Minh Tran darth.minhs...@gmail.com wrote:

 Hi
 
 Most of my routes start with either direct or jms. So to test I would use the 
 @MockEndpoints and set all my expectations then trigger the route using a 
 ProducerTemplate. But I'm struggling to understand how I can do the same when 
 it's a quartz component at the start of the route.
 
 eg
 
 from uri=quartz:foo/
 to uri=bean:bar/
 
 How do you trigger this from the unit test? I'd like to be able to set all my 
 expectations before the route gets triggered.



Re: best way to unit test quartz routes

2014-05-06 Thread Claus Ibsen
On Tue, May 6, 2014 at 1:36 PM, Minh Tran darth.minhs...@gmail.com wrote:
 No one else unit tests their quartz routes?


Well Camel tests its own components. So maybe take a peak there
https://github.com/apache/camel/tree/master/components/camel-quartz/src/test

 On 06/05/2014, at 8:51 AM, Minh Tran darth.minhs...@gmail.com wrote:

 Hi

 Most of my routes start with either direct or jms. So to test I would use 
 the @MockEndpoints and set all my expectations then trigger the route using 
 a ProducerTemplate. But I'm struggling to understand how I can do the same 
 when it's a quartz component at the start of the route.

 eg

 from uri=quartz:foo/
 to uri=bean:bar/

 How do you trigger this from the unit test? I'd like to be able to set all 
 my expectations before the route gets triggered.




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


Re: Netty consumer fixed message size.

2014-05-06 Thread Cecilio Alvarez
Hi,

thanks again claus.

My idea was to send first a 100 length packet with the number of (100
length) packets, post them individually in the route and aggregate them. 









--
View this message in context: 
http://camel.465427.n5.nabble.com/Netty-consumer-fixed-message-size-tp5750868p5750923.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Optional sync for Netty

2014-05-06 Thread Muhammad Ichsan
On Tue, May 6, 2014 at 7:07 PM, Charles Moulliard ch0...@gmail.com wrote:
 s optional, what did you plan to return to your client
 calling your TCP Server exposed by nett


There is a situation when my application is failed to get response
from a third party, the client must also get the same condition.





-- 
~The best men are men who benefit to others
http://www.michsan.web.id 一緒に勉強しましょう!

Yang berkualitas memang beda rasanya!
http://rizqi-cookies.com


mocking sftp using CamelTestSupport in pollEnrich

2014-05-06 Thread dhavalsdoshi
Hi,

*Our Usecase:* On a certain trigger i.e. one file being touched in a
particular location. On this we want to fetch a file from sftp server and
then put it on a local file system.

We are achieving this in the following way


from(file://triggerFilePath)
 .pollEnrich(sftp://XX;, timeout = XX)
.to(file://finalEndFilePath)


This seems to be working fine. But i am having trouble trying to test this
route using the CamelTestSupport. 
I am able to mock endpoint for fileTriggerPath and set  hat a file with this
content should be created. But I am not able to mock the sftp end point in a
similar way. Would anyone know if there is a simplistic way of doing it
using CamelTestSupport or otherwise.

I am using camel version 2.11.0 and I am using the scala dsl.

Thanks
Dhaval



--
View this message in context: 
http://camel.465427.n5.nabble.com/mocking-sftp-using-CamelTestSupport-in-pollEnrich-tp5750925.html
Sent from the Camel - Users mailing list archive at Nabble.com.


XSLT without Namespace

2014-05-06 Thread contactreji
Hi

I am trying to use XSLT component.

My incoming xml is a raw xml structure which has no namespace informations
associated with it. 
Is there a way to write xsl code to transform this into another xml
structure. 

I tried xsl code as follows

?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xsi:schemaLocation=http://www.openapplications.org/oagis/9
ProcessRequisition.xsd xmlns=http://www.openapplications.org/oagis/9;
xmlns:xsl=http://www.w3.org/1999/XSL/Transform; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:fo=http://www.w3.org/1999/XSL/Format; 
xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes/
xsl:template match=/
SyncOTECINVBALSPX baseLanguage=EN transLanguage=EN
OTECINVBALSPXSet
xsl:for-each select=INVMaximoData/INVTARGETData
INVENTORY
ITEMNUM changed=?xsl:value-of
select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE//ITEMNUM
ITEMSETID changed=?ITEMSET1/ITEMSETID
LOCATION changed=?xsl:value-of
select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/WARECODE//LOCATION
ORGID changed=?xsl:value-of
select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/SOURCESYS//ORGID
SITEID changed=?xsl:value-of
select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/SITE//SITEID
INVBALANCES
CURBAL changed=?xsl:value-of
select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/CURRBALANCE//CURBAL
/INVBALANCES
/INVENTORY
/xsl:for-each
/OTECINVBALSPXSet
/SyncOTECINVBALSPX
  
/xsl:template
/xsl:stylesheet

But unfortunately no data values in output :-(

Reji




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


Re: XSLT without Namespace

2014-05-06 Thread Grzegorz Grzybek
Hello

By adding ``xmlns=http://www.openapplications.org/oagis/9`` you actually
output the document in this namespace, not in no-namespace.
What is your input document?

regards
Grzegorz Grzybek


2014-05-06 14:41 GMT+02:00 contactreji contactr...@gmail.com:

 Hi

 I am trying to use XSLT component.

 My incoming xml is a raw xml structure which has no namespace informations
 associated with it.
 Is there a way to write xsl code to transform this into another xml
 structure.

 I tried xsl code as follows

 ?xml version=1.0 encoding=UTF-8?
 xsl:stylesheet version=1.0
 xsi:schemaLocation=http://www.openapplications.org/oagis/9
 ProcessRequisition.xsd xmlns=http://www.openapplications.org/oagis/9;
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:fo=http://www.w3.org/1999/XSL/Format;
 xsl:output method=xml version=1.0 encoding=UTF-8
 indent=yes/
 xsl:template match=/
 SyncOTECINVBALSPX baseLanguage=EN transLanguage=EN
 OTECINVBALSPXSet
 xsl:for-each select=INVMaximoData/INVTARGETData
 INVENTORY
 ITEMNUM changed=?xsl:value-of
 select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE//ITEMNUM
 ITEMSETID changed=?ITEMSET1/ITEMSETID
 LOCATION changed=?xsl:value-of

 select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/WARECODE//LOCATION
 ORGID changed=?xsl:value-of
 select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/SOURCESYS//ORGID
 SITEID changed=?xsl:value-of
 select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/SITE//SITEID
 INVBALANCES
 CURBAL changed=?xsl:value-of

 select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/CURRBALANCE//CURBAL
 /INVBALANCES
 /INVENTORY
 /xsl:for-each
 /OTECINVBALSPXSet
 /SyncOTECINVBALSPX

 /xsl:template
 /xsl:stylesheet

 But unfortunately no data values in output :-(

 Reji




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



Re: mocking sftp using CamelTestSupport in pollEnrich

2014-05-06 Thread Claus Ibsen
Hi

You can use advice with, or some other ways. See bottom of this page
for some links to read
http://camel.apache.org/testing

On Tue, May 6, 2014 at 2:28 PM, dhavalsdoshi dhaval.do...@gmail.com wrote:
 Hi,

 *Our Usecase:* On a certain trigger i.e. one file being touched in a
 particular location. On this we want to fetch a file from sftp server and
 then put it on a local file system.

 We are achieving this in the following way

 
 from(file://triggerFilePath)
  .pollEnrich(sftp://XX;, timeout = XX)
 .to(file://finalEndFilePath)
 

 This seems to be working fine. But i am having trouble trying to test this
 route using the CamelTestSupport.
 I am able to mock endpoint for fileTriggerPath and set  hat a file with this
 content should be created. But I am not able to mock the sftp end point in a
 similar way. Would anyone know if there is a simplistic way of doing it
 using CamelTestSupport or otherwise.

 I am using camel version 2.11.0 and I am using the scala dsl.

 Thanks
 Dhaval



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/mocking-sftp-using-CamelTestSupport-in-pollEnrich-tp5750925.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



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


AW: XSLT without Namespace

2014-05-06 Thread jhm
Have you tried your xsl with an xslt-tool on your input?
Or with Xalan:
java -classpath xalan.jar;xercesImpl.jar org.apache.xalan.xslt.Process -IN
input.xml -XSL transform.xsl  output.xml


Jan

 -Ursprüngliche Nachricht-
 Von: contactreji [mailto:contactr...@gmail.com]
 Gesendet: Dienstag, 6. Mai 2014 14:41
 An: users@camel.apache.org
 Betreff: XSLT without Namespace
 
 Hi
 
 I am trying to use XSLT component.
 
 My incoming xml is a raw xml structure which has no namespace
 informations associated with it.
 Is there a way to write xsl code to transform this into another xml
 structure.
 
 I tried xsl code as follows
 
 ?xml version=1.0 encoding=UTF-8?
 xsl:stylesheet version=1.0
 xsi:schemaLocation=http://www.openapplications.org/oagis/9
 ProcessRequisition.xsd xmlns=http://www.openapplications.org/oagis/9;
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:fo=http://www.w3.org/1999/XSL/Format;
   xsl:output method=xml version=1.0 encoding=UTF-8
 indent=yes/
   xsl:template match=/
   SyncOTECINVBALSPX baseLanguage=EN transLanguage=EN
   OTECINVBALSPXSet
   xsl:for-each select=INVMaximoData/INVTARGETData
   INVENTORY
   ITEMNUM changed=?xsl:value-of
 select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE//ITEMNUM
   ITEMSETID changed=?ITEMSET1/ITEMSETID
   LOCATION changed=?xsl:value-of
 select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/WARECODE//LOCA
 TION
   ORGID changed=?xsl:value-of
 select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/SOURCESYS//ORG
 ID
   SITEID changed=?xsl:value-of
 select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/SITE//SITEID
   INVBALANCES
   CURBAL changed=?xsl:value-of
 select=/INVMaximoData/INVTARGETData/SITE/EXTITEMCODE/CURRBALANCE//C
 URBAL
   /INVBALANCES
   /INVENTORY
   /xsl:for-each
   /OTECINVBALSPXSet
   /SyncOTECINVBALSPX
 
   /xsl:template
 /xsl:stylesheet
 
 But unfortunately no data values in output :-(
 
 Reji
 
 
 
 
 --
 View this message in context: http://camel.465427.n5.nabble.com/XSLT-
 without-Namespace-tp5750926.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Error loop CannotGetJdbcConnectionException, from route

2014-05-06 Thread kalber
thank you, as always, that's it. 
Setting   consumer.bridgeErrorHandler to true i can
handle onException the error.

Karlheinz




-
kh
--
View this message in context: 
http://camel.465427.n5.nabble.com/Error-loop-CannotGetJdbcConnectionException-from-route-tp5750911p5750930.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Calculation of in-flight messages in DefaultShutdownStrategy

2014-05-06 Thread chessami92
So I got a chance to look at this again and I think the root cause is an
issue with how the AggregateProcessor responds to prepareShutdown. I think
it responds correctely, but the DefaultShutdownStrategy does not consider
the fact that doing the prepareShutdown routine may actually spawn more
messages coming out of some services like the AggregateProcessor.

Take a look at
https://github.com/chessami92/camel/compare/camel-2.13.x...features%2Fbetter-route-shutdown-deferral
to see the test that I added and how I fixed the problem in the
DefaultShutdownStrategy and let me know what you think.

I can do a pull request if you think this is something that should be
included in camel core. I know there isn't a bug for it out there, so let me
know if I need to make one first, or if you even consider this behavior a
bug.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Calculation-of-in-flight-messages-in-DefaultShutdownStrategy-tp5747034p5750935.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: best way to unit test quartz routes

2014-05-06 Thread Minh Tran
Thanks, it did give me some hints.

For anyone else interested, the solution I used was to configure the quartz 
component to not start the scheduler automatically as follows.

bean id=quartz2 class=org.apache.camel.component.quartz2.QuartzComponent
property name=autoStartScheduler value=false/
/bean

In the unit test, inject this component in

@Autowired
private QuartzComponent quartzComponent;

Then during tests, set all expectations first on mocked components as per 
normal and then call

quartzComponent.getScheduler().start()

No more race conditions!

On 06/05/2014, at 9:43 PM, Claus Ibsen claus.ib...@gmail.com wrote:

 On Tue, May 6, 2014 at 1:36 PM, Minh Tran darth.minhs...@gmail.com wrote:
 No one else unit tests their quartz routes?
 
 
 Well Camel tests its own components. So maybe take a peak there
 https://github.com/apache/camel/tree/master/components/camel-quartz/src/test
 
 On 06/05/2014, at 8:51 AM, Minh Tran darth.minhs...@gmail.com wrote:
 
 Hi
 
 Most of my routes start with either direct or jms. So to test I would use 
 the @MockEndpoints and set all my expectations then trigger the route using 
 a ProducerTemplate. But I'm struggling to understand how I can do the same 
 when it's a quartz component at the start of the route.
 
 eg
 
 from uri=quartz:foo/
 to uri=bean:bar/
 
 How do you trigger this from the unit test? I'd like to be able to set all 
 my expectations before the route gets triggered.
 
 
 
 
 -- 
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/