Vraag:
ik loop tegen een probleem aan met een connect met een thin JDBC-driver
(classes12.zip) naar een oracle 8.1.5 database binnen Jbuilder 3.5 zelf binnen de
ontwikkelomgeving.
De library heb ik volgens mij correct toegevoegd. Krijg volgende melding als ik de
verbinding wil testen:
The driver oracle.jdbc.driver.OracleDriver could not be loaded. This
could be a problem with the driver itself or that the driver is not found on the
classpath.
Opvallend:
1. als je de applicatie runt wordt de verbinding met oracle wel gemaakt!
database1.setConnection(new
com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:oracle:thin:@dikza
k:1521:ORCL", "scott", null, true, "oracle.jdbc.driver.OracleDriver"));
// je krijgt dan gewoon een login dialoog.
2. als je alles expliciet doet is de verbinding ook te maken.
try{
// Class.forName ("oracle.jdbc.driver.OracleDriver");
System.out.println ("Success");
}
catch (ClassNotFoundException ex){
System.out.println ("First Exception");
}
try {
// Connect to the database
// You can put a database name after the @ sign in the connection URL.
myConn = DriverManager.getConnection
("jdbc:oracle:thin:@dikzak:1521:orcl", "scott" ,"tiger");
System.out.println ("connected");
}
catch(SQLException ex){
System.out.println("SQLException");
}
Hebben jullie een oplossing c.q. patch hiervoor?
Antwoord:
U bent niet ingelogd.
|