Advertisement
Guest User

Untitled

a guest
Oct 13th, 2017
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. public static Connection getConnection() throws ConfigurationException {
  2. try {
  3. if (conn == null) {
  4. createConnection();
  5. }
  6. return conn;
  7. } catch (SQLException e) {
  8. System.out.println();
  9. throw new ConfigurationException(e);
  10. }
  11. }
  12.  
  13. private static void createConnection() throws ConfigurationException, SQLException {
  14. try {
  15. String url = ConfigHelper.getJdbcUrl();
  16. String user = ConfigHelper.getJdbcUser();
  17. String password = ConfigHelper.getJdbcPassword();
  18. String schema = ConfigHelper.getJdbcSchema();
  19. String driverName = ConfigHelper.getJdbcDriver();
  20. Driver driver = (Driver) Class.forName(driverName).newInstance();
  21.  
  22. DriverManager.registerDriver(driver);
  23. conn = DriverManager.getConnection(url, user, password);
  24. conn.setSchema(schema);
  25. } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
  26. throw new ConfigurationException(e);
  27. }
  28. }
  29.  
  30. java.sql.SQLException: ORA-01017: invalid username/password; logon denied
  31.  
  32. at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
  33. at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
  34. at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
  35. at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:600)
  36. at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:445)
  37. at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
  38. at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
  39. at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:380)
  40. at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:760)
  41. at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:401)
  42. at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
  43. at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
  44. at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
  45. at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
  46. at java.sql.DriverManager.getConnection(DriverManager.java:664)
  47. at java.sql.DriverManager.getConnection(DriverManager.java:247)
  48. at de.axa.schadenreserveOnline.server.db.DBHelper.createConnection(DBHelper.java:51)
  49. at de.axa.schadenreserveOnline.server.db.DBHelper.getConnection(DBHelper.java:32)
  50. ... 73 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement