Remember to uses classes12.jar instead of ojdbc14 when working with CLOBs.. Or else it throws this
weird exception:
java.sql.SQLException: ORA-00600: internal error code, arguments: [kolaHashFind:hash table], [], [], [], [], [], [], []
2. OCI drivers are thick drivers(type II) and use native libraries to interact with oracle db server.
Usually required when we need to work with XMLType to the oracle db server.
For XMLType its more complicated as it expects xdb.jar and oci jar (ojdbc5.jar i think).
OCI could be a pain:
Check http://myjdbc.tripod.com/basic/jdbcoci.html
I think there could be compatibility issues with OCI esp. as the client driver should match the oracle server version installed. Well that's a guess, will find out and post more here...
The exceptions that were faced with oci driver are below:
java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path >> Guess: must be missing a native dll. does it mean u need a oracle client 10 ?
java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path >> Guess: must be missing a native dll. does it mean u need a oracle client 11 ?
java.lang.NoClassDefFoundError: oracle/jdbc/oci8/OCIDBAccess
java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLParseException >> occurs when we need to work with XMLType found in xdb.jar which in turn depends on xmlparserv2.jar from oracle...
This is such a pain esp. with cryptic clues what oracle gives.. Oracle DB is good but why are the jdbc clients so bad.. There are so many distributions of oracle driver and the jar names are so confusing..overall we spend lot of time sorting out jdbc drivers of oracle during development i think.. Oracle jdbc folks are u listening....if yes clean up the crap and keep it simple silly...
IMPORTANT:
On different oracle jdbc bundles. Must read:
ojdbc6.jar - All the classes to support basic functionality for the Thin and OCI drivers when using JDK 1.6 (JSE 6)
ojdbc5.jar - All the classes to support basic functionality for the Thin and OCI drivers when using JDK 1.5 (JSE 5)
classes12.jar - Classes for the Thin and OCI drivers when using a Java 1.2 or 1.3 VM.
classes12.jar - Classes for the Thin and OCI drivers when using a Java 1.2 or 1.3 VM.
ojdbc14.jar - Same as classes12.jar except for use with Java 1.4 VMs
More dependencies for OCI:
libocijdbc.so (Solaris) Native library for the JDBC OCI driver.
- for JDBC 8.x.x drivers, the
is 8 - for JDBC 9.x.x drivers, the
is 9 - for JDBC 10.x.x drivers, the
is 10 - for JDBC 11.x.x drivers, the
is 11
ocijdbc.dll (Windows) Similar to above, except on Windows platforms. This file should be locatable via your %PATH% setting.
1 comment:
You had link
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html#02_07
Should be
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#02_07
Post a Comment