linux运行DBCA出错(未解决)

来源:互联网 发布:我们不一样知乎 编辑:程序博客网 时间:2024/05/16 09:14

UnsatisfiedLinkError exception loading native library:njni10
Exception in thread "main" java.lang.UnsatisfiedLinkError:get
       at oracle.net.common.NetGetEnv.get(Native Method)
       at oracle.net.config.Config.getNetDir(Unknown Source)
       at oracle.net.config.Config.initConfig(Unknown Source)
       atoracle.net.config.Config.<init>(UnknownSource)
       atoracle.sysman.assistants.util.NetworkUtils.<init>(NetworkUtils.java:222)
       atoracle.sysman.assistants.util.step.StepContext.<init>(StepContext.java:255)
       atoracle.sysman.assistants.dbca.backend.Host.<init>(Host.java:682)
       atoracle.sysman.assistants.dbca.ui.UIHost.<init>(UIHost.java:205)
       atoracle.sysman.assistants.dbca.ui.InteractiveHost.<init>(InteractiveHost.java:54)
       at oracle.sysman.assistants.dbca.Dbca.getHost(Dbca.java:160)
       at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:94)
       at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:180


metalink上两个相关的帖子,其中之一:


Subject:  DBCA, NETCA and DBUA Fail With Error:"UnsatisfiedLinkError exception loading native library ..."
  Doc ID:  395891.1Type:  PROBLEM
  Modified Date :  20-AUG-2008Status:  MODERATED

In this Document
  Symptoms
  Cause
  Solution

 

--------------------------------------------------------------------------------


This document is being delivered to you via Oracle Support's RapidVisibility (RaV) process, and therefore has not been subject to anindependent technical review.

 

Applies to:
Net Configuration Assistant - NetCA - Version: 9.2.0.1.0 to10.2.0.2.0
Oracle Database Configuration Assistant - Version: 9.2.0.1 to10.2.0.2
HP-UX PA-RISC (64-bit)
Found in 10.2.0.1, but the problem can affect other Oracleversions
Symptoms
The Database Configuration Assistant (DBCA) and NetworkConfiguration Assistant (NETCA) can fail with the followingerrors:

UnsatisfiedLinkError exception loading native library:njni10
Exception in thread "main" java.lang.UnsatisfiedLinkError:get
at oracle.net.common.NetGetEnv.get(Native Method)
at oracle.net.config.Config.getNetDir(Unknown Source)
at oracle.net.config.Config.initConfig(Unknown Source)
atoracle.net.config.Config.<init>(UnknownSource)
atoracle.sysman.assistants.util.NetworkUtils.<init>(NetworkUtils.java:222)
atoracle.sysman.assistants.util.step.StepContext.<init>(StepContext.java:255)
atoracle.sysman.assistants.dbca.backend.Host.<init>(Host.java:682)
atoracle.sysman.assistants.dbca.ui.UIHost.<init>(UIHost.java:205)
atoracle.sysman.assistants.dbca.ui.InteractiveHost.<init>(InteractiveHost.java:54)
at oracle.sysman.assistants.dbca.Dbca.getHost(Dbca.java:160)
at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:94)
at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:180)

In this case DBCA and NETCA failed to load librarylibnjni10.sl

The generic error is:

UnsatisfiedLinkError exception loading native library:<library name>
Exception in thread "main" java.lang.UnsatisfiedLinkError:get
at oracle.net.common.NetGetEnv.get(Native Method)
at oracle.net.config.Config.getNetDir(Unknown Source)
at oracle.net.config.Config.initConfig(Unknown Source)
atoracle.net.config.Config.<init>(UnknownSource)
atoracle.sysman.assistants.util.NetworkUtils.<init>(NetworkUtils.java:222)
:


Cause
If you use truss or tusc to trace the DBCA or NETCA tools, theoutput can contain errors which indicate that the tools fail due toa lack of resources.  In the following example,the tools fail due to a lack of virtual memory:

:
[19963] stat("/oracle/product/10.2.0/lib32/libnjni10.sl",0x77ff4440)......................................................... = 0
[19963] open("/oracle/product/10.2.0/lib32/libnjni10.sl", O_RDONLY,040230) ............................... = 76
:
[19963] read(76, "80\0\0\v\0\0\004\0\0\0\0", 12)....................................................................................= 12
[19963] mmap(NULL, 20135936, PROT_READ|PROT_EXEC,MAP_SHARED|MAP_SHLIB, 76, 3629056)
................................................. ERR#12ENOMEM
[19963] close(76)...................................................................................................................................= 0
[19963] write(1, "U n s a t i s f i e d L i n k E ".., 61)...............................................................................= 61
:

The ENOMEM error indicates that the tool failing when is tryingto mmap (allocate memory for) the libnjni10.sl library.

From the mmap line we see that DBCA/NETCA fails to allocate 20megabytes of virtual memory when loading the libnjni10.sllibrary.


Solution
To implement the solution, please execute the following steps:


1. Check if all kernel parameters are set correctly and all OSpackages and Patches are installed (see Note 169706.1)

2. Verify if the environment is set correctly:

    #echo$PATH

    #echo$ORACLE_HOME

    #echo$LD_LIBRARY_PATH

    #echo$SHLIB_PATH

if the above env variables do not point to the correct OracleHome, please change them according:

    # exportORACLE_HOME=<path to your Oracle Homedirectory>

    #exportPATH=$ORACLE_HOME/bin:$PATH

    #exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

    #exportSHLIB_PATH=$ORACLE_HOME/lib32:$SHLIB_PATH

 

3. Check whether any errors occur during a 'relink all' (andresolve them)

4. Collect truss or tusc output by running the following command(or similar):

          truss -faeio /tmp/dbca_output.log $ORACLE_HOME/bin/dbca

5. Check the truss/tusc output and, for the library reported inthe UnsatisfiedLinkError exception, identify a line like thefollowing:

[19963] stat("/oracle/product/10.2.0/lib32/libnjni10.sl",0x77ff4440)................................................................= 0
[19963] open("/oracle/product/10.2.0/lib32/libnjni10.sl", O_RDONLY,040230)............................................ = 76
:
[19963] read(76, "80\0\0\v\0\0\004\0\0\0\0",12).....................................................................................= 12
[19963] mmap(NULL, 20135936, PROT_READ|PROT_EXEC,MAP_SHARED|MAP_SHLIB, 76,3629056)................................................. ERR#12ENOMEM
[19963]close(76)....................................................................................................................= 0
[19963] write(1, "U n s a t i s f i e d L i n k E "..,61)...........................................................................= 61
:

According to the mmap line, the mmap system call fails toallocate 20135936 bytes of shared memory.

6. If this happens, try running DBCA/NETCA in a separate memorywindow (specifying how much memory the window requires, inmegabytes):

         setmemwindow -i 20 ./dbca

@ the above command is only for HP-UX PA-RISC OS.

Keywords
DBCA ; DBUA ; DATABASE~CONFIGURATION~ASSISTANT ;UNSATISFIEDLINKERROR ; JAVA.LANG.UNSATISFIEDLINKERROR ; NETCA; 
--------------------------------------------------------------------------------

Help us improve our service. Please email us your comments forthis document. .



metalink上第二篇相关文章


Subject:  Unsatisfiedlinkerror Exception LoadingNative Library: Njni10
  Doc ID:  557264.1Type:  PROBLEM
  Modified Date :  02-JUL-2009Status:  PUBLISHED

In this Document
  Symptoms
  Changes
  Cause
  Solution
  References

 

--------------------------------------------------------------------------------

 

Applies to:
Oracle Application Server 10g Enterprise Edition - Version:10.1.2.0.0 to 10.1.2.3.0
IBM AIX Based Systems (64-bit)
Checked for relevance on 2-July-2009
Symptoms
During the installation of patchset 10.1.2.2.0, the Oracle InternetDirectory Patch Configuration
Assistant fails with the following error:
UnsatisfiedLinkError exception loading native library: njni10
Exception in thread "main" java.lang.UnsatisfiedLinkError:get
at oracle.net.config.Config.getNetDir(Unknown Source)
Changes
The libnjni10 file did exist as expected in $ORACLE_HOME/lib andlib32.


The following notes describing the same error were reviewed anddetermined to not solve the issue:
Note 395891.1 - DBCA, NETCA and DBUA Fail With Error:"UnsatisfiedLinkError exception loading native library ..."
Cause
AIX caches the shared libraries at the OS level and in this case,it cached libraries specific to the Oracle installation.

Solution
1. Link prerequisite libraries
> ln -s $ORACLE_HOME/lib32/libnjni10.dylib$ORACLE_HOME/lib32/libnjni10
> ln -s $ORACLE_HOME/lib32/libclntsh.dylib$ORACLE_HOME/lib32/libclntsh.dylib.10.1
2. Clear the shared library cache by running the following commandas root
> /usr/bin/slibclean

Be careful to switch back to the oracle user before runninganything else

3. Set the LIBPATH to $ORACLE_HOME/lib32

4. Re-run the installation (failed configuration assistants canbe completed by doing the following)
> export LD_LIBRARY_PATH=$ORACLE_HOME/lib32
> $ORACLE_HOME/cfgtoollogs/configToolCommands
References
Note 395891.1 - DBCA, NETCA and DBUA Fail With Error:"UnsatisfiedLinkError exception loading native library ..."
SR 6126571.993

Keywords
INSTALLATION~FAILS ; AIX ; SHARED~LIBRARY ; LIB32 ;UNSATISFIEDLINKERROR ; DURING~INSTALLATION ;JAVA.LANG.UNSATISFIEDLINKERROR ; 
--------------------------------------------------------------------------------

Help us improve our service. Please email us your comments forthis document
 

 

 

 

 

 

Oracle10G exception loading native library: njni10
<<Backby: fcruz.


Are you one ofthose that has been suffering from this error: UnsatisfiedLinkErrorexception loading native library: njni10 , while installing oracle10G client or oracle server on macosx ? , well , you wont beleivehow simple the solution is ...

The complete error while loading the./netca after making the installation is thefollowing:

UnsatisfiedLinkError exception loading nativelibrary: njni10
Exception in thread "main" java.lang.UnsatisfiedLinkError:jniGetOracleHome
at oracle.net.common.NetGetEnv.jniGetOracleHome(NativeMethod)
at oracle.net.common.NetGetEnv.getOracleHome(Unknown Source)
at oracle.net.common.NetProperties.(Unknown Source)
at oracle.net.common.NetProperties.getInstance(UnknownSource)
at oracle.net.ca.CmdlineArgs.(Unknown Source)
at oracle.net.ca.InitialSetup.(Unknown Source)
at oracle.net.ca.NetCA.main(Unknown Source)

Ok , just follow the simple two steps,

cd into $ORACLE_HOME/bin

then type: ln -s $ORACLE_HOME/lib/libnjni10.dylib$ORACLE_HOME/lib/libnjni10 , then ENTER

then type: ln -s $ORACLE_HOME/lib/libclntsh.dylib$ORACLE_HOME/lib/libclntsh.dylib.10.1

After that go into $ORACLE_HOME/bin and start./netca

Problem solved, this simple solution came to meliterally after hours of dealing with the situacion and very littlehelp from ORACLE documentation on the issue.


0 0