karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Camel cannot find a Karaf registered datasource
Date Mon, 08 Aug 2016 18:50:57 GMT
Hi,

you can take a look on this blog:

http://blog.nanthrax.net/2015/08/talend-esb-query-a-database-directly-in-the-mediation-perspective/

It shows how to use it (it's in Talend studio, but basically the same as 
in Camel).

Regards
JB

On 08/08/2016 05:31 PM, LiamO wrote:
> Hi, I had a lot of fun and games registering a firebird datasource in Karaf.
> Thanks to PAX-JDBC and Christian Scheider's tutorial I was able to manage
> this and have the datasource
>
> karaf@root()> jdbc:ds-list Name | Product | Version | URL | Status
> ------------------------------------------------------------------------------------------------------------------------
> ----------
> unbdev | Firebird 2.58LI | LI-V2.5.3.26778 |
> jdbc:firebirdsql:java://lo-******-dev-01/opt/unb/db/*********12-05-2016.fdb
> | OK
>
> I can interrogate the db using the Karaf jdbc commands. Unfortunately when I
> try to run a Camel instance containing the following route
>
> public void configure() throws Exception {
>   from("direct:makeFile")
>   .to("jdbc:unbdev").split(body()).process(new ResultToReport())
>   .to("file:/testx/?charset=utf-8") .to("direct:makeFileComplete");
> }
>
> I get an Activator start error with the cause
>
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
> route route71 at: >>> To[jdbc:unbdev] <<< in route:
> Route(route71)[[From[direct:makeFile]] -> [To[jdbc:unbdev], ... because of
> Failed to resolve endpoint: jdbc://unbdev due to: No bean could be found in
> the registry for: unbdev of type: javax.sql.DataSource
>
> Naturally the route works fine in a unit test outside of Karaf using a
> simple registry. I'm sorry as it looks like something so simple but I am
> just left scratching my head. Oh and I am running on Karaf 4.0.5 and Camel
> 2.17.2. Thanks in advance.
> Regards, Liam
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Camel-cannot-find-a-Karaf-registered-datasource-tp4047459.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message