Re: Query on Camel JDBC Adapter use

2021-02-10 Thread Andrea Cosentino
Hello,

Please don't re-post the same question multiple times.

Here is an example of jdbc component usage:

https://github.com/apache/camel-examples/tree/master/examples/camel-example-jdbc

Il giorno gio 11 feb 2021 alle ore 08:30 Sandeep3 Singh
 ha scritto:

> Hi Camel Team,
>
> I am planning to use Camel JDBC adapter to connect SAP-HANA with
> Snowflake database. SAP vendor has recommended to use this adapter and
> hence we want to check if it works. I have the below queries about this
> adapter
>
> What all Apache softwares are required to make Camel JDBC adapter work ?
> Do I need only the adapter or I would also need to install the Apache
> Camel Framework ? Or more softwares would be required ? Please provide the
> list.
> I would highly appreciate if you can share the links for all the Apache
> software downloads to make the Camel JDBC adapter work.
> Any other instructions/recommendations that I need to consider.
>
>   An early response would be appreciated as this is critical for our
> project.
>
> Regards
> Sandeep Singh
> =-=-=
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>


Query on Camel JDBC Adapter use

2021-02-10 Thread Sandeep3 Singh
Hi Camel Team,

I am planning to use Camel JDBC adapter to connect SAP-HANA with 
Snowflake database. SAP vendor has recommended to use this adapter and 
hence we want to check if it works. I have the below queries about this 
adapter

What all Apache softwares are required to make Camel JDBC adapter work ? 
Do I need only the adapter or I would also need to install the Apache 
Camel Framework ? Or more softwares would be required ? Please provide the 
list.
I would highly appreciate if you can share the links for all the Apache 
software downloads to make the Camel JDBC adapter work.
Any other instructions/recommendations that I need to consider.

  An early response would be appreciated as this is critical for our 
project.

Regards
Sandeep Singh
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




Query on Camel JDBC Adapter for Snowflake database access

2021-02-08 Thread Sandeep3 Singh
Hi Camel Team,

I am planning to use Camel JDBC adapter to connect SAP-HANA with 
Snowflake database. SAP vendor has recommended to use this adapter and 
hence we want to check if it works. I have the below queries about this 
adapter

What all Apache softwares are required to make Camel JDBC adapter work ? 
Do I need only the adapter or I would also need to install the Apache 
Camel Framework ? Or more softwares would be required ? Please provide the 
list.
I would highly appreciate if you can share the links for all the Apache 
software downloads to make the Camel JDBC adapter work.
Any other instructions/recommendations that I need to consider.

  An early response would be appreciated as this is critical for our 
project.

Regards
Sandeep Singh
Tata Consultancy Services
Mailto: sandeep3.si...@tcs.com
Website: http://www.tcs.com

Experience certainty.   IT Services
Business Solutions
Consulting

=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




Re: Camel JDBC or SQL component vs SpringJDBCTemplate

2020-08-12 Thread Jeremy Ross
The SQL component is backed by spring-jdbc, and I believe it uses
JdbcTemplate extensively under the hood. I haven't compared performance of
SQL vs JDBC components, but a further benefit of the SQL component is that
it can be used in Camel's transaction support.

On Fri, Aug 7, 2020 at 10:56 PM WEIQUAN YUAN  wrote:

> Just wondering what is the implementation behind the camel jdbc or sql
> component, how is the performance compared to springJDBCTemplate?
>
> Thanks
> --
> ~
> Weiquan Yuan
> Located in Ottawa, Canada
>


Camel JDBC or SQL component vs SpringJDBCTemplate

2020-08-07 Thread WEIQUAN YUAN
Just wondering what is the implementation behind the camel jdbc or sql
component, how is the performance compared to springJDBCTemplate?

Thanks
-- 
~
Weiquan Yuan
Located in Ottawa, Canada


Re: Camel Jdbc // Error while connecting to HIVE

2020-04-29 Thread Claus Ibsen
Hi

Try set resetAutoCommit=false

On Wed, Apr 29, 2020 at 5:05 PM Reji Mathews  wrote:
>
> Hello community
>
> I am using camel jdbc component to query some data from HIVE database. When I 
> trigger a query, it throws me off with following stack trace. Has any 
> attempted connecting to HIVE database using camel jdbc component? Or, is 
> there a better component to achieve the task.
>
> PS: I have already tested connecting to HIVE database using RazorSQL just to 
> ensure everything is ok with the database setup.
>
> 2020-04-29 10:42:00.960 - INFO 425268 --- [http-nio--exec-3] 
> o.apache.camel.impl.DefaultCamelContext [lineno:3186] : Total 1 routes, 
> of which 1 are started
> 2020-04-29 10:42:00.960 - INFO 425268 --- [http-nio--exec-3] 
> o.apache.camel.impl.DefaultCamelContext [lineno:3197] : Apache Camel 
> 2.24.1 (CamelContext: a7ed99f3-742b-48ca-873e-ac17ae4975b8) started in 1.181 
> seconds
> 2020-04-29 10:42:02.055 - INFO 425268 --- [http-nio--exec-3] 
> com.company.camel.core.FlowManager   [lineno:124] :  version="1.0" encoding="UTF-8" standalone="yes"?>
> http://camel.apache.org/schema/spring";>
> 
> http://0.0.0.0:8081/hive?httpMethodRestrict=GET"/>
> 
> 
> 
> select * from employee
> 
> 
> 
> 
> 
> language[constant:json]
> 
> 
>  propertyName="DESTINATION_FORMAT_TYPE"/>
> 
> 
>
> 2020-04-29 10:42:05.047 - INFO 425268 --- [qtp27332965-56] route1 
>  [lineno:159] : Received http payload :
> 2020-04-29 10:42:05.065 - INFO 425268 --- [qtp27332965-56] route1 
>  [lineno:159] : Executing Sql Statement : select * 
> from employee
> 2020-04-29 10:42:05.125 - INFO 425268 --- [qtp27332965-56] 
> org.apache.hive.jdbc.Utils  [lineno:325] : Supplied 
> authorities: 10.213.96.182:1
> 2020-04-29 10:42:05.126 - INFO 425268 --- [qtp27332965-56] 
> org.apache.hive.jdbc.Utils  [lineno:444] : Resolved 
> authority: 10.213.96.182:1
> 2020-04-29 10:42:05.605 - INFO 425268 --- [qtp27332965-56] 
> org.apache.hive.jdbc.Utils  [lineno:325] : Supplied 
> authorities: 10.213.96.182:1
> 2020-04-29 10:42:05.606 - INFO 425268 --- [qtp27332965-56] 
> org.apache.hive.jdbc.Utils  [lineno:444] : Resolved 
> authority: 10.213.96.182:1
> 2020-04-29 10:42:05.768 - WARN 425268 --- [qtp27332965-56] 
> org.apache.hive.jdbc.HiveConnection [lineno:1329] : Request to set 
> autoCommit to false; Hive does not support autoCommit=false.
> 2020-04-29 10:42:06.338 - WARN 425268 --- [qtp27332965-56] 
> o.a.camel.component.jdbc.JdbcProducer   [lineno:95] : Error occurred 
> during jdbc rollback. This exception will be ignored.
>
> java.sql.SQLFeatureNotSupportedException: Method not supported
>   at 
> org.apache.hive.jdbc.HiveConnection.rollback(HiveConnection.java:1299) 
> ~[hive-jdbc-2.3.7.jar:2.3.7]
>   at 
> org.apache.commons.dbcp2.DelegatingConnection.rollback(DelegatingConnection.java:488)
>  ~[commons-dbcp2-2.0.1.jar:2.0.1]
>   at 
> org.apache.commons.dbcp2.DelegatingConnection.rollback(DelegatingConnection.java:488)
>  ~[commons-dbcp2-2.0.1.jar:2.0.1]
>   at 
> org.apache.camel.component.jdbc.JdbcProducer.processingSqlBySettingAutoCommit(JdbcProducer.java:92)
>  [camel-jdbc-2.24.1.jar:2.24.1]
>   at 
> org.apache.camel.component.jdbc.JdbcProducer.process(JdbcProducer.java:67) 
> [camel-jdbc-2.24.1.jar:2.24.1]
>   at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  [camel-core-2.24.1.jar:2.24.1]
>   at 
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
> [camel-core-2.24.1.jar:2.24.1]
>   at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
>  [camel-core-2.24.1.jar:2.24.1]
>   at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.24.1.jar:2.24.1]
>   at 
> org.apache.camel.processor.Pipeline.process(Pipeline.java:138) 
> [camel-core-2.24.1.jar:2.24.1]
>   at 
> org.apache.camel.processor.Pipeline.process(Pipeline.java:101) 
> [camel-core-2.24.1.jar:2.24.1]
>   at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.24.1.jar:2.24.1]
>  

Camel Jdbc // Error while connecting to HIVE

2020-04-29 Thread Reji Mathews
Hello community

I am using camel jdbc component to query some data from HIVE database. When I 
trigger a query, it throws me off with following stack trace. Has any attempted 
connecting to HIVE database using camel jdbc component? Or, is there a better 
component to achieve the task.

PS: I have already tested connecting to HIVE database using RazorSQL just to 
ensure everything is ok with the database setup.

2020-04-29 10:42:00.960 - INFO 425268 --- [http-nio--exec-3] 
o.apache.camel.impl.DefaultCamelContext [lineno:3186] : Total 1 routes, of 
which 1 are started
2020-04-29 10:42:00.960 - INFO 425268 --- [http-nio--exec-3] 
o.apache.camel.impl.DefaultCamelContext [lineno:3197] : Apache Camel 2.24.1 
(CamelContext: a7ed99f3-742b-48ca-873e-ac17ae4975b8) started in 1.181 seconds
2020-04-29 10:42:02.055 - INFO 425268 --- [http-nio--exec-3] 
com.company.camel.core.FlowManager   [lineno:124] : 
http://camel.apache.org/schema/spring";>

http://0.0.0.0:8081/hive?httpMethodRestrict=GET"/>



select * from employee




language[constant:json]






2020-04-29 10:42:05.047 - INFO 425268 --- [qtp27332965-56] route1   
   [lineno:159] : Received http payload :
2020-04-29 10:42:05.065 - INFO 425268 --- [qtp27332965-56] route1   
   [lineno:159] : Executing Sql Statement : select * from 
employee
2020-04-29 10:42:05.125 - INFO 425268 --- [qtp27332965-56] 
org.apache.hive.jdbc.Utils  [lineno:325] : Supplied 
authorities: 10.213.96.182:1
2020-04-29 10:42:05.126 - INFO 425268 --- [qtp27332965-56] 
org.apache.hive.jdbc.Utils  [lineno:444] : Resolved authority: 
10.213.96.182:1
2020-04-29 10:42:05.605 - INFO 425268 --- [qtp27332965-56] 
org.apache.hive.jdbc.Utils  [lineno:325] : Supplied 
authorities: 10.213.96.182:1
2020-04-29 10:42:05.606 - INFO 425268 --- [qtp27332965-56] 
org.apache.hive.jdbc.Utils  [lineno:444] : Resolved authority: 
10.213.96.182:1
2020-04-29 10:42:05.768 - WARN 425268 --- [qtp27332965-56] 
org.apache.hive.jdbc.HiveConnection [lineno:1329] : Request to set 
autoCommit to false; Hive does not support autoCommit=false.
2020-04-29 10:42:06.338 - WARN 425268 --- [qtp27332965-56] 
o.a.camel.component.jdbc.JdbcProducer   [lineno:95] : Error occurred during 
jdbc rollback. This exception will be ignored.

java.sql.SQLFeatureNotSupportedException: Method not supported
  at 
org.apache.hive.jdbc.HiveConnection.rollback(HiveConnection.java:1299) 
~[hive-jdbc-2.3.7.jar:2.3.7]
  at 
org.apache.commons.dbcp2.DelegatingConnection.rollback(DelegatingConnection.java:488)
 ~[commons-dbcp2-2.0.1.jar:2.0.1]
  at 
org.apache.commons.dbcp2.DelegatingConnection.rollback(DelegatingConnection.java:488)
 ~[commons-dbcp2-2.0.1.jar:2.0.1]
  at 
org.apache.camel.component.jdbc.JdbcProducer.processingSqlBySettingAutoCommit(JdbcProducer.java:92)
 [camel-jdbc-2.24.1.jar:2.24.1]
  at 
org.apache.camel.component.jdbc.JdbcProducer.process(JdbcProducer.java:67) 
[camel-jdbc-2.24.1.jar:2.24.1]
  at 
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
 [camel-core-2.24.1.jar:2.24.1]
  at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
[camel-core-2.24.1.jar:2.24.1]
  at 
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
 [camel-core-2.24.1.jar:2.24.1]
  at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
 [camel-core-2.24.1.jar:2.24.1]
  at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) 
[camel-core-2.24.1.jar:2.24.1]
  at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) 
[camel-core-2.24.1.jar:2.24.1]
  at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
 [camel-core-2.24.1.jar:2.24.1]
  at 
org.apache.camel.component.jetty.CamelContinuationServlet.doService(CamelContinuationServlet.java:220)
 [camel-jetty-common-2.24.1.jar:2.24.1]
  at 
org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:79) 
[camel-http-common-2.24.1.jar:2.24.1]
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 
[tomcat-embed-core-9.0.21.jar:9.0.21]
  at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:876) 
[jetty-servlet-9.4.19.v20190610.jar:9.4.19.v20190610]
  at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623)
 [jetty-servlet-9.4.19.v20190610.jar:9.4.19.v20190610]

Camel JDBC producer custom type converter

2018-01-02 Thread Sujay Bawaskar
Hi,

Is there any way to get particular column from result set into a specific
type?

For example I need to get timestamp stored in postgresql as below, but I am
getting this object as java.sql.Timestamp.

resultSet.getObject( "date", OffsetDateTime.class )

Another issue is with outputClass parameter, can we have field specific
type conversion?

-- 
Thanks,
Sujay P Bawaskar
M:+91-77091 53669


Re: Bug in the camel - JDBC

2017-06-05 Thread raja
Starnge, If I remove CamelHeaders after JDBC Insert No Exception arise in the
JDBC Select.
If CamelHeaders Present then Statement is Closed Exception arise.



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


Re: Camel jdbc - select batch processing

2017-06-05 Thread raja
Simple solution is* Splitter with Collate*



collate(200)

   






--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-jdbc-select-batch-processing-tp5801682p5801832.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Bug in the camel - JDBC

2017-06-05 Thread Claus Ibsen
Try set resetAutoCommit=false

On Mon, Jun 5, 2017 at 12:17 PM, raja  wrote:
> Hi,
> While working in the camel JDBC, I got Exception state that  "Statement
> is closed"
>
>  My Route:
>   
> 
> 
> 
> 
>
> I can able to Insert.There is no problem while Insertion.
> But I am getting Exception in the JDBC Selection
>
> Exception Message :The statement is closed.
> StackTrace:com.microsoft.sqlserver.jdbc.SQLServerException: The statement is
> closed.
> at
> com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:130)
> at
> com.microsoft.sqlserver.jdbc.SQLServerStatement.checkClosed(SQLServerStatement.java:818)
> at
> com.microsoft.sqlserver.jdbc.SQLServerStatement.getGeneratedKeys(SQLServerStatement.java:1880)
> at
> org.apache.camel.component.jdbc.JdbcProducer.doCreateAndExecuteSqlStatement(JdbcProducer.java:235)
> at
> org.apache.camel.component.jdbc.JdbcProducer.createAndExecuteSqlStatement(JdbcProducer.java:125)
> at
> org.apache.camel.component.jdbc.JdbcProducer.processingSqlBySettingAutoCommit(JdbcProducer.java:86)
> at
> org.apache.camel.component.jdbc.JdbcProducer.process(JdbcProducer.java:67)
> at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> at 
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
> at 
> org.apache.camel.processor.TryProcessor.process(TryProcessor.java:113)
> at 
> org.apache.camel.processor.TryProcessor.process(TryProcessor.java:84)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
> at
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
> at 
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
> at 
> org.apache.camel.processor.TryProcessor.process(TryProcessor.java:113)
> at 
> org.apache.camel.processor.TryProcessor.process(TryProcessor.java:84)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
> at 
> org.apache.camel.processor.TryProcessor.process(TryProcessor.java:113)
> at 
> org.apache.camel.processor.TryProcessor.process(TryProcessor.java:84)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
> at
> org.apache.camel.component.mail.MailConsumer.processExchange(MailConsumer.java:392)
> at
> org.apache.camel.component.mail.MailConsumer.processBatch(MailConsumer.java:221)
> at 
> org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:128)
> at
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)
> at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)
> at 

Bug in the camel - JDBC

2017-06-05 Thread raja
Hi,
While working in the camel JDBC, I got Exception state that  "Statement
is closed"
   
 My Route:
  





I can able to Insert.There is no problem while Insertion.
But I am getting Exception in the JDBC Selection

Exception Message :The statement is closed. 
StackTrace:com.microsoft.sqlserver.jdbc.SQLServerException: The statement is
closed.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:130)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.checkClosed(SQLServerStatement.java:818)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.getGeneratedKeys(SQLServerStatement.java:1880)
at
org.apache.camel.component.jdbc.JdbcProducer.doCreateAndExecuteSqlStatement(JdbcProducer.java:235)
at
org.apache.camel.component.jdbc.JdbcProducer.createAndExecuteSqlStatement(JdbcProducer.java:125)
at
org.apache.camel.component.jdbc.JdbcProducer.processingSqlBySettingAutoCommit(JdbcProducer.java:86)
at
org.apache.camel.component.jdbc.JdbcProducer.process(JdbcProducer.java:67)
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at 
org.apache.camel.processor.TryProcessor.process(TryProcessor.java:113)
at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:84)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at 
org.apache.camel.processor.TryProcessor.process(TryProcessor.java:113)
at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:84)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at 
org.apache.camel.processor.TryProcessor.process(TryProcessor.java:113)
at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:84)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
at
org.apache.camel.component.mail.MailConsumer.processExchange(MailConsumer.java:392)
at
org.apache.camel.component.mail.MailConsumer.processBatch(MailConsumer.java:221)
at 
org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:128)
at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecuto

Re: Camel jdbc - select batch processing

2017-06-03 Thread Quinn Stevenson
I believe you’d need to split using a bean to accomplish what you’re after.

Another method would be to split into single rows and then use the aggregator 
to create the batches of 200 rows each.

> On Jun 2, 2017, at 2:51 AM, raja  wrote:
> 
> Hi all,
>How to select batch of records from resulting List in jdbc.
>ex: If select returns List of 1000 rows, I want to split and process 200
> records per batch.Splitter is not working, its split single row. How to use
> like tokenize with group in splitter in this case.
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-jdbc-select-batch-processing-tp5801682.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



Camel jdbc - select batch processing

2017-06-02 Thread raja
Hi all,
How to select batch of records from resulting List in jdbc.
ex: If select returns List of 1000 rows, I want to split and process 200
records per batch.Splitter is not working, its split single row. How to use
like tokenize with group in splitter in this case.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-jdbc-select-batch-processing-tp5801682.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using Camel JDBC component

2017-04-04 Thread Claus Ibsen
Ad 1)
You set a javax sql DataSource. So search the internet what that is
and how to configure it.

Ad 2)
You set the queries in the message body. If you dont want to do that,
use another component like camel-sql, or camel-mybatis, or camel-jpa
from next release which has some support for queries.

And there is some database examples
https://github.com/apache/camel/tree/master/examples

On Tue, Apr 4, 2017 at 3:29 PM, anirban.gupta4  wrote:
> Hi,
>
> I am using camel JDBC component. I found the documentation at the location
>
> http://camel.apache.org/jdbc.html
>
> I have two questions here:
> 1. I have an URL of type "jdbc:sqlserver://someIP". How will I pass any
> queries here?
> 2. How to set the userName, password for connecting to this DB?
>
> I am migrating from some other integration framework to Camel. So do not
> know how to do this in Camel.
>
> Please help
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Using-Camel-JDBC-component-tp5796916.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


Using Camel JDBC component

2017-04-04 Thread anirban.gupta4
Hi,

I am using camel JDBC component. I found the documentation at the location

http://camel.apache.org/jdbc.html

I have two questions here:
1. I have an URL of type "jdbc:sqlserver://someIP". How will I pass any
queries here?
2. How to set the userName, password for connecting to this DB?

I am migrating from some other integration framework to Camel. So do not
know how to do this in Camel.

Please help



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


Re: camel-jdbc typo?

2016-08-05 Thread Allan C.
Sweet. Thanks and cheers.

Regards,
Allan C.

On Sat, Aug 6, 2016 at 11:06 AM, Matt Sicker  wrote:

> Alright, I've fixed that typo too:
> https://cwiki.apache.org/confluence/display/CAMEL/JDBC
>
> Not sure how often the html page is regenerated from the wiki, though.
>
> On 5 August 2016 at 22:00, Allan C.  wrote:
>
> > Hi Matt,
> >
> > I've checked on the codes, the constant header value is
> > "CamelJdbcParameters" and it is used in the exchange in header, thus it
> > could be safely concluded that the typo only occurs at the doc.
> >
> > Regards,
> > Allan C.
> >
> > On Sat, Aug 6, 2016 at 9:59 AM, Matt Sicker  wrote:
> >
> > > The docs are on Confluence. You can submit an ICLA to get edit
> > permissions
> > > there. Though there is work being done to migrate the docs all to
> > asciidoc
> > > files in the source code.
> > >
> > > On 5 August 2016 at 20:38, Allan C.  wrote:
> > >
> > > > Apologies. I am using non plain text editor.
> > > >
> > > > The other one is "CamelJdbcParametes" header. I didn't look into the
> > > codes
> > > > if the actual header is without an "r", but I supposed it is, as,
> > correct
> > > > me if I am wrong, the doc is generated from the code's annotation?
> > > >
> > > > Regards,
> > > > Allan C.
> > > >
> > > > On Sat, Aug 6, 2016 at 9:18 AM, Matt Sicker 
> wrote:
> > > >
> > > > > I fixed the "kets" typo, can't tell if you're point out any others,
> > > > though.
> > > > >
> > > > > On 5 August 2016 at 19:09, Allan C.  wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I was going through camel-jdbc docs here <
> > > http://camel.apache.org/jdbc
> > > > .
> > > > > > html>.
> > > > > > I noticed what seems to be a couple of minor typos in the doc.
> > > > > >
> > > > > > Header
> > > > > >
> > > > > > Description
> > > > > >
> > > > > > CamelJdbcRowCount
> > > > > >
> > > > > > If the query is a SELECT, query the row count is returned in this
> > OUT
> > > > > > header.
> > > > > >
> > > > > > CamelJdbcUpdateCount
> > > > > >
> > > > > > If the query is an UPDATE, query the update count is returned in
> > this
> > > > OUT
> > > > > > header.
> > > > > >
> > > > > > CamelGeneratedKeysRows
> > > > > >
> > > > > > *Camel 2.10:* Rows that contains the generated kets.
> > > > > >
> > > > > > CamelGeneratedKeysRowCount
> > > > > >
> > > > > > *Camel 2.10:* The number of rows in the header that contains
> > > generated
> > > > > > keys.
> > > > > >
> > > > > > CamelJdbcColumnNames
> > > > > >
> > > > > > *Camel 2.11.1:* The column names from the ResultSet as a
> > > java.util.Set
> > > > > > type.
> > > > > >
> > > > > > CamelJdbcParametes
> > > > > >
> > > > > > *Camel 2.12:* A java.util.Map which has the headers to be used if
> > > > > > useHeadersAsParameters has been enabled.
> > > > > >
> > > > > > Regards,
> > > > > > Allan C.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matt Sicker 
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker 
> > >
> >
>
>
>
> --
> Matt Sicker 
>


Re: camel-jdbc typo?

2016-08-05 Thread Matt Sicker
Alright, I've fixed that typo too:
https://cwiki.apache.org/confluence/display/CAMEL/JDBC

Not sure how often the html page is regenerated from the wiki, though.

On 5 August 2016 at 22:00, Allan C.  wrote:

> Hi Matt,
>
> I've checked on the codes, the constant header value is
> "CamelJdbcParameters" and it is used in the exchange in header, thus it
> could be safely concluded that the typo only occurs at the doc.
>
> Regards,
> Allan C.
>
> On Sat, Aug 6, 2016 at 9:59 AM, Matt Sicker  wrote:
>
> > The docs are on Confluence. You can submit an ICLA to get edit
> permissions
> > there. Though there is work being done to migrate the docs all to
> asciidoc
> > files in the source code.
> >
> > On 5 August 2016 at 20:38, Allan C.  wrote:
> >
> > > Apologies. I am using non plain text editor.
> > >
> > > The other one is "CamelJdbcParametes" header. I didn't look into the
> > codes
> > > if the actual header is without an "r", but I supposed it is, as,
> correct
> > > me if I am wrong, the doc is generated from the code's annotation?
> > >
> > > Regards,
> > > Allan C.
> > >
> > > On Sat, Aug 6, 2016 at 9:18 AM, Matt Sicker  wrote:
> > >
> > > > I fixed the "kets" typo, can't tell if you're point out any others,
> > > though.
> > > >
> > > > On 5 August 2016 at 19:09, Allan C.  wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I was going through camel-jdbc docs here <
> > http://camel.apache.org/jdbc
> > > .
> > > > > html>.
> > > > > I noticed what seems to be a couple of minor typos in the doc.
> > > > >
> > > > > Header
> > > > >
> > > > > Description
> > > > >
> > > > > CamelJdbcRowCount
> > > > >
> > > > > If the query is a SELECT, query the row count is returned in this
> OUT
> > > > > header.
> > > > >
> > > > > CamelJdbcUpdateCount
> > > > >
> > > > > If the query is an UPDATE, query the update count is returned in
> this
> > > OUT
> > > > > header.
> > > > >
> > > > > CamelGeneratedKeysRows
> > > > >
> > > > > *Camel 2.10:* Rows that contains the generated kets.
> > > > >
> > > > > CamelGeneratedKeysRowCount
> > > > >
> > > > > *Camel 2.10:* The number of rows in the header that contains
> > generated
> > > > > keys.
> > > > >
> > > > > CamelJdbcColumnNames
> > > > >
> > > > > *Camel 2.11.1:* The column names from the ResultSet as a
> > java.util.Set
> > > > > type.
> > > > >
> > > > > CamelJdbcParametes
> > > > >
> > > > > *Camel 2.12:* A java.util.Map which has the headers to be used if
> > > > > useHeadersAsParameters has been enabled.
> > > > >
> > > > > Regards,
> > > > > Allan C.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Matt Sicker 
> > > >
> > >
> >
> >
> >
> > --
> > Matt Sicker 
> >
>



-- 
Matt Sicker 


Re: camel-jdbc typo?

2016-08-05 Thread Allan C.
Hi Matt,

I've checked on the codes, the constant header value is
"CamelJdbcParameters" and it is used in the exchange in header, thus it
could be safely concluded that the typo only occurs at the doc.

Regards,
Allan C.

On Sat, Aug 6, 2016 at 9:59 AM, Matt Sicker  wrote:

> The docs are on Confluence. You can submit an ICLA to get edit permissions
> there. Though there is work being done to migrate the docs all to asciidoc
> files in the source code.
>
> On 5 August 2016 at 20:38, Allan C.  wrote:
>
> > Apologies. I am using non plain text editor.
> >
> > The other one is "CamelJdbcParametes" header. I didn't look into the
> codes
> > if the actual header is without an "r", but I supposed it is, as, correct
> > me if I am wrong, the doc is generated from the code's annotation?
> >
> > Regards,
> > Allan C.
> >
> > On Sat, Aug 6, 2016 at 9:18 AM, Matt Sicker  wrote:
> >
> > > I fixed the "kets" typo, can't tell if you're point out any others,
> > though.
> > >
> > > On 5 August 2016 at 19:09, Allan C.  wrote:
> > >
> > > > Hi,
> > > >
> > > > I was going through camel-jdbc docs here <
> http://camel.apache.org/jdbc
> > .
> > > > html>.
> > > > I noticed what seems to be a couple of minor typos in the doc.
> > > >
> > > > Header
> > > >
> > > > Description
> > > >
> > > > CamelJdbcRowCount
> > > >
> > > > If the query is a SELECT, query the row count is returned in this OUT
> > > > header.
> > > >
> > > > CamelJdbcUpdateCount
> > > >
> > > > If the query is an UPDATE, query the update count is returned in this
> > OUT
> > > > header.
> > > >
> > > > CamelGeneratedKeysRows
> > > >
> > > > *Camel 2.10:* Rows that contains the generated kets.
> > > >
> > > > CamelGeneratedKeysRowCount
> > > >
> > > > *Camel 2.10:* The number of rows in the header that contains
> generated
> > > > keys.
> > > >
> > > > CamelJdbcColumnNames
> > > >
> > > > *Camel 2.11.1:* The column names from the ResultSet as a
> java.util.Set
> > > > type.
> > > >
> > > > CamelJdbcParametes
> > > >
> > > > *Camel 2.12:* A java.util.Map which has the headers to be used if
> > > > useHeadersAsParameters has been enabled.
> > > >
> > > > Regards,
> > > > Allan C.
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker 
> > >
> >
>
>
>
> --
> Matt Sicker 
>


Re: camel-jdbc typo?

2016-08-05 Thread Matt Sicker
The docs are on Confluence. You can submit an ICLA to get edit permissions
there. Though there is work being done to migrate the docs all to asciidoc
files in the source code.

On 5 August 2016 at 20:38, Allan C.  wrote:

> Apologies. I am using non plain text editor.
>
> The other one is "CamelJdbcParametes" header. I didn't look into the codes
> if the actual header is without an "r", but I supposed it is, as, correct
> me if I am wrong, the doc is generated from the code's annotation?
>
> Regards,
> Allan C.
>
> On Sat, Aug 6, 2016 at 9:18 AM, Matt Sicker  wrote:
>
> > I fixed the "kets" typo, can't tell if you're point out any others,
> though.
> >
> > On 5 August 2016 at 19:09, Allan C.  wrote:
> >
> > > Hi,
> > >
> > > I was going through camel-jdbc docs here <http://camel.apache.org/jdbc
> .
> > > html>.
> > > I noticed what seems to be a couple of minor typos in the doc.
> > >
> > > Header
> > >
> > > Description
> > >
> > > CamelJdbcRowCount
> > >
> > > If the query is a SELECT, query the row count is returned in this OUT
> > > header.
> > >
> > > CamelJdbcUpdateCount
> > >
> > > If the query is an UPDATE, query the update count is returned in this
> OUT
> > > header.
> > >
> > > CamelGeneratedKeysRows
> > >
> > > *Camel 2.10:* Rows that contains the generated kets.
> > >
> > > CamelGeneratedKeysRowCount
> > >
> > > *Camel 2.10:* The number of rows in the header that contains generated
> > > keys.
> > >
> > > CamelJdbcColumnNames
> > >
> > > *Camel 2.11.1:* The column names from the ResultSet as a java.util.Set
> > > type.
> > >
> > > CamelJdbcParametes
> > >
> > > *Camel 2.12:* A java.util.Map which has the headers to be used if
> > > useHeadersAsParameters has been enabled.
> > >
> > > Regards,
> > > Allan C.
> > >
> >
> >
> >
> > --
> > Matt Sicker 
> >
>



-- 
Matt Sicker 


Re: camel-jdbc typo?

2016-08-05 Thread Allan C.
Apologies. I am using non plain text editor.

The other one is "CamelJdbcParametes" header. I didn't look into the codes
if the actual header is without an "r", but I supposed it is, as, correct
me if I am wrong, the doc is generated from the code's annotation?

Regards,
Allan C.

On Sat, Aug 6, 2016 at 9:18 AM, Matt Sicker  wrote:

> I fixed the "kets" typo, can't tell if you're point out any others, though.
>
> On 5 August 2016 at 19:09, Allan C.  wrote:
>
> > Hi,
> >
> > I was going through camel-jdbc docs here <http://camel.apache.org/jdbc.
> > html>.
> > I noticed what seems to be a couple of minor typos in the doc.
> >
> > Header
> >
> > Description
> >
> > CamelJdbcRowCount
> >
> > If the query is a SELECT, query the row count is returned in this OUT
> > header.
> >
> > CamelJdbcUpdateCount
> >
> > If the query is an UPDATE, query the update count is returned in this OUT
> > header.
> >
> > CamelGeneratedKeysRows
> >
> > *Camel 2.10:* Rows that contains the generated kets.
> >
> > CamelGeneratedKeysRowCount
> >
> > *Camel 2.10:* The number of rows in the header that contains generated
> > keys.
> >
> > CamelJdbcColumnNames
> >
> > *Camel 2.11.1:* The column names from the ResultSet as a java.util.Set
> > type.
> >
> > CamelJdbcParametes
> >
> > *Camel 2.12:* A java.util.Map which has the headers to be used if
> > useHeadersAsParameters has been enabled.
> >
> > Regards,
> > Allan C.
> >
>
>
>
> --
> Matt Sicker 
>


Re: camel-jdbc typo?

2016-08-05 Thread Matt Sicker
I fixed the "kets" typo, can't tell if you're point out any others, though.

On 5 August 2016 at 19:09, Allan C.  wrote:

> Hi,
>
> I was going through camel-jdbc docs here <http://camel.apache.org/jdbc.
> html>.
> I noticed what seems to be a couple of minor typos in the doc.
>
> Header
>
> Description
>
> CamelJdbcRowCount
>
> If the query is a SELECT, query the row count is returned in this OUT
> header.
>
> CamelJdbcUpdateCount
>
> If the query is an UPDATE, query the update count is returned in this OUT
> header.
>
> CamelGeneratedKeysRows
>
> *Camel 2.10:* Rows that contains the generated kets.
>
> CamelGeneratedKeysRowCount
>
> *Camel 2.10:* The number of rows in the header that contains generated
> keys.
>
> CamelJdbcColumnNames
>
> *Camel 2.11.1:* The column names from the ResultSet as a java.util.Set
> type.
>
> CamelJdbcParametes
>
> *Camel 2.12:* A java.util.Map which has the headers to be used if
> useHeadersAsParameters has been enabled.
>
> Regards,
> Allan C.
>



-- 
Matt Sicker 


camel-jdbc typo?

2016-08-05 Thread Allan C.
Hi,

I was going through camel-jdbc docs here <http://camel.apache.org/jdbc.html>.
I noticed what seems to be a couple of minor typos in the doc.

Header

Description

CamelJdbcRowCount

If the query is a SELECT, query the row count is returned in this OUT
header.

CamelJdbcUpdateCount

If the query is an UPDATE, query the update count is returned in this OUT
header.

CamelGeneratedKeysRows

*Camel 2.10:* Rows that contains the generated kets.

CamelGeneratedKeysRowCount

*Camel 2.10:* The number of rows in the header that contains generated keys.

CamelJdbcColumnNames

*Camel 2.11.1:* The column names from the ResultSet as a java.util.Set type.

CamelJdbcParametes

*Camel 2.12:* A java.util.Map which has the headers to be used if
useHeadersAsParameters has been enabled.

Regards,
Allan C.


Re: camel-jdbc and transction manager support

2016-07-28 Thread Paolo Antinori
Thank you Claus!

The setting you mention is required.



Apparently my specific issue was with a bugged version of h2db:
https://groups.google.com/d/msg/h2-database/GJJVQbyHOJQ/lwMzO9OUSjMJ


Here a fully working example in Java + Blueprint on JBoss Fuse 6.2.1, for
anyone that might be interested in it:

https://github.com/paoloantinori/fuse-quickstarts/tree/jboss-fuse-6.2.1/karaf/jdbc_jta



thanks again

paolo

On Thu, Jul 28, 2016 at 2:13 PM, Claus Ibsen  wrote:

> You likely need to set resetAutoCommit=false, so the transaction
> manager orchestrating the JDBC DataSource can perform the commit at
> the end, when the TX is set to commit.
>
>
>
> On Wed, Jul 27, 2016 at 6:50 PM, Paolo Antinori 
> wrote:
> > Hi, I'm trying to understand if camel-jdbc can work under the
> coordination
> > of a transaction manager.
> >
> > I have found this old JIRA:
> >
> > https://issues.apache.org/jira/browse/CAMEL-3803
> >
> > And not much more in git history of JdbcProducer class.
> >
> >
> > Can anyone confirm?
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


Re: camel-jdbc and transction manager support

2016-07-28 Thread Claus Ibsen
You likely need to set resetAutoCommit=false, so the transaction
manager orchestrating the JDBC DataSource can perform the commit at
the end, when the TX is set to commit.



On Wed, Jul 27, 2016 at 6:50 PM, Paolo Antinori  wrote:
> Hi, I'm trying to understand if camel-jdbc can work under the coordination
> of a transaction manager.
>
> I have found this old JIRA:
>
> https://issues.apache.org/jira/browse/CAMEL-3803
>
> And not much more in git history of JdbcProducer class.
>
>
> Can anyone confirm?



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


camel-jdbc and transction manager support

2016-07-27 Thread Paolo Antinori
Hi, I'm trying to understand if camel-jdbc can work under the coordination
of a transaction manager.

I have found this old JIRA:

https://issues.apache.org/jira/browse/CAMEL-3803

And not much more in git history of JdbcProducer class.


Can anyone confirm?


camel-jdbc fetchSize out of memory error

2016-05-23 Thread patelp7
I am trying to ingest data from postgres to another DB and I am using
camel-jdbc component to do it. I have a large table so I want to read few
rows at a time instead of the whole table altogether. so my route looks like
below (only for testing purpose)
from(fromUri).setBody("select * from 
 limit
10").to("jdbc://myDataSource?resetAutoCommit=false&statement.fetchSize=2").split(body()).streaming().process(test)

As shown above, I am only getting 10 rows at a time for testing purpose and
I have set fetchSize to 2 to only receive 2 rows at a time. However, I am
still receiving all 10 rows altogether. When I remove the "limit 10" from
the query I get Out of Memory error just before the split command which
tells me that its trying to load the entire result set in memory.

What am I missing here or what am I doing wrong? 

Thanks for help.



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-jdbc-fetchSize-out-of-memory-error-tp5782974.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: statement.maxRows not working as expected camel jdbc

2016-01-09 Thread Christian Müller
Greg and Claus was faster to fix it than me. :-)
You can try the fix with the latest 2.17-SNAPSHOT, 2.16.2-SNAPSHOT or
2.15.6-SNAPSHOT.

Best,
Christian
-

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642

On Fri, Jan 8, 2016 at 9:21 AM, fxthomas  wrote:

> hello Christain,
>
> Have created the JIRA https://issues.apache.org/jira/browse/CAMEL-9491
>
> thanks
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/statement-maxRows-not-working-as-expected-camel-jdbc-tp5775898p5776003.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: statement.maxRows not working as expected camel jdbc

2016-01-08 Thread fxthomas
hello Christain, 

Have created the JIRA https://issues.apache.org/jira/browse/CAMEL-9491

thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/statement-maxRows-not-working-as-expected-camel-jdbc-tp5775898p5776003.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: statement.maxRows not working as expected camel jdbc

2016-01-06 Thread Christian Müller
Hi Felix,

I have a unit test which confirms your finding. Could you please open an
JIRA and post the ticket number here. I will have a closer look during the
next days.
As workaround, you could also set the limit in the SQL query. Something
like: select * from TBL_DATA_AC LIMIT 2

Best,

Christian
-

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642

On Wed, Jan 6, 2016 at 4:04 PM, Felix Thomas  wrote:

> hello,
>
>   I have an issue (not sure if its a bug)  in camel. I have tested in
> multiple versio*n i.e. 2.15.1,2.16.0,2.16.1 *also but still the same
> result.
>
>   I have a route defined below in spring XML . When i start the camel
> instance it works fine at the first time i.e it fetches only 2 records as
> expected . But  when the timer kicks in after 1 minute again it fetchs all
> the rows in the table . I expect it to fetch only 2 again. Is there an
> issue in my route definition ??
>
>
> http://camel.apache.org/schema/spring";>
> 
> 
> select * from TBL_DATA_AC
> 
>
>  uri="jdbc:DSROUTE_TBL_DATA_AC?*statement.maxRows=2&*amp;outputType=StreamList"
> id="to8"/>
> 
> ${body}
> 
>  executorServiceRef="customThreadPoolProfile" id="multicast1">
> 
> 
> uri="rabbitmq://localhost/QUEUE?autoDelete=false&autoAck=false&queue=DEV&username=guest&password=guest&routingKey=DEV&durable=true"
> id="to9"/>
> 
> 
> 
> 
>
>
>
> regards,
> Felix
>


Re: statement.maxRows not working as expected camel jdbc

2016-01-06 Thread SaurabhNayar
Thats wired. You can try readSize as well.

Regards,
Saurabh Nayar



--
View this message in context: 
http://camel.465427.n5.nabble.com/statement-maxRows-not-working-as-expected-camel-jdbc-tp5775898p5775934.html
Sent from the Camel - Users mailing list archive at Nabble.com.


statement.maxRows not working as expected camel jdbc

2016-01-06 Thread Felix Thomas
hello,

  I have an issue (not sure if its a bug)  in camel. I have tested in
multiple versio*n i.e. 2.15.1,2.16.0,2.16.1 *also but still the same result.

  I have a route defined below in spring XML . When i start the camel
instance it works fine at the first time i.e it fetches only 2 records as
expected . But  when the timer kicks in after 1 minute again it fetchs all
the rows in the table . I expect it to fetch only 2 again. Is there an
issue in my route definition ??


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


select * from TBL_DATA_AC




${body}











regards,
Felix


Re: [camel-jdbc] opens one thread per update query until db error

2015-10-19 Thread dermoritz
fixed it myself:

the problem was that i used the same endpoint to read and write data (both
jdbc). The endpoint was set to use streamlist as output type that caused the
problem.
Now i am using 2 different endpoint (cumbersome to create 2 distinct
endpoints for endpoints that are singleton) and the one to write data uses
default output type - problem solved.



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-jdbc-opens-one-thread-per-update-query-until-db-error-tp5772863p5772866.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel jdbc component detect end of streamlist

2015-04-23 Thread dermoritz
Thanks for fast reply Claus,

no no parallel processing is enabled. the complete route is this:

from(cronTriggerEndpoint)
.setBody(simple(selectQuery(tableName)))
   
.to(dataBase).id("dbEndpoint"+isOnceAtStart).split().body()
.streaming()
.aggregate(constant(true),
rowAggregator).completionSize(CHUNK_SIZE)
.completionInterval(COMPLETION_TIMEOUT)
.process(lookUpDataProcessor)
.to(cepLookupTargetEndpoint)

On this route i attached a route policy that checks on every
"onExchangeDone" if NOT exchange.getIn().getBody(Iterator.class).hasNext().
The problem is that this is triggered 2 times for one data base query and
the thread view in eclipse' debugger indicates 2 different iterators.
My first solution was to react on the first !hasNext but now i know there
could be a bigger difference in time between the 2 !hasNext - so in need the
last one.

If u are sure that there should be only one iterator i will double check my
tests and setup, but if you have other ideas (for handling the multithreaded
stream) i would be glad to hear them.



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-jdbc-component-detect-end-of-streamlist-tp5766218p5766227.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel jdbc component detect end of streamlist

2015-04-23 Thread Claus Ibsen
Hi

Into multiple threads is that because you enabled parallel processing
on the splitter?

By default it ought to be single threaded even in streaming mode.

On Thu, Apr 23, 2015 at 3:43 PM, dermoritz  wrote:
> I am using camels jdbc component to load big tables into another system.
> Because i need to start other routes after loading table is finished i need
> to detect when all table entries are passed.
>
> Because the size of the table i am using this setup ()
>
> .to("jdbc:testdb?outputType=StreamList")
>   .split.body().streaming()
>   ...
>
> The output of streaming() is an iterator and i tried hasNext() on it. The
> problem with this approach is that the data is split into multiple threads.
> in my tests there are running 2 threads and therefor there are 2 iterators.
> So i need to detect when hasNext for the last thread/iterator is false.
>
> Is there a secure way to determine the number of thread/iterators? Is this
> always 2?
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-jdbc-component-detect-end-of-streamlist-tp5766218.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/


camel jdbc component detect end of streamlist

2015-04-23 Thread dermoritz
I am using camels jdbc component to load big tables into another system.
Because i need to start other routes after loading table is finished i need
to detect when all table entries are passed.

Because the size of the table i am using this setup ()

.to("jdbc:testdb?outputType=StreamList")
  .split.body().streaming()
  ...

The output of streaming() is an iterator and i tried hasNext() on it. The
problem with this approach is that the data is split into multiple threads.
in my tests there are running 2 threads and therefor there are 2 iterators.
So i need to detect when hasNext for the last thread/iterator is false.

Is there a secure way to determine the number of thread/iterators? Is this
always 2?





--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-jdbc-component-detect-end-of-streamlist-tp5766218.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-jdbc: read-update performance drop / prepareStatementStrategy

2015-02-19 Thread rwijngaa

I find the solution: instead of using the camel-jdbc component, i now use
the camel-sql component with the option batch=true. This will do
ps.addBatch() and eventually ps.executeBatch() which gives a lot better
performance. You'll have to prepare the parameters a bit though (as an
iterator-of-iterators) 



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-jdbc-read-update-performance-drop-prepareStatementStrategy-tp5762808p5762966.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-jdbc reading from H2 @ less than 1 message per second?

2015-02-12 Thread rwijngaa
Ah, my bet. Indeed, better results now ;-)



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-jdbc-reading-from-H2-less-than-1-message-per-second-tp5762651p5762662.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-jdbc reading from H2 @ less than 1 message per second?

2015-02-12 Thread Claus Ibsen
Your are having the logger the wrong place, put the logger inside the splitter

On Thu, Feb 12, 2015 at 3:09 PM, rwijngaa
 wrote:
> Hi,
>
> i'm using camel-jdbc (camel 2.12.0) to read 1000+ records from a H2 database
> (reading per 100), but i'm seeing a low performance of <1 message per
> second. In the logging i see something like:
>
> "Received: 1 new messages, with total 11 so far. Last group took: 1
> millis which is: 0.1 messages per second. average: 0.101"
>
> *My (Camel route:*
>  xmlns="http://camel.apache.org/schema/spring";  trace="true">
> 
> 
>  uri="log:test?level=INFO&groupInterval=1&groupDelay=1&groupActiveOnly=false"
> />
> 
> select * from databasetest
> 
>  uri="jdbc:testDataSource?readSize=100&statement.maxRows=100&statement.fetchSize=100&resetAutoCommit=false"
> />
> 
>${body}
>
> 
> 
> 
>
>
> testDataSource is an osgi reference to a H2 Datasource like so:
>  filter="(datasource.name=testH2Database)" cardinality="1..1" />
>
> Any ideas?
>
> Regards
> Rino
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-jdbc-reading-from-H2-less-than-1-message-per-second-tp5762651.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/


camel-jdbc reading from H2 @ less than 1 message per second?

2015-02-12 Thread rwijngaa
Hi,

i'm using camel-jdbc (camel 2.12.0) to read 1000+ records from a H2 database
(reading per 100), but i'm seeing a low performance of <1 message per
second. In the logging i see something like:

"Received: 1 new messages, with total 11 so far. Last group took: 1
millis which is: 0.1 messages per second. average: 0.101"

*My (Camel route:*
http://camel.apache.org/schema/spring";  trace="true">




select * from databasetest



   ${body}
   





testDataSource is an osgi reference to a H2 Datasource like so:


Any ideas?

Regards
Rino






--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-jdbc-reading-from-H2-less-than-1-message-per-second-tp5762651.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel - JDBC

2014-11-04 Thread smilevasu6
onContext.java:395)
at
org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:140)
at
org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:84)
at org.apache.camel.example.sql.App.main(App.java:16)
Caused by: javax.xml.bind.JAXBException: Provider
com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated:
com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts
of IllegalAnnotationExceptions
Class has two properties of the same name "outputs"
this problem is related to the following location:
at public java.util.List
org.apache.camel.model.ResequenceDefinition.getOutputs()
at org.apache.camel.model.ResequenceDefinition
this problem is related to the following location:
at private java.util.List
org.apache.camel.model.ResequenceDefinition.outputs
at org.apache.camel.model.ResequenceDefinition

 - with linked exception:
[com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts
of IllegalAnnotationExceptions
Class has two properties of the same name "outputs"
this problem is related to the following location:
at public java.util.List
org.apache.camel.model.ResequenceDefinition.getOutputs()
at org.apache.camel.model.ResequenceDefinition
this problem is related to the following location:
at private java.util.List
org.apache.camel.model.ResequenceDefinition.outputs
at org.apache.camel.model.ResequenceDefinition
]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:347)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:394)
at
org.apache.camel.spring.handler.CamelNamespaceHandler.createJaxbContext(CamelNamespaceHandler.java:180)
at
org.apache.camel.spring.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:167)
at
org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:245)
... 23 more
Caused by: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException:
1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "outputs"
this problem is related to the following location:
at public java.util.List
org.apache.camel.model.ResequenceDefinition.getOutputs()
at org.apache.camel.model.ResequenceDefinition
this problem is related to the following location:
at private java.util.List
org.apache.camel.model.ResequenceDefinition.outputs
at org.apache.camel.model.ResequenceDefinition

at
com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:91)
at
com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:450)
at
com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:282)
at
com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:125)
at
com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1147)
at
com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:130)
at
com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:221)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:172)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
... 29 more






This was i am getting error






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


Re: Camel - JDBC

2014-11-04 Thread smilevasu6
Yes i tried that same. But when i trying to execute the program it returns
some errors.

Please tell whats going wrong? 

Note: My database port is 1552.

Source code i am running and error i am getting



sql.properties
<http://camel.465427.n5.nabble.com/file/n5758515/sql.properties>  
OrderBean.java
<http://camel.465427.n5.nabble.com/file/n5758515/OrderBean.java>  
MyCamel.xml <http://camel.465427.n5.nabble.com/file/n5758515/MyCamel.xml>  
Error.txt <http://camel.465427.n5.nabble.com/file/n5758515/Error.txt>  



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


Re: Camel - JDBC

2014-11-04 Thread Christian Müller
http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html

Best,

Christian
-

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642

On Tue, Nov 4, 2014 at 7:47 AM, smilevasu6 
wrote:

> Claus Ibsen, if i write these configuration xml files in eclipse (i am
> using)
> how can i run these from eclipse as there is no Java class to call these.
>
> Could you please help?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-JDBC-tp5758485p5758488.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Camel - JDBC

2014-11-04 Thread Reji Mathews
Take up the project which inserts the records. replace the sql query with a
select query. Basically once the flow fires the select query, it should
return a List of Maps containing the records and it will be available in
Body of Camel Exchange.
Did you try that?

On Tue, Nov 4, 2014 at 11:57 AM, smilevasu6 
wrote:

> Thanks Claus Ibsen for quick reply.
>
> I already tried those links but it could not worked.
>
> And that is for Insertion.
>
> I am looking for select.
>
> Is there any example for the same start to end.
>
> Please.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-JDBC-tp5758485p5758487.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Camel - JDBC

2014-11-03 Thread smilevasu6
Claus Ibsen, if i write these configuration xml files in eclipse (i am using)
how can i run these from eclipse as there is no Java class to call these.

Could you please help?



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


Re: Camel - JDBC

2014-11-03 Thread smilevasu6
Thanks Claus Ibsen for quick reply.

I already tried those links but it could not worked.

And that is for Insertion.

I am looking for select.

Is there any example for the same start to end.

Please.



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


Re: Camel - JDBC

2014-11-03 Thread Claus Ibsen
Hi

There is a camel-sql example at
http://camel.apache.org/sql-example.html

And also a similar example using MyBatis instead
http://camel.apache.org/mybatis-example.html

And more examples you can find in the component documentation, and the
unit tests of the components which you can find in the source code.

On Tue, Nov 4, 2014 at 7:15 AM, smilevasu6  wrote:
> Hi,
>
> I am very new to camel.
>
> I am trying to establish the oracle connection and fetch the results from
> the Data base like select * from emp.
>
> I have a searched a lot but i couldn't find any solution or any source code
> from scratch.
>
> Can you please help me out.
>
> Regards,
>
> Srinivas T
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-JDBC-tp5758485.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/


Camel - JDBC

2014-11-03 Thread smilevasu6
Hi,

I am very new to camel.

I am trying to establish the oracle connection and fetch the results from
the Data base like select * from emp.

I have a searched a lot but i couldn't find any solution or any source code
from scratch.

Can you please help me out.

Regards,

Srinivas T 



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


Camel JDBC Aggregator - the need for 2 tables /Aggregation?

2014-08-29 Thread java_applic...@outlook.com
My camel routes can have multiple aggregations. We are using Jdbc
AggregationRepository for the same.

The problem I am are facing is when the first aggregator marks an
aggregation complete, the second one which is totally unrelated picks up the
completed exchanges and processes them.

Giving a second look at the document, it states the tables Aggregation and
Aggregation_Completed has to be created per aggregator. Does this mean if we
have 50 routes with aggregator, we create 100 tables?
Is there a workaround to use the same tables for any number of aggregators? 

On debugging, I noticed that Aggregator uses the correlation id on the
Aggregation table's id value, but Aggregation_completed table's id is not
correlation id, but the exchange id (which is documented!). So this causes
aggregators to pickup unrelated completed exchanges.

If the Aggregation_Completed table's message id is set to correlation id
instead of exchange id, will it help? The design is kept this way for some
reason, I just want to understand the impact of changing this.

Sample use case:
multiple messages arrive with product_id, 1st aggregator ensures only the
latest message per product_id is sent forward within 30 mins
completionInterval. 

The product_id belongs to certain sales_department which are gathered by
enrichments. The 2nd aggregator downstream ensures only exchange per
sales_department_id is send out within 30 mins completionInterval

Thanks!







--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-JDBC-Aggregator-the-need-for-2-tables-Aggregation-tp5755847.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-jdbc snapshots -> SQLException

2014-08-13 Thread A577127
Everything works fine. Thanks.



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


Re: Camel-jdbc snapshots -> SQLException

2014-08-13 Thread Claus Ibsen
Hi

Ah yeah there was some code missing. I have pushed a fix. You are
welcome to test again.

On Wed, Aug 13, 2014 at 9:52 AM, A577127  wrote:
> Hi,
>
> I just tryed your fix and it works fine. Thank you.
>
> However, I have one last problem :camel-jdbc doesn't preserve headers on
> some INSERT requests.
>
> These lines :
>
> were moved from JdbcProducer.process to some "deeper" functions, but now it
> doesn't get called all the time.
>
> For instance, if I want to perform a 'vanilla' INSERT,
> /JdbcProducer.doCreateAndExecuteSqlStatement/ gets called. It calls
> /stmtExecutionResult = stmt.execute(sql);/, and if it returns true, it calls
> /
> setResultSet/ which preserves headers. However, if it returns false (in my
> case, or with any INSERT/UPDATE), it doesn't preserve headers.
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-jdbc-snapshots-SQLException-tp5755058p5755129.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: Camel-jdbc snapshots -> SQLException

2014-08-13 Thread A577127
Hi,

I just tryed your fix and it works fine. Thank you.

However, I have one last problem :camel-jdbc doesn't preserve headers on
some INSERT requests.

These lines :

were moved from JdbcProducer.process to some "deeper" functions, but now it
doesn't get called all the time.

For instance, if I want to perform a 'vanilla' INSERT,
/JdbcProducer.doCreateAndExecuteSqlStatement/ gets called. It calls
/stmtExecutionResult = stmt.execute(sql);/, and if it returns true, it calls
/
setResultSet/ which preserves headers. However, if it returns false (in my
case, or with any INSERT/UPDATE), it doesn't preserve headers.




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


Re: Camel-jdbc snapshots -> SQLException

2014-08-12 Thread Claus Ibsen
On Tue, Aug 12, 2014 at 3:34 PM, A577127  wrote:
> I googled my exception and found someone with a similar problem. Someone
> answered that stuff can work with another jdbc connector and fail with c3p0
> because other connectors are less strict. My guess is that it's what happens
> here, so the issue still comes from camel-jdbc (even if I could solve it by
> using another connector).
>
> I finally found the function that causes my problem : it's when
> JdbcProducer.setResultSet is called. It now uses a ResultSetIterator and
> calls extractRows(), which iterates over the ResultSetIterator. And when it
> reaches the end, it calls ResultSetIterator.close() which closes the
> connection. Then the components calls conn.commit() and throws the exception
> because it was closed.
>

Ah thanks, yeah that close should not close the connection. I have
committed a fix to master. Can you try again?


>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-jdbc-snapshots-SQLException-tp5755058p5755109.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: Camel-jdbc snapshots -> SQLException

2014-08-12 Thread A577127
I googled my exception and found someone with a similar problem. Someone
answered that stuff can work with another jdbc connector and fail with c3p0
because other connectors are less strict. My guess is that it's what happens
here, so the issue still comes from camel-jdbc (even if I could solve it by
using another connector).

I finally found the function that causes my problem : it's when
JdbcProducer.setResultSet is called. It now uses a ResultSetIterator and
calls extractRows(), which iterates over the ResultSetIterator. And when it
reaches the end, it calls ResultSetIterator.close() which closes the
connection. Then the components calls conn.commit() and throws the exception
because it was closed.




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


Re: Camel-jdbc snapshots -> SQLException

2014-08-12 Thread Claus Ibsen
Well there must be some weird stuff in that jdbc driver and connection
pool as we only close resultset/prepared statement, and after that
does a commit on the connection, and that is where you get that
exception.

I suggest you debug this on your end as you got the problem at hand,
with that jdbc driver combo of yours.

It works on our end with a different jdbc driver.

On Tue, Aug 12, 2014 at 11:49 AM, A577127  wrote:
> With this new version I get the same SQLException, but now I get it with
> every requests : INSERT with useHeadersAsParameters=true & false, and even
> SELECT requests.
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-jdbc-snapshots-SQLException-tp5755058p5755097.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: Camel-jdbc snapshots -> SQLException

2014-08-12 Thread A577127
With this new version I get the same SQLException, but now I get it with
every requests : INSERT with useHeadersAsParameters=true & false, and even
SELECT requests.





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


Re: Camel-jdbc snapshots -> SQLException

2014-08-12 Thread Claus Ibsen
Hi

I committed a fix to master branch. Do you mind trying with latest
code to see if it fixes the problem now?

On Mon, Aug 11, 2014 at 3:54 PM, A577127  wrote:
> Hi,
>
> I was trying to perform an SQL request on my MySQL database using
> camel-jdbc. I'm using a named parameter that I map on my camel message
> header, so I use the option /useHeadersAsParameters=true/ on my jdbc
> endpoint.
>
> I also have an auto-increment ID on my table and need to retrieve it when I
> do an INSERT request, so in my camel message I set the header
> /CamelRetrieveGeneratedKeys=true/.
>
> However, using the latest version from maven (2.13.2), I noticed that this
> feature (retrieving generated keys) wasn't implemented if the request uses
> headers as parameters. So I looked for the last snapshot on Github.
>
> Using the last snapshot gives me this exception :
>
>
> I browsed the  history for the JdbcProducer
> <https://github.com/apache/camel/commits/master/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java>
> and found out that the issues begins with the commit on May 22, 2014. I
> tried to replace the file with the  previous version
> <https://github.com/apache/camel/blob/1985d995f96be383270859aa9a22399635939891/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java>
> (Apr 24, 2014) and it works fine.
>
> Hope this helps improving the component.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-jdbc-snapshots-SQLException-tp5755058.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: Camel-jdbc snapshots -> SQLException

2014-08-12 Thread Claus Ibsen
Hi

Thanks for reporting. I logged a ticket
https://issues.apache.org/jira/browse/CAMEL-7686

On Mon, Aug 11, 2014 at 3:54 PM, A577127  wrote:
> Hi,
>
> I was trying to perform an SQL request on my MySQL database using
> camel-jdbc. I'm using a named parameter that I map on my camel message
> header, so I use the option /useHeadersAsParameters=true/ on my jdbc
> endpoint.
>
> I also have an auto-increment ID on my table and need to retrieve it when I
> do an INSERT request, so in my camel message I set the header
> /CamelRetrieveGeneratedKeys=true/.
>
> However, using the latest version from maven (2.13.2), I noticed that this
> feature (retrieving generated keys) wasn't implemented if the request uses
> headers as parameters. So I looked for the last snapshot on Github.
>
> Using the last snapshot gives me this exception :
>
>
> I browsed the  history for the JdbcProducer
> <https://github.com/apache/camel/commits/master/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java>
> and found out that the issues begins with the commit on May 22, 2014. I
> tried to replace the file with the  previous version
> <https://github.com/apache/camel/blob/1985d995f96be383270859aa9a22399635939891/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java>
> (Apr 24, 2014) and it works fine.
>
> Hope this helps improving the component.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-jdbc-snapshots-SQLException-tp5755058.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/


Camel-jdbc snapshots -> SQLException

2014-08-11 Thread A577127
Hi,

I was trying to perform an SQL request on my MySQL database using
camel-jdbc. I'm using a named parameter that I map on my camel message
header, so I use the option /useHeadersAsParameters=true/ on my jdbc
endpoint.

I also have an auto-increment ID on my table and need to retrieve it when I
do an INSERT request, so in my camel message I set the header
/CamelRetrieveGeneratedKeys=true/.

However, using the latest version from maven (2.13.2), I noticed that this
feature (retrieving generated keys) wasn't implemented if the request uses
headers as parameters. So I looked for the last snapshot on Github.

Using the last snapshot gives me this exception :


I browsed the  history for the JdbcProducer
<https://github.com/apache/camel/commits/master/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java>
  
and found out that the issues begins with the commit on May 22, 2014. I
tried to replace the file with the  previous version
<https://github.com/apache/camel/blob/1985d995f96be383270859aa9a22399635939891/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java>
  
(Apr 24, 2014) and it works fine.

Hope this helps improving the component.



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


Re: Camel-jdbc : can't get useHeadersAsParameters working properly

2014-07-30 Thread A577127
I'm using the latest version (2.13.2).

I solved my problem. I replaced this :

By this :


The application_id (String) is correctly sent to MySQL. I need to check for
the certificate (which is byte[]), but I guess it's all good.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-jdbc-can-t-get-useHeadersAsParameters-working-properly-tp5754625p5754645.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-jdbc : can't get useHeadersAsParameters working properly

2014-07-30 Thread Arnaud Deprez
Hi,

Can you tell us which camel version do you use and show us your route
please ?


2014-07-30 10:52 GMT+02:00 A577127 :

> Hi,
>
> I'm trying to send a mysql request thanks to camel-jdbc. However, one of my
> fields is a byteArray, so I would like to use named parameters to bind some
> value to a header (which can be a byteArray).
>
> According to the  camel-jdbc documentation
> <http://camel.apache.org/jdbc.html>  , I should set
> "useHeadersAsParameters"
> to true on my endpoint.
> Then, according to the example given in the documentation :
>
> I should set headers and reference them with the syntax ":?headername". I
> tryed this, but in the end it is replaced by "?" in my request.
>
> Then, the doc states about the "CamelJdbcParameters" header :
> /A java.util.Map which has the headers to be used if useHeadersAsParameters
> has been enabled./
>
> I tryed this also (I created a HashMap containing a dummy
> String value), and got the same problem : it is replaced by "?" in the
> query.
>
> I will take a look at how stuff gets processed in the camel-jdbc component,
> but maybe I'm doing something wrong. Thanks.
>
> (by the way, there's a typo "CamelJdbcParametes")
>
> Here is the query I used :
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-jdbc-can-t-get-useHeadersAsParameters-working-properly-tp5754625.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Camel-jdbc : can't get useHeadersAsParameters working properly

2014-07-30 Thread A577127
Hi,

I'm trying to send a mysql request thanks to camel-jdbc. However, one of my
fields is a byteArray, so I would like to use named parameters to bind some
value to a header (which can be a byteArray).

According to the  camel-jdbc documentation
<http://camel.apache.org/jdbc.html>  , I should set "useHeadersAsParameters"
to true on my endpoint.
Then, according to the example given in the documentation :

I should set headers and reference them with the syntax ":?headername". I
tryed this, but in the end it is replaced by "?" in my request.

Then, the doc states about the "CamelJdbcParameters" header :
/A java.util.Map which has the headers to be used if useHeadersAsParameters
has been enabled./

I tryed this also (I created a HashMap containing a dummy
String value), and got the same problem : it is replaced by "?" in the
query.

I will take a look at how stuff gets processed in the camel-jdbc component,
but maybe I'm doing something wrong. Thanks.

(by the way, there's a typo "CamelJdbcParametes")

Here is the query I used :





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-jdbc-can-t-get-useHeadersAsParameters-working-properly-tp5754625.html
Sent from the Camel - Users mailing list archive at Nabble.com.


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

2014-05-16 Thread Shiv
Finally i got the root cause of issue and fixed it. It was not actually
related to classpath but it was caused due to wrong DB connection string.

It was defined as :1433;DatabaseName=testdb"/>
 
as per info from Fuse ESB page JDBC page (table 6) but it should be
:1433;DatabaseName=testdb"/>

Post changes I am able to run select query.

Now I am trying with SQL language in my querying. I copied
camel-script-2.2.0 and camel-josql-2.2.0 jars. My route is as below:



select * from test



But it is giving below exception:
2014-05-07 12:35:04,158 | DEBUG | Failed delivery for exchangeId:
278c5aa1-4605-407c-bb38-173521a45fe3. On delivery attempt: 0 caught:
java.lang.IllegalArgumentException: No script engine could be created for:
sql | org.apache.camel.processor.DeadLetterChannel | kickoff

2014-05-07 12:35:04,165 | DEBUG | Failed delivery for exchangeId:
278c5aa1-4605-407c-bb38-173521a45fe3. On delivery attempt: 0 caught:
org.apache.camel.InvalidPayloadException: No body available of type:
java.lang.String on: Message: [Body is null]. Caused by: No type converter
available to convert from type: null to the required type: java.lang.String
with value null. Exchange[Message: [Body is null]]. Caused by:
[org.apache.camel.NoTypeConversionAvailableException - No type converter
available to convert from type: null to the required type: java.lang.String
with value null] | org.apache.camel.processor.DefaultErrorHandler | kickoff
2014-05-07 12:35:04,166 | ERROR | Failed delivery for exchangeId:
278c5aa1-4605-407c-bb38-173521a45fe3. Exhausted after delivery attempt: 1
caught: org.apache.camel.InvalidPayloadException: No body available of type:
java.lang.String on: Message: [Body is null]. Caused by: No type converter
available to convert from type: null to the required type: java.lang.String
with value null. Exchange[Message: [Body is null]]. Caused by:
[org.apache.camel.NoTypeConversionAvailableException - No type converter
available to convert from type: null to the required type: java.lang.String
with value null] | org.apache.camel.processor.DefaultErrorHandler | kickoff
org.apache.camel.InvalidPayloadException: No body available of type:
java.lang.String on: Message: [Body is null]. Caused by: No type converter
available to convert from type: null to the required type: java.lang.String
with value null. Exchange[Message: [Body is null]]. Caused by:
[org.apache.camel.NoTypeConversionAvailableException - No type converter
available to convert from type: null to the required type: java.lang.String
with value null]
at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:103)
at
org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:55




--
View this message in context: 
http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750943.html
Sent from the Camel - Users mailing list archive at Nabble.com.


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

2014-05-15 Thread Charles Moulliard
As Fuse ESB is an OSGI platform, the jar file should be deployed as bundles
using osgi:install command on karaf (
http://karaf.apache.org/manual/latest-2.3.x/commands/osgi-install.html). A
feature file exist to deploy the camel bundles so normally you should use
features:install camel-jdbc or camel-sql if you use camel with Spring for
SQL


On Wed, May 7, 2014 at 8:33 AM, Shiv  wrote:

> Since I am using Fuse ESB 5.3.0, I have copied sqljdbc.jar,
> org.springframework.jdbc-2.5.6.jar and camel-jdbc-2.2.0.jar to FUSE
> HOME/lib
> folder.
>
> Is this is not the right location or do we need more jars?
>
> Thanks
> Shiv
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750941.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: java.lang.NullPointerException in Camel JDBC component for Select statement

2014-05-11 Thread Charles Moulliard
You jar must be deployed as a bundle on Karaf. If this jar is not a bundle,
then you should use wrap protocol to generate OSGI metadata required
toexport/import packages

https://ops4j1.jira.com/wiki/display/paxurl/Wrap+Protocol
http://fusesource.com/docs/esb/4.2/deploy_osgi/DeployJar-Wrap.html



On Wed, May 7, 2014 at 7:40 AM, Shiv  wrote:

> Also, if I remove sqljdbc jar from lib folder, I am getting below
> exception.
> Seems if the jar is present it is able to pick the class and if it is not
> present it fails:
>
> INFO   | jvm 1| 2014/05/07 11:04:54 | ERROR:
> java.lang.RuntimeException:
> Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name 'testdb' defined in class path resource [app.xml]: Initialization
> of bean failed; nested exception is
> org.springframework.beans.TypeMismatchException: Failed to convert property
> value of type [java.lang.String] to required type [java.lang.Class] for
> property 'driverClass'; nested exception is
> java.lang.IllegalArgumentException: Cannot find class
> [com.microsoft.sqlserver.jdbc.SQLServerDriver]
>
> I don't get this error when sqljdbc jar is present.
>
> Thanks
> Shiv
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750942.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: java.lang.NullPointerException in Camel JDBC component for Select statement

2014-05-11 Thread Shiv
Also, if I remove sqljdbc jar from lib folder, I am getting below exception.
Seems if the jar is present it is able to pick the class and if it is not
present it fails:

INFO   | jvm 1| 2014/05/07 11:04:54 | ERROR: java.lang.RuntimeException:
Failed to execute start task. Reason:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'testdb' defined in class path resource [app.xml]: Initialization
of bean failed; nested exception is
org.springframework.beans.TypeMismatchException: Failed to convert property
value of type [java.lang.String] to required type [java.lang.Class] for
property 'driverClass'; nested exception is
java.lang.IllegalArgumentException: Cannot find class
[com.microsoft.sqlserver.jdbc.SQLServerDriver]

I don't get this error when sqljdbc jar is present.

Thanks
Shiv



--
View this message in context: 
http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750942.html
Sent from the Camel - Users mailing list archive at Nabble.com.


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

2014-05-07 Thread Shiv
Since I am using Fuse ESB 5.3.0, I have copied sqljdbc.jar,
org.springframework.jdbc-2.5.6.jar and camel-jdbc-2.2.0.jar to FUSE HOME/lib
folder.

Is this is not the right location or do we need more jars?

Thanks
Shiv



--
View this message in context: 
http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750941.html
Sent from the Camel - Users mailing list archive at Nabble.com.


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

2014-05-05 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"  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  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: java.lang.NullPointerException in Camel JDBC component for Select statement

2014-05-05 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  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: java.lang.NullPointerException in Camel JDBC component for Select statement

2014-05-05 Thread Abby Van Rooyen
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  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


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

2014-05-05 Thread Charles Moulliard
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  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-Camel-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


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

2014-05-05 Thread Shiv
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-Camel-JDBC-component-for-Select-statement-tp5750783p5750881.html
Sent from the Camel - Users mailing list archive at Nabble.com.


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

2014-05-05 Thread Charles Moulliard
Can you verify that in your log Spring has reported that the Driver has
been loaded correctly ?
https://github.com/spring-projects/spring-framework/blob/master/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java#L133


On Mon, May 5, 2014 at 4:46 PM, Shiv  wrote:

> conn maybe null if any of the parameters is invalid, right?
>
> If everything alright with below configuration for MS SQL Server?
>  class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
>  value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
>  value="jdbc:microsoft:sqlserver://hostname:1433;DatabaseName=testdb"/>
> 
> 
> 
>
> Also, if I understand the flow correctly, JDBC Producer class calls conn =
> dataSource.getConnection() which is handled by SimpleDriverDataSource
> class's getConnectionFromDriver method given all parameters (driverClass,
> url, username, password) are set. Here all the arguments defined in Spring
> configuration file are String but SimpleDriverDataSource class has one
> method setDriver(Driver) which is expecting java.sql.Driver. Though i doubt
> it but if this conversion is not happening properly? - Just a wild guess.
>
> Also, since i am using camel core and camel jdbc 2.2.0 jars, if there is
> any
> fixed version of spring jdbc jar has to be used. Currently, i downloaded
> 2.5.6 version of spring jdbc jar. Any compatibility issue?
>
> Thanks
> Shiv
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750872.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: java.lang.NullPointerException in Camel JDBC component for Select statement

2014-05-05 Thread Shiv
conn maybe null if any of the parameters is invalid, right?

If everything alright with below configuration for MS SQL Server?
 
 
 
 
 


Also, if I understand the flow correctly, JDBC Producer class calls conn =
dataSource.getConnection() which is handled by SimpleDriverDataSource
class's getConnectionFromDriver method given all parameters (driverClass,
url, username, password) are set. Here all the arguments defined in Spring
configuration file are String but SimpleDriverDataSource class has one
method setDriver(Driver) which is expecting java.sql.Driver. Though i doubt
it but if this conversion is not happening properly? - Just a wild guess.

Also, since i am using camel core and camel jdbc 2.2.0 jars, if there is any
fixed version of spring jdbc jar has to be used. Currently, i downloaded
2.5.6 version of spring jdbc jar. Any compatibility issue?

Thanks
Shiv



--
View this message in context: 
http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750872.html
Sent from the Camel - Users mailing list archive at Nabble.com.


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

2014-05-05 Thread Charles Moulliard
IF you read the message, it tells you that it will create the connection
(not that the connection has been created). So Spring logs the message
before to call
https://github.com/spring-projects/spring-framework/blob/master/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleDriverDataSource.java#L140

return driver.connect(url, props);

So the connection object could be null


On Mon, May 5, 2014 at 7:36 AM, Shiv  wrote:

> As per your suggestion, I changed the logging level of the package and got
> below line in log:
>
> 2014-05-05 10:53:46,007 | DEBUG | Creating new JDBC Driver Connection to
> [jdbc:microsoft:sqlserver://:1433;DatabaseName=TESTDB] |
> org.springframework.jdbc.datasource.SimpleDriverDataSource
>
> Does it also expect to log successful connection message if connection is
> created successfully?
>
> Thanks
> Shiv
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750852.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: java.lang.NullPointerException in Camel JDBC component for Select statement

2014-05-04 Thread Shiv
As per your suggestion, I changed the logging level of the package and got
below line in log:

2014-05-05 10:53:46,007 | DEBUG | Creating new JDBC Driver Connection to
[jdbc:microsoft:sqlserver://:1433;DatabaseName=TESTDB] |
org.springframework.jdbc.datasource.SimpleDriverDataSource

Does it also expect to log successful connection message if connection is
created successfully?

Thanks
Shiv



--
View this message in context: 
http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750852.html
Sent from the Camel - Users mailing list archive at Nabble.com.


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

2014-05-02 Thread Charles Moulliard
You could try to increase debug level for this package
org/springframework/jdbc/datasource/ to see if Spring reports this message
: "logger.debug("Creating new JDBC Driver Connection to [" + url + "]");"




On Fri, May 2, 2014 at 1:50 PM, Shiv  wrote:

> I am however able to connect to SQL Server DB using the given DB name, user
> name and password via SQL Server Management Studio client and can run
> select
> and insert queries directly.
>
> For SQL Server driver name, I used the reference from
>
> https://access.redhat.com/site/documentation/en-US/Fuse_ESB_Enterprise/7.1/html/EIP_Transaction_Guide/files/TxnManagers-Samples-JDBC.html
> site to get the value. It says driver name should be
> com.microsoft.jdbc.sqlserver.SQLServerDriver but sqljdbc4 jar does not
> contain this class and rather the class name is
> com.microsoft.sqlserver.jdbc.SQLServerDriver. That was one difference.
>
> If there are ways to get more debug information to fix this issue?
>
> Thanks
> Shiv
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750788.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: java.lang.NullPointerException in Camel JDBC component for Select statement

2014-05-02 Thread Shiv
I am however able to connect to SQL Server DB using the given DB name, user
name and password via SQL Server Management Studio client and can run select
and insert queries directly.

For SQL Server driver name, I used the reference from
https://access.redhat.com/site/documentation/en-US/Fuse_ESB_Enterprise/7.1/html/EIP_Transaction_Guide/files/TxnManagers-Samples-JDBC.html
site to get the value. It says driver name should be
com.microsoft.jdbc.sqlserver.SQLServerDriver but sqljdbc4 jar does not
contain this class and rather the class name is
com.microsoft.sqlserver.jdbc.SQLServerDriver. That was one difference.

If there are ways to get more debug information to fix this issue?

Thanks
Shiv



--
View this message in context: 
http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750788.html
Sent from the Camel - Users mailing list archive at Nabble.com.


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

2014-05-02 Thread Charles Moulliard
You get this error because the Connection object is null (
https://github.com/apache/camel/blob/camel-2.2.0/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java#L67).
So I suspect that a problem occurred during creation of the DataSource
object


On Fri, May 2, 2014 at 11:35 AM, Shiv  wrote:

> Hi all,
> I am using Camel JDBC component for first time and I need to query a table
> in MS SQL Server 2008 R2 and push the results to an ActiveMQ queue. I used
> the details on http://camel.apache.org/jdbc.html page and tried to get the
> setup. Once my route define in Spring configuration file is started, I am
> getting java.lang.NullPointerException  in log. I am using Camel 2.2.0 (it
> is pretty old but is part of a legacy system).  I have camel-jdbc-2.2.0,
> sqljdbc4 and org.springframework.jdbc-2.5.6 jars on classpath. any input
> will be great.
>
> Route detail:
> -
> 
> select * from test
> 
> 
>
> Data Source:
> -
>  class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
>  value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
>  value="jdbc:microsoft:sqlserver://<host
> name>:1433;DatabaseName=test"/>
> 
> 
> 
>
> Exception log:
> ---
> 2014-05-02 14:39:59,467 | INFO  | Exchange[
> , Id:6d87d9ba-85ef-4cf6-a9f7-a4b1be999f1b
> ,
>
> Properties:{CamelToEndpoint=log://toDLC?multiline=true&showAll=true&showCaughtException=true,
> CamelTimerFiredTime=Fri May 02 14:39:59 IST 2014,
> CamelFailureEndpoint=jdbc://testdb, CamelTimerPeriod=1000,
> CamelTimerName=kickoff,
> CamelExceptionCaught=java.lang.NullPointerException}
> , Headers:{firedTime=Fri May 02 14:39:59 IST 2014}
> , BodyType:String
> , Body:select * from test
> , CaughtExceptionType:java.lang.NullPointerException,
> CaughtExceptionMessage:null, StackTrace:java.lang.NullPointerException
> at
> org.apache.camel.component.jdbc.JdbcProducer.process(JdbcProducer.java:67)
> at
>
> org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
> at
>
> org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
> at
> org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
> at
> org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
> at
>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
> at
>
> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
> at
>
> org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
> at
>
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
> at
>
> org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
> at
>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
> at
>
> org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
> at
>
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
> at
>
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
> at
>
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:56)
> at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
> at
>
> org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66)
> at
>
> org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
> at
>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
> at
>
> org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:103)
> at
> org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:50)
> at java.util.TimerThread.mainLoop(Timer.java:512)
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783.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


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

2014-05-02 Thread Shiv
Hi all,
I am using Camel JDBC component for first time and I need to query a table
in MS SQL Server 2008 R2 and push the results to an ActiveMQ queue. I used
the details on http://camel.apache.org/jdbc.html page and tried to get the
setup. Once my route define in Spring configuration file is started, I am
getting java.lang.NullPointerException  in log. I am using Camel 2.2.0 (it
is pretty old but is part of a legacy system).  I have camel-jdbc-2.2.0,
sqljdbc4 and org.springframework.jdbc-2.5.6 jars on classpath. any input
will be great.

Route detail:
-

select * from test



Data Source:
-
 
 
:1433;DatabaseName=test"/> 
 
 


Exception log:
---
2014-05-02 14:39:59,467 | INFO  | Exchange[
, Id:6d87d9ba-85ef-4cf6-a9f7-a4b1be999f1b
,
Properties:{CamelToEndpoint=log://toDLC?multiline=true&showAll=true&showCaughtException=true,
CamelTimerFiredTime=Fri May 02 14:39:59 IST 2014,
CamelFailureEndpoint=jdbc://testdb, CamelTimerPeriod=1000,
CamelTimerName=kickoff, CamelExceptionCaught=java.lang.NullPointerException}
, Headers:{firedTime=Fri May 02 14:39:59 IST 2014}
, BodyType:String
, Body:select * from test
, CaughtExceptionType:java.lang.NullPointerException,
CaughtExceptionMessage:null, StackTrace:java.lang.NullPointerException
at
org.apache.camel.component.jdbc.JdbcProducer.process(JdbcProducer.java:67)
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
at 
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
at
org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:56)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
at
org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66)
at
org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:103)
at
org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:50)
at java.util.TimerThread.mainLoop(Timer.java:512)



--
View this message in context: 
http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel jdbc at same time from db to a queue and to another db

2014-04-14 Thread akotako
hi, 
  i want to make a route at same time from my local db to external activemq
queue querying select * from ...
and to another db querying select id from How can i make this ? thank
you in advance.. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-jdbc-at-same-time-from-db-to-a-queue-and-to-another-db-tp5750204.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel jdbc at same time from db to a queue and to another db

2014-04-14 Thread akotako
hi, 
  i want to make a route at same time from my local db to external activemq
queue querying select * from ...
and to another db querying select id from How can i make this ? thank
you in advance.. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-jdbc-at-same-time-from-db-to-a-queue-and-to-another-db-tp5750205.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help apache camel jdbc + active

2013-12-16 Thread kraythe .
As said above. Use quartz or an AMQ event to trigger it.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
*


On Mon, Dec 16, 2013 at 4:54 AM, Richard Kettelerij <
richardkettele...@gmail.com> wrote:

> As mentioned in the Camel docs for the JDBC component: This component can
> only be used to define producer endpoints, which means that you cannot use
> the JDBC component in a from() statement.
>
> So if you want to poll message from a database you shouldn't use the JDBC
> component but instead use either the SQL component (
> http://camel.apache.org/sql-component.html), JPA component (
> http://camel.apache.org/jpa) or MyBatis component (
> http://camel.apache.org/mybatis) instead. These do support the polling
> consumer EIP.
>
>
> On Mon, Dec 16, 2013 at 10:48 AM, RJILI Youssef  >wrote:
>
> > I'm new in apache camel and i have a problem about the filling of the
> > activemq.
> > I want to get the values from DB and filled it into activemq.
> > My activemq is started:
> >
> > My code :
> >
> >
> > private void fillActiveMq() throws Exception{
> > JndiRegistry registry = new JndiRegistry(new JndiContext());
> > CamelContext camelCtxt = new DefaultCamelContext(registry);
> > MysqlDataSource datasource = getDataSource();
> > JdbcEndpoint endpoint = getJDBCEndPoint(datasource, camelCtxt);
> >
> > registry.bind("bulksms", datasource);
> >
> >
> >
> camelCtxt.addComponent("activemq",ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false"));
> > camelCtxt.addEndpoint("jdbc:bulksms", endpoint);
> >
> > ProducerTemplate pT= camelCtxt.createProducerTemplate();
> > pT.sendBody("jdbc:bulksms" , "select message from message");
> >
> > camelCtxt.addRoutes(new RouteBuilder() {
> >
> >  @Override
> > public void configure() throws Exception {
> > interceptSendToEndpoint("jdbc:*").throwException(new
> > ConnectException("Cannot connect"));
> > from("jdbc:bulksms").setBody(constant("select message from
> > message")).to("activemq:queue:messages");
> > }
> > });
> >   camelCtxt.start();
> > Thread.sleep(1000);
> >
> > camelCtxt.stop();
> > }
> >  private  MysqlDataSource getDataSource() {
> > MysqlDataSource datasource = new MysqlDataSource();
> > datasource.setUser("root");
> > datasource.setPassword("root");
> > datasource.setDatabaseName("bulksms");
> > datasource.setPortNumber(3306);
> > datasource.setServerName("127.0.0.1");
> > return datasource;
> > }
> >
> > private  JdbcEndpoint getJDBCEndPoint(MysqlDataSource datasource,
> > CamelContext camelCtxt) {
> >
> > JdbcEndpoint endpoint = new JdbcEndpoint();
> > endpoint.setDataSource(datasource);
> > endpoint.setCamelContext(camelCtxt);
> > return endpoint;
> > }
> >
> > I have this exception :
> > Exception in thread "main" java.lang.UnsupportedOperationException: Not
> > supported
> > at
> >
> >
> org.apache.camel.component.jdbc.JdbcEndpoint.createConsumer(JdbcEndpoint.java:59)
> > at
> >
> >
> org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
> > at
> >
> org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
> > at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134)
> > at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2109)
> > at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2039)
> > at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1827)
> > at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1699)
> > at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1544)
> > at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
> > at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1512)
> > at
> > com.apachecamel.ManageQueueFromDB.fillActiveMq(ManageQueueFromDB.java:76)
> > at com.apachecamel.ManageQueueFromDB.main(ManageQueueFromDB.java:43)
> >
> > I only used java DSL code, Any Help please
> >
>


Re: Help apache camel jdbc + active

2013-12-16 Thread Richard Kettelerij
As mentioned in the Camel docs for the JDBC component: This component can
only be used to define producer endpoints, which means that you cannot use
the JDBC component in a from() statement.

So if you want to poll message from a database you shouldn't use the JDBC
component but instead use either the SQL component (
http://camel.apache.org/sql-component.html), JPA component (
http://camel.apache.org/jpa) or MyBatis component (
http://camel.apache.org/mybatis) instead. These do support the polling
consumer EIP.


On Mon, Dec 16, 2013 at 10:48 AM, RJILI Youssef wrote:

> I'm new in apache camel and i have a problem about the filling of the
> activemq.
> I want to get the values from DB and filled it into activemq.
> My activemq is started:
>
> My code :
>
>
> private void fillActiveMq() throws Exception{
> JndiRegistry registry = new JndiRegistry(new JndiContext());
> CamelContext camelCtxt = new DefaultCamelContext(registry);
> MysqlDataSource datasource = getDataSource();
> JdbcEndpoint endpoint = getJDBCEndPoint(datasource, camelCtxt);
>
> registry.bind("bulksms", datasource);
>
>
> camelCtxt.addComponent("activemq",ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false"));
> camelCtxt.addEndpoint("jdbc:bulksms", endpoint);
>
> ProducerTemplate pT= camelCtxt.createProducerTemplate();
> pT.sendBody("jdbc:bulksms" , "select message from message");
>
> camelCtxt.addRoutes(new RouteBuilder() {
>
>  @Override
> public void configure() throws Exception {
> interceptSendToEndpoint("jdbc:*").throwException(new
> ConnectException("Cannot connect"));
> from("jdbc:bulksms").setBody(constant("select message from
> message")).to("activemq:queue:messages");
> }
> });
>   camelCtxt.start();
> Thread.sleep(1000);
>
> camelCtxt.stop();
> }
>  private  MysqlDataSource getDataSource() {
> MysqlDataSource datasource = new MysqlDataSource();
> datasource.setUser("root");
> datasource.setPassword("root");
> datasource.setDatabaseName("bulksms");
> datasource.setPortNumber(3306);
> datasource.setServerName("127.0.0.1");
> return datasource;
> }
>
> private  JdbcEndpoint getJDBCEndPoint(MysqlDataSource datasource,
> CamelContext camelCtxt) {
>
> JdbcEndpoint endpoint = new JdbcEndpoint();
> endpoint.setDataSource(datasource);
> endpoint.setCamelContext(camelCtxt);
> return endpoint;
> }
>
> I have this exception :
> Exception in thread "main" java.lang.UnsupportedOperationException: Not
> supported
> at
>
> org.apache.camel.component.jdbc.JdbcEndpoint.createConsumer(JdbcEndpoint.java:59)
> at
>
> org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
> at
> org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
> at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134)
> at
>
> org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2109)
> at
>
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2039)
> at
>
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1827)
> at
>
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1699)
> at
>
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1544)
> at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
> at
>
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1512)
> at
> com.apachecamel.ManageQueueFromDB.fillActiveMq(ManageQueueFromDB.java:76)
> at com.apachecamel.ManageQueueFromDB.main(ManageQueueFromDB.java:43)
>
> I only used java DSL code, Any Help please
>


Help apache camel jdbc + active

2013-12-16 Thread RJILI Youssef
I'm new in apache camel and i have a problem about the filling of the
activemq.
I want to get the values from DB and filled it into activemq.
My activemq is started:

My code :


private void fillActiveMq() throws Exception{
JndiRegistry registry = new JndiRegistry(new JndiContext());
CamelContext camelCtxt = new DefaultCamelContext(registry);
MysqlDataSource datasource = getDataSource();
JdbcEndpoint endpoint = getJDBCEndPoint(datasource, camelCtxt);

registry.bind("bulksms", datasource);

camelCtxt.addComponent("activemq",ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false"));
camelCtxt.addEndpoint("jdbc:bulksms", endpoint);

ProducerTemplate pT= camelCtxt.createProducerTemplate();
pT.sendBody("jdbc:bulksms" , "select message from message");

camelCtxt.addRoutes(new RouteBuilder() {

 @Override
public void configure() throws Exception {
interceptSendToEndpoint("jdbc:*").throwException(new
ConnectException("Cannot connect"));
from("jdbc:bulksms").setBody(constant("select message from
message")).to("activemq:queue:messages");
}
});
  camelCtxt.start();
Thread.sleep(1000);

camelCtxt.stop();
}
 private  MysqlDataSource getDataSource() {
MysqlDataSource datasource = new MysqlDataSource();
datasource.setUser("root");
datasource.setPassword("root");
datasource.setDatabaseName("bulksms");
datasource.setPortNumber(3306);
datasource.setServerName("127.0.0.1");
return datasource;
}

private  JdbcEndpoint getJDBCEndPoint(MysqlDataSource datasource,
CamelContext camelCtxt) {

JdbcEndpoint endpoint = new JdbcEndpoint();
endpoint.setDataSource(datasource);
endpoint.setCamelContext(camelCtxt);
return endpoint;
}

I have this exception :
Exception in thread "main" java.lang.UnsupportedOperationException: Not
supported
at
org.apache.camel.component.jdbc.JdbcEndpoint.createConsumer(JdbcEndpoint.java:59)
at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134)
at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2109)
at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2039)
at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1827)
at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1699)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1544)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1512)
at com.apachecamel.ManageQueueFromDB.fillActiveMq(ManageQueueFromDB.java:76)
at com.apachecamel.ManageQueueFromDB.main(ManageQueueFromDB.java:43)

I only used java DSL code, Any Help please


Re: prepared statements in camel-jdbc?

2013-02-28 Thread Claus Ibsen
On Fri, Mar 1, 2013 at 5:24 AM, kavan desai  wrote:
> I am seeing this post is quite old hence want to reassure, Does Camel JDBC
> support Prepeared statements?
>

Check the source code
https://svn.apache.org/repos/asf/camel/trunk/components/camel-jdbc/


>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/prepared-statements-in-camel-jdbc-tp3319106p5728328.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: prepared statements in camel-jdbc?

2013-02-28 Thread kavan desai
I am seeing this post is quite old hence want to reassure, Does Camel JDBC
support Prepeared statements?



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


Camel JDBC 1.6.1

2012-08-12 Thread londonukm
Hi,

I am using the camel jdbc endpoint, however it is giving me something of a
problem. I have a process where i receive an xml payload by ftp, i take that
payload and put it into a custom header parameter in the message and pass it
onto the jdbc endpoint to do a database insert. however, after doing the
insert the jdbc component seems to be wiping out all the headers that were
previously set. Is there anyway to stop the jdbc endpoint from deleting the
custom headers that have been added to the message. My route is below just
incase it helps to show what i am talking about.

from(ftpIncomingURL) -- GET FILE FROM FTP
.convertBodyTo(String.class)
.choice()
.when(header(FileComponent.HEADER_FILE_NAME).contains("_rpt.xml")) --
PASS ON
.to("activemq:queue:"+ftpPollerQueueName)
.when(header(FileComponent.HEADER_FILE_NAME).contains("_isin_rej.xml"))
-- REJECT
.process(jdbcRejectProcessor) -- SET CUSTOM HEADER
.to("jdbc:unavistajdbc")   -- UPDATE DATABASE
.process(fsaRejectProcessor) -- CUSTOM HEADER GONE AND BODY EMPTY
.choice()
.when(header("jdbc.updateCount").isEqualTo(1))
.process(logEvent)
.to("activemq:queue:" + mainQueueName + "." + JMS_QUEUE_INCOMING_SUFFIX)
.otherwise()
.process(logNoEvent)
.end()
.end();

Many Thanks

Graham 



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


Re: Camel JDBC 1.6.1

2012-08-12 Thread Christian Müller
You should subscribe to the list. Otherwise you post is not forwarded to the
mailing list where most of the developers listening...
Checkout http://camel.apache.org/discussion-forums.html

Best,
Christian 



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


Re: Camel JDBC 1.6.1

2012-08-10 Thread londonukm
Hi Christian,

Thank you for your help, i am unable to upgrade the client so i had to make
do with existing functionality. Unfortunately the very nice EIP you
mentioned enrich does not exist in my version and the aggregator pattern
doesnt quite do it either. I appreciate all these issues have been ironed
out in future versions. 

Just in case anyone is interested I manged to get around the problem in a
couple of different ways. In one use case I was able to make use of the
Multicast option where I did not care about the output of the JDBC
component.

In the second instance where I required the output of the JDBC component,
well its header jdbc.updateCount output I used a custom producer template,
exchange and message in order to fire of the message to the jdbc component,
get back the header value and then fire off another message based on content
to various other processors.

Many thanks for all the help

Graham



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


Re: Camel JDBC 1.6.1

2012-08-08 Thread Christian Mueller
This is fixed some time ago...
Is it possible for you to upgrade to 2.10.0 or so?
If not, you can use the Content Enricher Pattern [2] to work around this
issue.

[1]
https://svn.apache.org/repos/asf/camel/trunk/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java
[2] http://camel.apache.org/content-enricher.html

Best,
Christian



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


Re: Camel JDBC 1.6.1

2012-08-08 Thread michal.warecki
How /jdbcRejectProcessor/ processor looks like? 



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


Re: ServiceMIx+Camel JDBC+MySql = javax.sql.DataSource not found

2012-07-01 Thread dagaz
Thank you! That was the case - I had to add reference into my route
blueprint:



And now it works fine.

--
View this message in context: 
http://camel.465427.n5.nabble.com/ServiceMIx-Camel-JDBC-MySql-javax-sql-DataSource-not-found-tp5715323p5715332.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ServiceMIx+Camel JDBC+MySql = javax.sql.DataSource not found

2012-06-30 Thread Claus Ibsen
Hi

In the Camel XML file, which I assume is a blueprint XML file, then do
you have a  for the data source?

There is a bit details here:
http://aries.apache.org/modules/blueprint.html

Christian Schneider wrote a Camel and OSGi blog series. You may find
some useful details here
http://www.liquid-reality.de/display/liquid/2012/01/03/Karaf+Tutorial+Part+5+-+Running+Apache+Camel+integrations+in+OSGi
http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access



On Sun, Jul 1, 2012 at 2:21 AM, dagaz  wrote:
> I know that there are a lot of information about this, but it is second week
> while searching through various posts, but I cannot find any solution.
>
> Simple scenario: I need datasource bean, to use it with JDBC component.
>
> I've created db.xml for datasource:
> 
> http://www.osgi.org/xmlns/blueprint/v1.0.0";>
>  id="datasourceBean">
>  value="localhost">
>  value="camel">
> 
> 
> 
> 
>  interface="javax.sql.DataSource" ref="datasourceBean">
> 
>  value="MyDataSource">
> 
> 
> 
>
> This bundle is started and provides required services:
> Bundle 231 provides:
> 
> objectClass = javax.sql.DataSource
> osgi.jndi.service.name = MyDataSource
> osgi.service.blueprint.compname = datasourceBean
> service.id = 185
> 
> objectClass = org.osgi.service.blueprint.container.BlueprintContainer
> osgi.blueprint.container.symbolicname = db.xml
> osgi.blueprint.container.version = 0.0.0
> service.id = 194
>
> but when I add route:
> 
>  
>  
>select * from Candles
>  
>  
>  
>  
>   
>
> It fails to start:
> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
> resolve endpoint: jdbc://datasourceService due to:
>  No bean could be found in the registry for: datasourceService of type:
> javax.sql.DataSource
> at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:456)
> at
> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:48)
> at
> org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:183)
> at
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106)
> at
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
> at
> org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)
> at
> org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)
> at
> org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:440)
> at
> org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:178)
> at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:852)
> ... 31 more
> Caused by: org.apache.camel.NoSuchBeanException: No bean could be found in
> the registry for: datasourceService of type:
> javax.sql.DataSource
> at
> org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:128)
> at
> org.apache.camel.component.jdbc.JdbcComponent.createEndpoint(JdbcComponent.java:49)
> at
> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)
> at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:438)
> ... 40 more
>
> How to access the registry? Maybe service property name is wrong? What else
> could be changed?
>
> I would appreciate any help, because at the moment I feel desperate.
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/ServiceMIx-Camel-JDBC-MySql-javax-sql-DataSource-not-found-tp5715323.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


ServiceMIx+Camel JDBC+MySql = javax.sql.DataSource not found

2012-06-30 Thread dagaz
I know that there are a lot of information about this, but it is second week
while searching through various posts, but I cannot find any solution.

Simple scenario: I need datasource bean, to use it with JDBC component.

I've created db.xml for datasource:

http://www.osgi.org/xmlns/blueprint/v1.0.0";> 
 
 
 
 
 
 
 
 
 
 
 
 
 

This bundle is started and provides required services:
Bundle 231 provides:

objectClass = javax.sql.DataSource
osgi.jndi.service.name = MyDataSource
osgi.service.blueprint.compname = datasourceBean
service.id = 185

objectClass = org.osgi.service.blueprint.container.BlueprintContainer
osgi.blueprint.container.symbolicname = db.xml
osgi.blueprint.container.version = 0.0.0
service.id = 194

but when I add route:

 
 
   select * from Candles
 
 
 
 
  

It fails to start:
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: jdbc://datasourceService due to:
 No bean could be found in the registry for: datasourceService of type:
javax.sql.DataSource
at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:456)
at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:48)
at
org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:183)
at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106)
at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
at
org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)
at
org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)
at
org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:440)
at
org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:178)
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:852)
... 31 more
Caused by: org.apache.camel.NoSuchBeanException: No bean could be found in
the registry for: datasourceService of type:
javax.sql.DataSource
at
org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:128)
at
org.apache.camel.component.jdbc.JdbcComponent.createEndpoint(JdbcComponent.java:49)
at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)
at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:438)
... 40 more

How to access the registry? Maybe service property name is wrong? What else
could be changed?

I would appreciate any help, because at the moment I feel desperate.

--
View this message in context: 
http://camel.465427.n5.nabble.com/ServiceMIx-Camel-JDBC-MySql-javax-sql-DataSource-not-found-tp5715323.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel jdbc component metadata

2012-06-22 Thread Babak Vahdat
Hi

Please don't ask the same question more than once using different login-Ids:

http://camel.465427.n5.nabble.com/Fetching-metadata-from-Camel-JDBC-Component-td5714880.html

As you see by the thread above Henryk has already opened a JIRA ticket for
you and is kindly asking you if you would like to contribute a patch for it.

Babak


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


Camel jdbc component metadata

2012-06-22 Thread vsam
Hi
I am using camel jdbc component to run a query and get a resultset. I need
the column names in a separate list. Currently I am fetching the column
names manually from the list of maps returned. Is there a better way to do
this? Is there a way to get the metadata separately?


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


Re: Fetching metadata from Camel JDBC Component

2012-06-22 Thread Henryk Konsek
> feel free to log a JIRA and work on a patch

Jira ticket [1] for the issue created. @Valivets, do you want to work
on this or should I implement the patch?

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

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com


Re: Fetching metadata from Camel JDBC Component

2012-06-22 Thread Claus Ibsen
On Thu, Jun 21, 2012 at 8:10 PM, valivets  wrote:
> Hi all..
> I am using camel jdbc component to run a query and get a resultset. I need
> the column names in a separate list. Currently I am fetching the column
> names manually from the list of maps returned. Is there a better way to do
> this? Is there a way to get the metadata separately?
>

No

Where would you have that meta data, returned in a special header as well?
And a List with the column names?

CamelJdbcColumnNames : List

As we love contributions, then feel free to log a JIRA and work on a patch
http://camel.apache.org/contributing.html

>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Fetching-metadata-from-Camel-JDBC-Component-tp5714879.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Fetching metadata from Camel JDBC Component

2012-06-21 Thread valivets
Hi all..
I am using camel jdbc component to run a query and get a resultset. I need
the column names in a separate list. Currently I am fetching the column
names manually from the list of maps returned. Is there a better way to do
this? Is there a way to get the metadata separately?


--
View this message in context: 
http://camel.465427.n5.nabble.com/Fetching-metadata-from-Camel-JDBC-Component-tp5714879.html
Sent from the Camel - Users mailing list archive at Nabble.com.


  1   2   >