I'm fairly new to the world of Java. I have a problem and I have been searching
all day for an answer without luck. Perhaps someone with more knowledge can
help me.
I have:
- Solaris box
- JDK 1.1.6
- JDK 1.3 installed in another directory
- Oracle 8.1.5
- DB.java - a class that does the work involved with connecting to a test
database
- TEST.java - a main program class that uses DB to fetch data from the test
database
- everything is on the solaris box
The java program compiles and runs properly when I use javac/java version 1.1.6
The java program compiles with the 1.3 version of javac, but when I run it, I
get this:
% java Test
Exception in thread "main" java.lang.UnsatisfiedLinkError: make_c_state
at oracle.jdbc.oci8.OCIDBAccess.make_c_state(Native Method)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at DB.<init>(DB.java:18)
at Test.main(Test.java:11)
%
I am pretty sure that $CLASSPATH and $LD_LIBRARY_PATH are correct.
I thought about providing the source code in this post, but I decided not to
since it works properly under JDK 1.1.6.
$ORACLE_HOME/jdbc/lib contains the files:
classes111b.zip
nlscharset11.zip
When I switch between JDK 1.1.6 to 1.3, I alter $path, $CLASSPATH, and
$LD_LIBARY_PATH as needed.
I have a feeling that my problem is that Oracle doesn't have a driver for JDK
1.3. According to http://technet.oracle.com/tech/java/sqlj_jdbc/, these are
the available drivers:
Download the drivers Solaris
Oracle8i 8.1.7 JDBC Drivers for use with JDK 1.2.x for Solaris
Oracle8i 8.1.7 JDBC Drivers for use with JDK 1.1.x for Solaris
Oracle8i 8.1.6.2.0 JDBC Drivers for use with JDK 1.2.x for Solaris
Oracle8i 8.1.6.2.0 JDBC Drivers for use with JDK 1.1.x for Solaris
Oracle 8i (8.1.5) JDBC Drivers for use with JDK 1.1.x for Solaris
Oracle 8i (8.1.5) JDBC Drivers for use with JDK 1.0.2 for Solaris
There is no mention is JDK 1.3. Is this because an oracle driver for it doesn't
exist yet?
I apologize if these are simple simon questions, but I've been trying for hours
to find the answer to my problem.
Thanks,
Don