IdempotentExtractor error in CDI context

2016-12-07 Thread kalber
I set up a route annotated with @ApplicationScoped, and inside a route with idempotent settings. Before route starts, i get this error, 07-12-2016 09:03:00 ERROR [DefaultQuartzScheduler-camel-1_Worker-4] IdempotentExtractor: Class='org.jboss.weld.bean.ProducerMethod' method='getEnhancedAnnotate

Re: SFTP via quartz2 , after first call returns only 1 file instead of all files again

2016-11-25 Thread kalber
Thanks Klaus, setting idempotent=false it's works. Regards Karlheinz - kh -- View this message in context: http://camel.465427.n5.nabble.com/SFTP-via-quartz2-after-first-call-returns-only-1-file-instead-of-all-files-again-tp5790470p5790524.html Sent from the Camel - Users mailing list

SFTP via quartz2 , after first call returns only 1 file instead of all files again

2016-11-24 Thread kalber
I have a strange behavior with sftp component launching from crontab; sftp defintition : sftp://www.myhost.it/./path? username=myname &noop=true&sortBy=file:name &include=(VC3|M)[0123456789]* &privateKeyFile=/home/myname/.ssh &scheduler=quartz2&scheduler.cron=0 45,46,47 * * * ? result : 1. call

Re: QuartzScheduler, reschedule running route

2016-06-02 Thread kalber
It's simple, remove route , replace fromDefintion & add reoute: RouteDefinition d = context.getRouteDefinition(routeId); context.removeRouteDefinition(d); List inputs = d.getInputs(); for (FromDefinition fromDefinition : inputs) fromDefinition.setUri(uri.replace(oldScheduler, newS

QuartzScheduler, reschedule running route

2016-05-27 Thread kalber
I start a route with scheduler=quartz2&scheduler.cron=0 03,11 * * * ? on an ftp component. Changing cron value on my config file an bringing up to context, how can i change schedule.cron on this running route ? Mybe context.getRouteDefinitions(), what must be replaced ? Or QuartzScheduler ? Th

Re: Camel 2.17, @Producer works only for select objects ?

2016-05-06 Thread kalber
Thanks, it's not a camel problem but simply my CDI ignorance. MyBean is never used or better Injected, consequence producer is not triggerd. Now i understand what's lazy loading is in CDI. - kh -- View this message in context: http://camel.465427.n5.nabble.com/Camel-2-17-Producer-works-

Re: Camel 2.17, @Producer works only for select objects ?

2016-05-06 Thread kalber
-- In your example below, what exactly does not work with the produceConfig producer method? Simply 'System.out.println("Not Properties")' not executed. -- Is it normal that the method return null? It's only a test, wanna see if ' 'System.out.println("Not Properties")' works. So there is a limit

Camel 2.17, @Producer works only for select objects ?

2016-05-05 Thread kalber
Hi, i'm trying to create managed beans with @Producer, but only for PropertiesComponent works. In the example below method prodceProperties works, produceConfig not. Is there a limitation under camel for @Producer ? @ApplicationScoped public class TestProducer { @Produces @Named("prop

Re: CDI.current() with 2.17.0

2016-04-26 Thread kalber
be the full class or an example class? >> >> I'll try to put together an example to show it working, may be something >> to work through. I suspect that the bean-discovery-mode=annotated is the >> problem, if you're calling within a static method in SE mode that ma

Re: CDI.current() with 2.17.0

2016-04-26 Thread kalber
yes, http://xmlns.jcp.org/xml/ns/javaee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_2.xsd"; version="1.2" bean-discovery-mode="annotated

CDI.current() with 2.17.0

2016-04-26 Thread kalber
Hi, i must create 'FileIdempotentRepository' as managed named beans programmaticly. For this i tried to use CDI.current().getBeanManager().createBean, but CDI.current is null. This are dependencies i set: org.apache.deltaspike.cdictrl deltaspike-cdictrl-weld

Re: Camel 2.17, @Converter auto detection

2016-04-06 Thread kalber
ok, instead of full class name now i insert only the package in TypeConverter file. So if i add a new converter i only must annotate class and method with @Converter an save in the configured package. - kh -- View this message in context: http://camel.465427.n5.nabble.com/Camel-2-17-Co

Camel 2.17, @Converter auto detection

2016-04-06 Thread kalber
In a version before i insert class of my converters under /resources/META-INF/services/org/apache/camel/TypeConverter file and works fine. Now i delete this file and annotated classes with @Converter. But i get this error 'Caused by: org.apache.camel.NoTypeConversionAvailableException: No type

http, authentication by 'GET' method

2015-12-29 Thread kalber
Hi, i want to pass this piece of code to http4 component : HttpGet get = new HttpGet(URL + "?" + URLEncodedUtils.format(queryParams, "UTF-8")); UsernamePasswordCr

Re: camel 2.16.1 jetty component, error 'java.lang.IllegalStateException: !(Jetty || Servlet 3.0 || ContinuationFilter)'

2015-12-02 Thread kalber
Setting useContinuation=false solves my probelm. - kh -- View this message in context: http://camel.465427.n5.nabble.com/camel-2-16-1-jetty-component-error-java-lang-IllegalStateException-Jetty-Servlet-3-0-ContinuationFil-tp5774595p5774614.html Sent from the Camel - Users mailing list archi

camel 2.16.1 jetty component, error 'java.lang.IllegalStateException: !(Jetty || Servlet 3.0 || ContinuationFilter)'

2015-12-01 Thread kalber
Passing from 2.15.3 to 2.16.1 i get this error : java.lang.IllegalStateException: !(Jetty || Servlet 3.0 || ContinuationFilter) at org.eclipse.jetty.continuation.ContinuationSupport.getContinuation(ContinuationSupport.java:108) at org.apache.camel.component.jetty.CamelContinuationSe

Re: Pojo @Consumer Annotation

2015-06-16 Thread kalber
Done, in.body is still null. Route : - from("timer://?repeatCount=1").bean(MyService.class) Bean public class MyService { @Consume(uri = "sql: select codaz, codbus, logmsg from bus.buslogger where loglev = 'STS_CFG'?dataSource=#dataSource.nagios") public void process(Excha

Re: Pojo @Consumer Annotation

2015-06-16 Thread kalber
Hi, I use just the last version 2.15.2. - kh -- View this message in context: http://camel.465427.n5.nabble.com/Pojo-Consumer-Annotation-tp5768168p5768302.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Pojo @Consumer Annotation

2015-06-15 Thread kalber
15-06-2015 13:31:24 INFO [main] MainSupport: Apache Camel 2.15.2 starting - kh -- View this message in context: http://camel.465427.n5.nabble.com/Pojo-Consumer-Annotation-tp5768168p5768259.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Pojo @Consumer Annotation

2015-06-15 Thread kalber
Hi, i simplify my select to guarantee a result and remove all sql options : @Consume(uri = "sql: select codaz, codbus, logmsg from bus.buslogger where loglev = 'STS_CFG'?dataSource=#dataSource.nagios") public void process(Object body) { System.out.println("wait"); } but parameter

Pojo @Consumer Annotation

2015-06-13 Thread kalber
I'm using this in a pojo : @Consume(uri = "sql: select codaz, codbus, logmsg from bus.buslogger where loglev = 'STS_CFG' and (logmsg like 'V60%' or logmsg like 'V65%') and instr(logmsg,'UNREACHABLE') = 0 and instr(logmsg,'UNKNOWN') = 0 and substring(scriptver,instr(scriptver,'=')+1) >= '2.2.0' and

Camel bindy, empty file cause Exception

2015-02-12 Thread kalber
Hi, is there a way to avoid 'java.lang.IllegalArgumentException: No records have been defined in the CSV' when the input file is completly empty ? Or i must check it in the route like '{body.length} > 0' ? thanks Karlheinz - kh -- View this message in context: http://camel.465427.n5.n

Using AggregationStrategies.bean, setting in bean header value

2015-02-03 Thread kalber
Hi, i'm setting up on a route a split like this : split(body(), AggregationStrategies.bean(BusAggregator.class)). In BusAggregator i put a value on booth headers, but i can't find this header on the next step e.g a log : public String process(String prevBody, Map prevHeaders,

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

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 -

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.Canno

Re: Mail attachment, zip files goes to message body

2014-01-30 Thread kalber
Hi thanks for response, my problem was ( and this also on log4j ) that i had geronimo-mail.jar on my classpath. Excluding it, work's fine. thanks karlheinz - kh -- View this message in context: http://camel.465427.n5.nabble.com/Mail-attachment-zip-files-goes-to-message-body-tp5746400p57

Mail attachment, zip files goes to message body

2014-01-23 Thread kalber
Hi, i try to send a zip file as an attachment in a mail, but it finished in the message body, see below. In a bean i attach the zip file to the message with this code : exchange.getIn().addAttachment(filename,new DataHandler(new FileDataSource(pathname))); and then i try to set the content typ

Parallel processing

2013-12-31 Thread kalber
Hi, i try to process in parallel 2 http request using SEDA component, but only one message at time is processed. Here my configuration, where i set concurrentConsumers=2 : from("direct:parallelDirect") .split(body(ArrayList.class)) .to("seda:parallelSeda?concurrentConsumers=2") .to("direct:re

RE: sftp without passward, unable to connect

2013-10-31 Thread kalber
Hi, now i understood. Using sftp ( not ftps what i did ) i can i use my private ssh key file. Setting up privateKeyFile works fine. thanks for our time and explanations. kh - kh -- View this message in context: http://camel.465427.n5.nabble.com/sftp-without-passward-unable-to-connect

Re: sftp without passward, unable to connect

2013-10-31 Thread kalber
Thanks, now i understood. I must use sftp and setting privateKeyFile (there is no automatism find that the key file, as from commandline) It works fine. Thanks for your time and explanations. Karlheinz - kh -- View this message in context: http://camel.465427.n5.nabble.com/sftp-wit

RE: sftp without passward, unable to connect

2013-10-30 Thread kalber
Hi, yes i'm using private key to authenticate to the server. I add how you suggest the uri options from ftps component as follow : 1. ftpClient.keyStore.file=/home/kalber/xx/id_rsa 2. ftpClient.keyStore.password=password ( only to avoid null pointer, no password need ) After this i

sftp without passward, unable to connect

2013-10-30 Thread kalber
I try to download files via sftp from a server. This works fine from command line , here the command sftp dat2...@tim.mbus:sasa/ftp/orario*.* /tmp Trying to use ftp camels ftp component, a connection is not established. What must i configure to connect with the server via sftp ? Below the log o

Using POJOs as AggregationStrategy, previous and next not correct

2013-10-14 Thread kalber
I use a POJO for aggregation with a file that has this 4 records : 2013-10-09 2013-10-10 2013-10-11 2013-10-12 Debugging the code i receive thiw 3 iterations : 1stpRecod=2013-10-09 and nRecord=2013-10-10 2th pRecod=2013-10-09 and nRecord=2013-10-11 3th

Re: Route with more uris e.g. .to(uri1, uri2 .. ), uris are processed sequential?

2013-09-17 Thread kalber
I substitute from with fromF, thanks. This route works, but i'm not sure if delete finish before insert starts ? So the question is are this uris processed sequential ? - kh -- View this message in context: http://camel.465427.n5.nabble.com/Route-with-more-uris-e-g-to-uri1-uri2-uris-are-p

Route with more uris e.g. .to(uri1, uri2 .. ), uris are processed sequential?

2013-09-17 Thread kalber
I setup route below where in to method i call first the direct:delete and after direct:insert. direct:delete cleans and direct:insert populates a table. My question is, direct:insert starts after direct:delete has finish ? Are the to uris processed sequential ? // route from(String.format( "sq

Re: Camel 2.11.1, sql component returns a LinkedCaseInsensitiveMap for evry row, not a ArrayList

2013-09-06 Thread kalber
thanks that's it - kh -- View this message in context: http://camel.465427.n5.nabble.com/Camel-2-11-1-sql-component-returns-a-LinkedCaseInsensitiveMap-for-evry-row-not-a-ArrayList-tp5738761p5738846.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel 2.11.1, sql component returns a LinkedCaseInsensitiveMap for evry row, not a ArrayList

2013-09-05 Thread kalber
Î receive for every row of the resulset an exchange - body with a LinkedCaseInsensitiveMap object like this : {OBJ_CODE=6036.1, PRV_TARGA=EL809DT, STC_PCCODE=3232.PC, PRV_PRODTELA=null, PRV_MODTELA=530 K, PRV_TIPOBUS=null} My question is how can a configure out the from endpoint to send me once a

Camel 2.11.1, sql component returns a LinkedCaseInsensitiveMap for evry row, not a ArrayList

2013-09-05 Thread kalber
I configured this route : from("sql:select obj_code, prv_targa, stc_pccode, prv_prodtela, prv_modtela, prv_tipobus from cust_positions where obj_org in ('ICT') and obj_class in ('BUS') order by prv_concessi?dataSource=#dataSource.infor&noop=true") .process(new Export

Re: Stop polling, FTP Component

2013-08-27 Thread kalber
Hi, i brought my route configuration into the ftp example of camel (/apache-camel-2.11.1/examples/camel-example-ftp) and configured out the ftp.properties for testing : ftp.client=ftp://myserver.xx.com:21/?username=myusernamet&password=mypassword ftp.server={{ftp.client}}&noop=true&include=pneus_

Re: Stop polling, FTP Component

2013-08-26 Thread kalber
yes it's complete, but program is still running. 6-08-2013 13:34:06 INFO [Camel (camel-1) thread #0 - ftp://service.sad.it:21/] route1: Downloaded file pneus_20130820.csv complete. 26-08-2013 13:34:06 INFO [Camel (camel-1) thread #0 - ftp://service.sad.it:21/] route1: Downloaded file pneus_20130

Re: Stop polling, FTP Component

2013-08-26 Thread kalber
adding disconnect=true FTPComponent is in the 'Connected and logged in to' loop INFO [Camel (camel-1) thread #0 - ftp://service.sad.it:21/] route1: Downloaded file pneus_20130820.csv complete. INFO [Camel (camel-1) thread #0 - ftp://service.sad.it:21/] route1: Downloaded file pneus_20130821.csv

Stop polling, FTP Component

2013-08-25 Thread kalber
hi, i'm using FTP component with noop option. After downloaded all files the process stops but the program is still running. How can i exit from the pooling cycle ? -- View this message in context: http://camel.465427.n5.nabble.com/Stop-polling-FTP-Component-tp5737925.html Sent from the Ca

Re: ftp component, no download

2013-08-14 Thread kalber
ok, i understand but i use camelContext with start so for sql component e.g. from("direct:infor.insert.ipnl_passages") .to("sql:insert into cust_ipnl_passages (ID,DT_CRT,FLAG_TO_DUPLICAT,FLAG_TO_REDIRECT,LINE_CODE,RUN_CODE,COM_CODE,COMPANY_CODE,DT

ftp component, no download

2013-08-14 Thread kalber
Hi, i'm using the ftp server example with my server, user.. and it works. Below the output : [INFO] --- exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-ftp --- 2013-08-14 08:30:36,422 [tpServer.main()] INFO MainSupport - Apache Camel 2.11.1 starting

Sql Component insert with batch=true, Camel 2.11

2013-05-06 Thread kalber
Hi, i'm working on an Oracle-DB 10.2.0.1.0 and using ojdbc6.jar. Using the Sql component it works inserting record with the this. configuration : @Override public void configure() throws Exception { from("direct:infor.insert.ipnl_passages") .to("s

Re: Upgrade from 2.10 -> 2.11.0

2013-05-05 Thread kalber
Thanks, it works. -- View this message in context: http://camel.465427.n5.nabble.com/Upgrade-from-2-10-2-11-0-tp5732017p5732045.html Sent from the Camel - Users mailing list archive at Nabble.com.

Upgrade from 2.10 -> 2.11.0

2013-05-04 Thread kalber
Hi, upgrading to 2.11 in the lib/optional directory aren't spring release 3.0.7 jars : spring-beans-3.0.7.RELEASE.jar spring-core-3.0.7.RELEASE.jar spring-jdbc-3.0.7.RELEASE.jar spring-tx-3.0.7.RELEASE.jar I can use these on ? Doing this i get this error what with 2.10 works well : org.apach