1 Reply Latest reply on Dec 8, 2014 5:24 AM by shahid.farooq.3551

    MYSQL JDBC in camel route

    shahid.farooq.3551

      Hi,

      I am trying to connect to mysql database from bean in camel route. First i tried using DriverManager.getConnection(this.dburl, this.username, this.password) this does was giving error

      imports not specified sun.misc. I searched for this error I got that osgi does not work with drivermanager instead try DBCP commons I tried that code too. Still the same issue sun.misc imports not satisfied. Please help in this regard. My code for java is

      DriverAdapterCPDS cpds = new DriverAdapterCPDS();

              cpds.setDriver("org.gjt.mm.mysql.Driver");

              cpds.setUrl("jdbc:mysql://localhost:3306/test");

              cpds.setUser("****");

              cpds.setPassword("******");

       

       

              SharedPoolDataSource tds = new SharedPoolDataSource();

              tds.setConnectionPoolDataSource(cpds);

              tds.setMaxActive(10);

              tds.setMaxWait(50);