Loading shared libraries with ssh framework
Hi there I'am using sshxcute framework to access a Linux server. The idea
is to execute an application compiled with gcc from a java project. This
gcc applications has the next dependency:
libdl.so.2 => /lib64/libdl.so.2 (0x000000300ca00000)
libocci.so.11.1 => /e01/demov7/lib/libocci.so.11.1 (0x00002ac507b33000)
libclntsh.so.11.1 =>
/u01/app/oracle/product/11gR2/lib/libclntsh.so.11.1
(0x00002ac507e2e000)
libnnz11.so => /u01/app/oracle/product/11gR2/lib/libnnz11.so
(0x00002ac50a459000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x000000301ec00000)
libm.so.6 => /lib64/libm.so.6 (0x000000300c600000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x000000301ac00000)
libc.so.6 => /lib64/libc.so.6 (0x000000300c200000)
/lib64/ld-linux-x86-64.so.2 (0x000000300be00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000300ce00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x000000300fa00000)
libaio.so.1 => /usr/lib64/libaio.so.1 (0x0000003a92800000)
But when I try to execute my application I have the next error
error while loading shared libraries: libocci.so.11.1: cannot open shared
object file: No such file or directory
Do I need to execute somme command or configure some environment variables
to allow access to the server libraries ?
I attached my code here.
SSHExec ssh = null;
ConnBean cb = new ConnBean("127.0.0.1", "user", "password");
ssh = SSHExec.getInstance(cb);
CustomTask ct1 = new ExecCommand("./myapplication");
ssh.connect();
Result res = ssh.exec(ct1);
if (res.isSuccess) {
response = res.sysout;
} else {
response = res.error_msg;
}
ssh.disconnect() ;
No comments:
Post a Comment