Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public DatabaseServiceImpl(){
- try {
- Class.forName("oracle.jdbc.driver.OracleDriver");
- connection = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "student", "STUDENT");
- System.out.println("================================");
- System.out.println(" CONNECTED TO ORACLE DATABASE ");
- System.out.println("================================");
- }
- catch (ClassNotFoundException e){
- System.err.println("FATAL ERROR: " + e.getMessage());
- }
- catch (SQLException e){
- System.err.println("DATABASE ERROR: " + e.getMessage());
- }
- }
- ========================================================
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc6</artifactId>
- <version>11.2.0</version>
- </dependency>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement