i am trying to make jdbc oci connection to oracle 11g that uses os authentication
i made a sample console applicat
If you use an OCI url("jdbc:oracle:oci:/@"+tnsName
) then you need oracle client libraries on the classpath. So you need have oracle client on the machine.
But if you use a thin driver and specify the url as the following, you don't need the oracle client.
"jdbc:oracle:thin:@"+dbServer+":"+port+":"+SID;
try set correct values in /usr/share/tomcat/conf/tomcat.conf
for ld_path:
LD_LIBRARY_PATH="/usr/lib/oracle/11.2/client64/lib:/usr/lib64"
If u are using Eclipse with Jboss 6.1.0 disturbution .it will shown error Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc11 in java. library.path Solution : copy ocijdbc11.dll from oracle\product\11.2.0\client_1\BIN and paste in to
D:\jboss-6.1.0.Final\bin\native
i was able to make successful os connection to oracle database with jdbc in this post:
How to connect to oracle database with os authentication?
I think you are getting this problem because you are using JRE 1.6 or below version of Java with type-2 driver. Please replace your JRE 1.6 buildpath by JRE 1.7 or JRE 1.8. It will solve the problem.
Please follow the steps: