Hello,
I am using suse 9.3
I installed http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html.
Steps:
1. copy files to /opt/oracle/client
2. insert /opt/oracle/client into /etc/ld.so.conf
3. copy tnsnames.ora into /opt/oracle/client
3. export TNS_ADMIN=/opt/oracle/client
then I try to write simple java aplication:
package oracletest;
import java.sql.SQLException;
import oracle.jdbc.pool.*;
import oracle.jdbc.oci.*;
/**
*
* @author hlavki
*/
public class Main {
/** Creates a new instance of Main */
public Main() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
try {
new OracleOCIConnectionPool
("username", "*****", "jdbc:oracle:oci:@(description=(address=(host=10.0.0.224)(protocol=tcp)(port=1521))(CONNECT_DATA = (SERVICE_NAME = RORA.world)(FAILOVER_MODE = (TYPE=SELECT)(METHOD=BASIC))))", null);
} catch (SQLException e) {
System.out.println(e.getMessage());
} catch (java.lang.UnsatisfiedLinkError e2) {
System.out.println(e2.getMessage());
}
}
}
I write from command line:
java -cp ./OracleTest.jar:/opt/oracle/client/ojdbc14.jar oracletest.Main
everytime I get error: "no ocijdbc10 in java.library.path".
I don't know where is problem...
hlavki@homer:~/bordel/datastudio> l /opt/oracle/client
celkom 101162
drwxr-xr-x 4 root root 576 2005-07-26 10:27 ./
drwxr-xr-x 5 root root 136 2005-07-26 10:05 ../
drwxr-xr-x 2 root root 72 2005-07-25 18:00 bin/
-r--r--r-- 1 root root 1590491 2005-06-28 19:11 classes12.jar
-r--r--r-- 1 root root 1525 2005-06-28 19:11 glogin.sql
lrwxrwxrwx 1 root root 17 2005-07-26 08:44 libclntsh.so -> libclntsh.so.10.1*
-rwxrwxrwx 1 root root 18505986 2005-06-28 19:11 libclntsh.so.10.1*
-r-xr-xr-x 1 root root 27702 2005-06-28 19:11 libheteroxa10.so*
-r-xr-xr-x 1 root root 5480533 2005-06-28 19:11 libnnz10.so*
-rwxrwxrwx 1 root root 1397960 2005-06-28 19:11 libocci.so.10.1*
-rwxrwxrwx 1 root root 70659429 2005-06-28 19:11 libociei.so*
-r-xr-xr-x 1 root root 119947 2005-06-28 19:11 libocijdbc10.so*
-r-xr-xr-x 1 root root 1434227 2005-06-28 19:11 libsqlplusic.so*
-r-xr-xr-x 1 root root 1047293 2005-06-28 19:11 libsqlplus.so*
-r--r--r-- 1 root root 1536979 2005-06-28 19:11 ojdbc14.jar
-r--r--r-- 1 root root 1642000 2005-06-28 19:11 orai18n.jar
drwxrwxrwx 4 root root 152 2005-06-28 19:11 sdk/
-r-xr-xr-x 1 root root 8843 2005-06-28 19:11 sqlplus*
-rw-rw-r-- 1 hlavki users 478 2005-07-26 10:12 tnsnames.ora
thanks, miso