Advertisement
Guest User

Untitled

a guest
Jul 5th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. INFO: Illegal access: this web application instance has been stopped already. Could not load oracle.jdbc.OracleDriver. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.java.lang.IllegalStateException
  2. at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
  3. at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
  4. at java.lang.Class.forName0(Native Method)
  5. at java.lang.Class.forName(Class.java:278)
  6. at java.sql.DriverManager.isDriverAllowed(DriverManager.java:463)
  7. at java.sql.DriverManager.getConnection(DriverManager.java:215)
  8. at gsmprepaid.DbCon.getMyIvrDataSource(DbCon.java:362)
  9. at com.realsoftinc.dtl.services.DTLDatabaseManagerNoSession.getMyIvrDataSource(DTLDatabaseManagerNoSession.java:142)
  10. at com.realsoftinc.dtl.services.DTLDatabaseManagerNoSession.getCMSMyIvrConnection(DTLDatabaseManagerNoSession.java:166)
  11. at com.realsoftinc.dtl.services.MyIvr1DBThread.run(MyIvr1DBThread.java:138)
  12.  
  13. Unable to make connection with DB
  14. java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@//ivr-scan.dc.dialog.lk:1521/ivrdb
  15.  
  16. Connection Con = null;
  17. String url = "jdbc:oracle:thin:@//ivr-scan.dc.dialog.lk:1521/ivrdb";
  18. String dbUName = "IVRDTL";
  19. String dbPswd = "ivrdtl";
  20. String Driver = "oracle.jdbc.driver.OracleDriver";
  21.  
  22. public DbCon() throws InstantiationException, IllegalAccessException,
  23. ClassNotFoundException, SQLException {
  24. Class.forName(this.Driver).newInstance();
  25. }
  26.  
  27. public Connection getMyIvrDataSource() throws IOException {
  28. try {
  29.  
  30. System.out.println("Trying to connect");
  31. this.Con = DriverManager.getConnection(this.url, this.dbUName,
  32. this.dbPswd);
  33. System.out
  34. .println("Connection Established Successfull and the DATABASE NAME IS:"
  35. + Con.getMetaData().getDatabaseProductName());
  36. } catch (Exception e) {
  37. System.out.println("Unable to make connection with DB");
  38. e.printStackTrace();
  39. }
  40. return Con;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement