Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Connection getConnection() throws ConfigurationException {
- try {
- if (conn == null) {
- createConnection();
- }
- return conn;
- } catch (SQLException e) {
- System.out.println();
- throw new ConfigurationException(e);
- }
- }
- private static void createConnection() throws ConfigurationException, SQLException {
- try {
- String url = ConfigHelper.getJdbcUrl();
- String user = ConfigHelper.getJdbcUser();
- String password = ConfigHelper.getJdbcPassword();
- String schema = ConfigHelper.getJdbcSchema();
- String driverName = ConfigHelper.getJdbcDriver();
- Driver driver = (Driver) Class.forName(driverName).newInstance();
- DriverManager.registerDriver(driver);
- conn = DriverManager.getConnection(url, user, password);
- conn.setSchema(schema);
- } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
- throw new ConfigurationException(e);
- }
- }
- java.sql.SQLException: ORA-01017: invalid username/password; logon denied
- at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
- at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
- at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
- at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:600)
- at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:445)
- at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
- at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
- at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:380)
- at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:760)
- at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:401)
- at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
- at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
- at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
- at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
- at java.sql.DriverManager.getConnection(DriverManager.java:664)
- at java.sql.DriverManager.getConnection(DriverManager.java:247)
- at de.axa.schadenreserveOnline.server.db.DBHelper.createConnection(DBHelper.java:51)
- at de.axa.schadenreserveOnline.server.db.DBHelper.getConnection(DBHelper.java:32)
- ... 73 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement