Não consigo conexão com o banco de dados.
Da erro na linha 22 " DriverManager.registerDriver(
new ClientDriver());"
Alguém consegue me ajudar?
package conexaobd;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
public class ConexaoBD {
public static void main(String[] args) {
Connection conn = null;
Statement st = null;
try {
DriverManager.registerDriver(
new ClientDriver());
conn =
DriverManager.getConnection(
"jdbc:derby://localhost:1527/sample",
"APP",
"app"
);
conn.setAutoCommit(false);
System.out.println("Conexao realizada");
st = conn.createStatement();
} catch (Exception e) {
e.printStackTrace();
}
}
}