Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 583FD200B59 for ; Mon, 8 Aug 2016 20:51:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 56AFC160A91; Mon, 8 Aug 2016 18:51:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A649F160A77 for ; Mon, 8 Aug 2016 20:51:05 +0200 (CEST) Received: (qmail 21393 invoked by uid 500); 8 Aug 2016 18:51:04 -0000 Mailing-List: contact user-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@karaf.apache.org Delivered-To: mailing list user@karaf.apache.org Received: (qmail 21382 invoked by uid 99); 8 Aug 2016 18:51:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2016 18:51:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2D07A185860 for ; Mon, 8 Aug 2016 18:51:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.412 X-Spam-Level: ** X-Spam-Status: No, score=2.412 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, URI_HEX=1.313] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qKPfUeKW7BAD for ; Mon, 8 Aug 2016 18:51:00 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 1EB6E5F230 for ; Mon, 8 Aug 2016 18:51:00 +0000 (UTC) Received: from mfilter42-d.gandi.net (mfilter42-d.gandi.net [217.70.178.172]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id A326E41C086 for ; Mon, 8 Aug 2016 20:50:59 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter42-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter42-d.gandi.net (mfilter42-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id QvRPEdDhc2Nv for ; Mon, 8 Aug 2016 20:50:57 +0200 (CEST) X-Originating-IP: 82.238.224.4 Received: from [192.168.134.15] (bre91-1-82-238-224-4.fbx.proxad.net [82.238.224.4]) (Authenticated sender: jb@nanthrax.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id C95DD41C08D for ; Mon, 8 Aug 2016 20:50:57 +0200 (CEST) Subject: Re: Camel cannot find a Karaf registered datasource To: user@karaf.apache.org References: <1470670261277-4047459.post@n3.nabble.com> From: =?UTF-8?Q?Jean-Baptiste_Onofr=c3=a9?= Message-ID: Date: Mon, 8 Aug 2016 20:50:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1470670261277-4047459.post@n3.nabble.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit archived-at: Mon, 08 Aug 2016 18:51:06 -0000 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