camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From takidean <>
Subject Re: how to do a registry of type: javax.sql.DataSource
Date Sat, 23 Mar 2013 21:26:00 GMT
Hi Mr claus is still get this message im so pressed i have to do it for my
project of end of year 	public static void main(String[] args) throws
Exception {		// TODO Auto-generated method stub		//DataSource dd;		
DriverManagerDataSource ds = new DriverManagerDataSource();		 	     
ds.setUrl("jdbc:mysql://localhost:3306/examen");	    ds.setUsername("root");	   
ds.setPassword("");	       //JndiRegistry reg = null;	        SimpleRegistry
reg = new SimpleRegistry() ;	        reg.put("datasource",ds); //	       
reg.bind("datasource","timlogdb");        CamelContext context = new
}}/**********Route builder*////////public class MyRouteBuilder extends
RouteBuilder {    /**     * Let's configure the Camel routing rules using
Java code...     */	javax.sql.DataSource ds;    public void configure() {    	      
// reg.put("datasource",ds);         // here is a sample which processes the
input files        // (leaving them in place - see the 'noop' flag)*/       
// then performs content based routing on the message using XPath     
from("file:src/data?noop=true")            .choice()               
.when(xpath("/person/user ='SFIN'"))                   
.setBody(constant("INSERT INTO user
.otherwise()        .to("file:target/messages/others");                       
}Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: jdbc://jdbc:mysql://localhost:3306/examen due to: No bean
could be found in the registry for: jdbc:mysql://localhost:3306/examen of
type: javax.sql.DataSource}

View this message in context:
Sent from the Camel - Users mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message