Tuesday

Cloning leftovers

Today while trying to run netca in a cloned environment, I was greeted with the following error:

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)

I noticed that under LD_LIBRARY_PATH ($ORACLE_HOME/lib32) a bunch of symbolic links were still pointing to the location of the SRC environment I cloned from. Included in that list was the file "ldflags”.

The solution was to fix all of these broken symbolic links and relink. Relinking tho I hit errors:

ld: fatal: library -ljava: not found
ld: fatal: library -ljvm: not found
ld: fatal: File processing errors.

Luckily I stumbled upon Note: 367535.1, which pointed me to the file $ORACLE_HOME/sysman/lib/env_sysman.mk. Within that makefile JRE_LIB_DIR was pointing to the SRC environment I cloned from as well. I changed it to the correct location for this environment and executed the relink command again. This time it was successful.

So basically, FYI, that if you hit weird errors in a cloned environment, it could be the result of some invalid pointers that weren’t modified during Rapid Clone. If you know of a fix, or have a handy list of things to check, feel free to share. I’ll add this to my post clone checklist.

1 comment:

Atul Kumar said...

Nice post, I faced similar issue while configure em console and relinking executables on cloned environment here is complete post

http://onlineappsdba.com/index.php/2009/01/02/oem-dbconsole-startup-issues-on-10g-r2-database-for-11ir12