I tried what you said. I just removed the camel-context.xml and wrote this in
my main :
public static void main( String[] args ) throws Exception
{
//Configuring the database
DriverManagerDataSource ds= new DriverManagerDataSource();
ds.setDriverClassName("com.mysql.jdbc.Driver");
ds.setUrl("jdbc:mysql://172.27.178.73:3306");
ds.setUsername("dev");
ds.setPassword("sopragroup");
SimpleRegistry reg = new SimpleRegistry();
reg.put("datasource",ds);
//Creating the context
CamelContext myContext = new DefaultCamelContext(reg);
//Configuring the route
XmlRoute myRoute = new XmlRoute();
myContext.addRoutes(myRoute);
//Launching the context
myContext.start();
//Pausing to let the route do its work
Thread.sleep(10000);
//Stopping the context
myContext.stop();
}
But anyways, I'm still getting the exact same errors.
--
View this message in context:
http://camel.465427.n5.nabble.com/Configuring-database-with-jdbc-tp5753574p5753598.html
Sent from the Camel - Users mailing list archive at Nabble.com.