Error Registered the JDBC driver [oracle.jdbc.driver.Oracledriver] but failed to unregister

Asked

Viewed 777 times

1

I’m making a system Javaweb using jsp that’s on that topic: Doubt in database query, error in query, and in a database query, I came across a driver error that is just below. I use the IDE netbeans server-based glassfish and the Oracle database.

Error:

Warning: The web application [/highway] 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;
}
}
  • related to http://stackoverflow.com/questions/3320400/to-prevent-a-memory-leak-the-jdbc-driver-has-been-forcibly-unregistered

  • seems to be just a Warning, not a mistake

1 answer

1

Problem solved, this was no error as stated by Pedro, it is a Warning, and the problem was in the database Insert.

  • 1

    It might complement your answer. It might help more people in the future. Also remembering that you can accept your own answer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.