Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE521DA86 for ; Sun, 1 Jul 2012 06:21:00 +0000 (UTC) Received: (qmail 40981 invoked by uid 500); 1 Jul 2012 06:21:00 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 40644 invoked by uid 500); 1 Jul 2012 06:20:57 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 94651 invoked by uid 99); 1 Jul 2012 00:21:56 -0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of thagaz@gmail.com) Date: Sat, 30 Jun 2012 17:21:31 -0700 (PDT) From: dagaz To: users@camel.apache.org Message-ID: <1341102091060-5715323.post@n5.nabble.com> Subject: ServiceMIx+Camel JDBC+MySql = javax.sql.DataSource not found MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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: 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.