出错信息:
运行netca的时候出错:
Error loading native library: libnjni9.so.
java.lang.UnsatisfiedLinkError: jniGetOracleHome
at oracle.net.common.NetGetEnv.getOracleHome(NetGetEnv.java)
at oracle.net.ca.CmdlineArgs.setOraArgs(CmdlineArgs.java)
at oracle.net.ca.InitialSetup.(NetCA.java)
at oracle.net.ca.NetCA.main(NetCA.java)
Exception in thread "main" $
其实是没有设置好环境变量。
解决方法:
The libnjni9.so is found in two locations in a 9.x installation,
$ORACLE_HOME/lib and $ORACLE_HOME/lib32.
For example:
cd $ORACLE_HOME
find . -name "libnjni9.so" -print
./lib/libnjni9.so
./lib32/libnjni9.so
If the LD_LIBRARY_PATH includes the $ORACLE_HOME/lib but not
$ORACLE_HOME/lib32 that is likely the problem. Add the $ORACLE_HOME/lib32 to the LD_LIBRARY_PATH environment variable and ensure that it appears before the reference to $ORACLE_HOME/lib in the LD_LIBRARY_PATH statement.
For example with a C shell:
setenv LD_LIBRARY_PATH =/app/oracle/product/9.0.1/lib32:$LD_LIBRARY_PATH
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/6906/viewspace-21610/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/6906/viewspace-21610/