Guest User

Untitled

a guest
Sep 6th, 2018
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. JDBC driver problem in OSGI
  2. ClassLoader DBHCL = ClassLoader.getSystemClassLoader();
  3. DBHCL.loadClass("com.mysql.jdbc.Driver");
  4. Class.forName("com.mysql.jdbc.Driver", true, DBHCL).newInstance();
  5. System.out.println("Class Loaded");
  6. //DriverManager.getDriver("jdbc:mysql://localhost/timedb");
  7. //System.out.println("Driver Gotten");
  8. conn = DriverManager.getConnection(URL + DBName,username,password);
  9. System.out.println("Connection Created");
  10. stmt = conn.createStatement();
  11. System.out.println("Statement Created");
  12. connFlag = true;
Add Comment
Please, Sign In to add comment