rayskelton
asked on
NoNoClassDefFoundError: oracle/security/o3logon/O3LoginClientHelper
The following error occured attempting to connect with Oracle 8.1.7 and driver classes12_g.zip with Java 1.4.2. Is the driver compatable with 8.1.7 and 1.4.2? What could be the problem?
-------------------------- ---------- ---------- ---------- --
Loading Database Driver..........
Connecting to Database:RM2000 Development using Oracle i2d2 at port:1531
Connect String:jdbc:oracle:thin:@1 23.21.148. 115:1531:m 2d2
Exception in thread "main" java.lang.NoClassDefFoundE rror: oracle/security/o3logon/O3 LoginClien tHelper
at oracle.jdbc.ttc7.O3log.<in it>(O3log. java:262)
at oracle.jdbc.ttc7.TTC7Proto col.logon( TTC7Protoc ol.java:24 9)
at oracle.jdbc.driver.OracleC onnection. <init>(Ora cleConnect ion.java:2 65)
at oracle.jdbc.driver.OracleD river.getC onnectionI nstance(Or acleDriver .java:365)
at oracle.jdbc.driver.OracleD river.conn ect(Oracle Driver.jav a:260)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 512)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 171)
at DatabaseUtil.getDbConnect( DatabaseUt il.java:15 3)
at DatabaseUtil.<init>(Databa seUtil.jav a:67)
at DatabaseUtil.main(Database Util.java: 443)
-------------------------- ---------- ---------- ---------
Code Snippet
-----------------
public int getDbConnect()
{
// set class members with configuration
// information read from the properties file
host = System.getProperty("host") ;
userName = System.getProperty("user") ;
url = System.getProperty("url");
passWord = System.getProperty("passwo rd");
port = System.getProperty("port") ;
sid = System.getProperty("sid");
databaseName = System.getProperty("databa seName");
maxSelectRows = System.getProperty("maxSel ectRows");
// Determine which system we are on
// the MySql driver is for Linux *
// Oracle this is for Oracle Driver
String connectString = null;
if(url.compareTo("jdbc:mys ql//") == 0)
{// MySql Database
connectString = url + host + ":"
+ port + "/" + sid
+ "?user=" + userName
+ "&password=" + passWord;
}
else
if(url.compareTo("jdbc:ora cle:thin:@ ") == 0)
{// Oracle Database
// connectString = url + host + ":" + port + ":" + sid+
// ", " + userName +", " + passWord;
connectString = url + host + ":" + port + ":" + sid;
}
else
System.out.println("Unsupp orted URL for this application:" + url);
try
{
System.out.println("Connec ting to Database:" + databaseName
+ " " + sid + " at port:"+ port);
System.out.println("Connec t String:" + connectString);
connection = DriverManager.getConnectio n(connectS tring, userName, passWord);
System.out.println("Connec tion established for:" + databaseName);
connection.setAutoCommit(f alse);
}
--------------------------
Loading Database Driver..........
Connecting to Database:RM2000 Development using Oracle i2d2 at port:1531
Connect String:jdbc:oracle:thin:@1
Exception in thread "main" java.lang.NoClassDefFoundE
at oracle.jdbc.ttc7.O3log.<in
at oracle.jdbc.ttc7.TTC7Proto
at oracle.jdbc.driver.OracleC
at oracle.jdbc.driver.OracleD
at oracle.jdbc.driver.OracleD
at java.sql.DriverManager.get
at java.sql.DriverManager.get
at DatabaseUtil.getDbConnect(
at DatabaseUtil.<init>(Databa
at DatabaseUtil.main(Database
--------------------------
Code Snippet
-----------------
public int getDbConnect()
{
// set class members with configuration
// information read from the properties file
host = System.getProperty("host")
userName = System.getProperty("user")
url = System.getProperty("url");
passWord = System.getProperty("passwo
port = System.getProperty("port")
sid = System.getProperty("sid");
databaseName = System.getProperty("databa
maxSelectRows = System.getProperty("maxSel
// Determine which system we are on
// the MySql driver is for Linux *
// Oracle this is for Oracle Driver
String connectString = null;
if(url.compareTo("jdbc:mys
{// MySql Database
connectString = url + host + ":"
+ port + "/" + sid
+ "?user=" + userName
+ "&password=" + passWord;
}
else
if(url.compareTo("jdbc:ora
{// Oracle Database
// connectString = url + host + ":" + port + ":" + sid+
// ", " + userName +", " + passWord;
connectString = url + host + ":" + port + ":" + sid;
}
else
System.out.println("Unsupp
try
{
System.out.println("Connec
+ " " + sid + " at port:"+ port);
System.out.println("Connec
connection = DriverManager.getConnectio
System.out.println("Connec
connection.setAutoCommit(f
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Worth renaming it to classes12_g.jar anyway to see what happens. Make sure it's in your classpath or in all jre/lib/ext
> Worth renaming it to classes12_g.jar anyway to see what happens
Not necessary.
Not necessary.
It certainly would be if he's put it into the extensions directory - it wouldn't work otherwise
:-)