Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JDBC driver problem in OSGI
- ClassLoader DBHCL = ClassLoader.getSystemClassLoader();
- DBHCL.loadClass("com.mysql.jdbc.Driver");
- Class.forName("com.mysql.jdbc.Driver", true, DBHCL).newInstance();
- System.out.println("Class Loaded");
- //DriverManager.getDriver("jdbc:mysql://localhost/timedb");
- //System.out.println("Driver Gotten");
- conn = DriverManager.getConnection(URL + DBName,username,password);
- System.out.println("Connection Created");
- stmt = conn.createStatement();
- System.out.println("Statement Created");
- connFlag = true;
Add Comment
Please, Sign In to add comment