I am making a JavaWeb system using jsp
that is in this topic: Doubt in query database, error in query , and in a query with the database, I came across a driver error that is Right below. I use the netbeans
IDE with server glassfish
and the Oracle database.
Error:
Warning : The web application [/ road] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Connection class:
public class Conexao {
private Connection conexao;
public Conexao() {
try {
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url = "jdbc:oracle:thin:@127.0.0.1:1521:XE";
conexao = DriverManager.getConnection(url,"rafilds","1234");
} catch (Exception e) {
e.printStackTrace();
}
}
public Connection getConexao() {
return conexao;
}
}