Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Camel-jdbc snapshots -> SQLException

$
0
0
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.

Viewing all articles
Browse latest Browse all 5648

Trending Articles