Hi everyone, 

I'm currently still new at camel and I'm encoutering a problem. 

In fact, I have to use jdbc to make some Select/Insert SQL requests on my
database. 
Until here, everything good. 

But when I use the configure method, I have a "Failed to resolve endpoint"
error. 

Here is the configure method code :
from ("file:src/data/xmlTest")
        .split(xpath("/tabnames/tabname/subTrajectory/month"))
        .filter().xpath("/month[@name=\"janvier\"]")
        .setHeader("lic", xpath("/month/@nbWorkedDays"))
        .setHeader("min", xpath("/month/amount[@type=\"ca\"]/month/text()"))
        .setBody(simple("select * from projects where license =
${header.lic} and id > ${header.min} order by id"))
        *.to("jdbc:dataSource?useHeadersAsParameters=true");*

You'll see I'm already using xpath and things because I take inputs from an
xml file. Everything works just fine as I expect before jdbc (I tried it
using log at first). Anyway, the line that is really problematic for me is
the bold one. 

I really don't know how to configure the database, saying how to connect to
it (IP address etc.). I saw many exemples with camel-context.xml files but I
don't know how to right it, cause every example I encountered was using a
SQL script, first creating a database/table. But I don't want to do that
since I already got one. 

If you know exemples or can explain, where/how to configure the database
connection, I'd be very thankfull. 


P.S. : I already read the jdbc and sql examples from camel and it didn't
really help me.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Configuring-database-with-jdbc-tp5753574.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to