System.LoadLibrary + dlopen -- callback causes unresolved symbol

Hi guys,
I am currently trying to use the API
System.loadLibrary(String name)in order to dynamically link shared libaries to SOLARIS JVM.
I am facing some unresolved symbol at run-time .
I load a shared library libhello1 (using system.LoadLibary)
and I call from this lib (via JNI interface) a method which
loads a second library libhello2(using dlopen) and invokes hello2().
hello2 will call back a method hello_bug which is implemented in libhello1.
There is the a mutual or cyclic dependence. This dependance is correctly handled if I link the libhello1 to a standard C implemented executable.
But if I load libHello1 via System.Load, the second lib is correctly loaded but the call back is not possible due to unresolved symbol.
It seems like the symbols are not kept in this case(or the dlopen creates a different thread?...)
The workaround to fix the issue is to link explicitely libHello1 to libHello2 when building libHello2.
I don't know if this is clear to everyone so
I have reproduced this on a very simple case.
Basicaly, I have implemented in standard C language 2 shared libraries:
libHelloModule1.so, libHelloModule2.so
one standard executable and one java interface to call the method
Below is the full code for reproduce:
hello1.h:
#include <dlfcn.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <jni.h>
#include "hello_jni.h" [u]//automatically generated by javah -- ref Makefile[/u]
extern "C"  void hello_bug();
hello1.cc :#include "hello1.h"
extern "C" {
JNIEXPORT void JNICALL Java_com_helloworld_Hello_ShowMessage
  (JNIEnv *, jobject, jstring){
void *handle;
const  char *error;
void  (*init) (void);
printf(" load Hello2 \n");
handle = dlopen ("libHelloModule2.so", RTLD_LAZY);
printf (" lib Hello2 onload.. \n");
error = dlerror();
if (!handle) {
      printf ("lib HelloModule2 not loaded correctly %s \n", error);
      exit(1);
   dlerror();
   init =(void(*)())  dlsym(handle, "hello2");
  error = dlerror();
        if(error)
                fprintf(stderr, "Could not find print_hello(): %s\n",
error);
                exit(1);
(*init)();
    dlclose(handle);
void hello_bug()
printf ("Hello bug correctly  invoked : CQFD\n");
}// extern "C"
hello2.cc
#include "hello1.h"
typedef void  ( *PF1) (char *, char *);
extern "C" {
void hello2(){
printf ("Hello2 : ping Hello1\n");
/*simple call work in c not via JNI*/
hello_bug();
Hello.java :
package com.helloworld;
import java.util.*;
import java.io.*;
public class Hello  {
  private native void ShowMessage(String msg);
  public void initialized() {
            System.out.println(" ShowMessage - called");
  try {
          ShowMessage("Generated with JNI");
       } catch (Exception e ) {
            e.printStackTrace();         }
  public Hello(){
  System.loadLibrary("HelloModule1");
            System.out.println(" HelloModule1 loaded");
TestLocal.java :
import java.util.*;
import java.io.*;
import com.helloworld.Hello;
public class TestLocal{
public TestLocal(){
        System.out.println("test local");
public static void main(String[] args) {
        TestLocal test_local = new TestLocal();
        Hello test = new Hello();
        test.initialized();
}THE MOST IMPORTANT IS IN THE MAKEFILE:
Makefile :all: Hello.jar hello_jni.h libHelloModule1.so libHelloModule2.so TestLocal.class dummy
Hello.jar: com/helloworld/Hello.class
jar cvf $@  com/helloworld
com/helloworld/Hello.class: Hello.java
$(JAVAC)  -d . Hello.java
hello_jni.h: Hello.jar
$(JAVAH) -jni -o $@ -classpath ./Hello.jar com.helloworld.Hello
libHelloModule1.so : hello_jni.h hello1.o  
gcc  -G  -o $@ hello1.o -lstdc++
libHelloModule2.so : hello2.o
gcc   -G  -o $@ hello2.o -Wl -lstdc++  -L. -lHelloModule1   [u] # -->CASE  1 :THIS WORKS [/u]
gcc   -G  -o $@ hello2.o -Wl -lstdc++ [u] #-->CASE 2 :THIS  DOES NOT WORK[/u]
dummy : dummy_main.o
gcc  -o $@ dummy_main.o -L. -lHelloModule1 -L/usr/local/lib -lstdc++
hello2.o : hello2.cc
gcc -I. -O -c  hello2.cc
hello1.o : hello1.cc
gcc -I. -O -c  hello1.cc
TestLocal.class : TestLocal.java
$(JAVAC) -classpath  . -d . TestLocal.java
dummy_main.o :  dummy_main.cc
gcc -I. -O -c  dummy_main.cc
clean:
rm -rf com *.o *.so *.class *.jar hello_jni.h dummyCASE 1 : libHelloModule1.so is explicitely linked to libHelloModule2
myhost % dummy
load Hello2
lib Hello2 onload..
Hello2 : ping Hello1
Hello bug correctly invoked : CQFD
myhost % java -cp . TestLocal
test local
HelloModule1 loaded
ShowMessage - called
load Hello2
lib Hello2 onload..
Hello2 : ping Hello1
Hello bug correctly invoked : CQFD
CASE 2 : libHelloModule1.so is not explicitely linked to libHelloModule2
myhost % dummy
load Hello2
lib Hello2 onload..
Hello2 : ping Hello1
Hello bug correctly invoked : CQFD
myhost % java -cp . TestLocal
test local
HelloModule1 loaded
ShowMessage - called
load Hello2
lib Hello2 onload..
lib HelloModule2 not loaded correctly ld.so.1: java: fatal: relocation error: file ./libHelloModule2.so: symbol hello_bug: referenced symbol not found
My concern is to have this working in CASE1 with the JNI interface the same way it does in standard C built runtime.
So does any have encountered this?
Is there something I missed somewhere?
Thanks lot for your help
Youss

Hi,
I have implemented JNative which seems to be close to your problem.
It works under Windows and Linux, and loads libraries via dlopen and dlsym.
You can have a look at it's implementation at http://jnative.cvs.sourceforge.net/jnative/JNativeCpp/
Don't forget to load your libraries before trying to call them with System.load("/path/to/your/lib.so"); if they are not referenced by LD_LIBRARY_PATH.
This post may be false since I know nothing about Solaris. Perhaps JNative may be ported under Solaris ?
--Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Unresolved symbols while linking

    Hello all,
    I'm toying around with oo4o and I'm having a linking problem. I'm working in VS.NET 2003.
    I added the directories for headers, excutables, libraries, etc. At first I had 9 unresolved symbol errors, but I got it down to 2 by remembering to link with oraclm32.lib (debug copy). Not sure why those 2 errors are still there. My test function is basically the first sample in the Help docs, something like this:
         OStartup();
         ODatabase odb("ora9", "username", "passwd");
         ODynaset odyn(odb, "select * from emp");
         double salary;
         while (!odyn.IsEOF())
         odyn.GetFieldValue("sal", &salary);
    odyn.MoveNext();
         OShutdown();
    The relevant parts of the buildlog. Once I added the additional command line option to link with oraclm32, everything resolved except references to OStartup and OShutdown. Seems odd. Any ideas?
    Buildlog:
    Searching libraries
    Searching C:\oracle\ora92\oo4o\CPP\LIB\oraclm32.lib:
    Found "__declspec(dllimport) public: virtual __thiscall ODatabase::~ODatabase(void)" (__imp_??1ODatabase@@UAE@XZ)
    Referenced in Dataconnect.obj
    Loaded oraclm32.lib(ORACLM32.dll)
    Found "__declspec(dllimport) public: virtual __thiscall ODynaset::~ODynaset(void)" (__imp_??1ODynaset@@UAE@XZ)
    Referenced in Dataconnect.obj
    Loaded oraclm32.lib(ORACLM32.dll)
    Found "__declspec(dllimport) public: int __thiscall ODynaset::MoveNext(int)" (__imp_?MoveNext@ODynaset@@QAEHH@Z)
    Referenced in Dataconnect.obj
    Loaded oraclm32.lib(ORACLM32.dll)
    Found "__declspec(dllimport) public: int __thiscall ODynaset::GetFieldValue(char const *,double *)const " (__imp_?GetFieldValue@ODynaset@@QBEHPBDPAN@Z)
    Referenced in Dataconnect.obj
    Loaded oraclm32.lib(ORACLM32.dll)
    Found "__declspec(dllimport) public: int __thiscall ODynaset::IsEOF(void)const " (__imp_?IsEOF@ODynaset@@QBEHXZ)
    Referenced in Dataconnect.obj
    Loaded oraclm32.lib(ORACLM32.dll)
    Found "__declspec(dllimport) public: __thiscall ODynaset::ODynaset(class ODatabase const &,char const *,long,class OSnapshotID *)" (__imp_??0ODynaset@@QAE@ABVODatabase@@PBDJPAVOSnapshotID@@@Z)
    Referenced in Dataconnect.obj
    Loaded oraclm32.lib(ORACLM32.dll)
    Found "__declspec(dllimport) public: __thiscall ODatabase::ODatabase(char const *,char const *,char const *,long)" (__imp_??0ODatabase@@QAE@PBD00J@Z)
    Referenced in Dataconnect.obj
    Loaded oraclm32.lib(ORACLM32.dll)
    SNIP
    Dataconnect.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __fastcall OShutdown(void)" (__imp_?OShutdown@@YIXXZ) referenced in function "long __fastcall PostData(char *)" (?PostData@@YIJPAD@Z)
    Dataconnect.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __fastcall OStartup(int)" (__imp_?OStartup@@YIHH@Z) referenced in function "long __fastcall PostData(char *)" (?PostData@@YIJPAD@Z)

    Hi Guys,
    I got this error too recently. Was troubling me a lot. I was using Windows 7 OS, Visual Studio 2010 compiler.
    The fix for this is pretty much straight forward and solution lies in the Project settings only.
    To my knowledge, with /MDd switch, it causes the compiler to place the library name MSVCRTD.lib into the .obj file.
    But with /MTd switch, This option just causes the compiler to place the library name LIBCMTD.lib into the .obj file so that the linker will use LIBCMTD.lib to resolve external symbols. For details, please refer to this MSDN article:
    https://msdn.microsoft.com/en-us/library/2kzt1wy3(VS.71).aspx
    Its very useful.
    Also
    MDd stands for Multi-threaded Debug DLL
    MTd stands for Multi-threaded Debug
    Thanks,
    Kiran

  • System.loadLibrary in a package ?

    is it possible to call the System.loadLibrarymethod from a class that is in a package?
    when I tried to do the load from within the package, the librray was found, nut the functions in it weren't recognized.
    but when I removed the class from the package, it worked fine.
    my question: is it possible to return the class (with the System.loadLibrary method) back into the package?
    tnx

    tnx, but I'm not mixed upYes you are.
    Where you call loadLibrary does not matter. It does the same thing regardless of where you call it.
    >
    >
    any idea, how to solve this?
    Your problem is because the method signatures do not match.
    As suggested the most likely reason is because you did not regen and modify when the package changed. Next most likely reason is because you used javah incorrectly or you manually modified something in the signature that should not have.
    Lastly if you are using class loaders, it is possible that that could cause a problem (I haven't confirmed this however, and I consider it unlikely.)

  • System.loadLibrary() conflict beetwen C++ and GCC

    Hallow.
    When I try to compilate a C library that uses a C++ class with the GCC (GNU) compiler it doens't recognize the class. ok!
    But, when I complile the same C library using the C++ (GNU) compiler, the 'System.loadLibrary()' does not find the library.
    What should I do?

    The symbols that are generated for C and C++ will be different because of name mangling that occurs for C++ symbols. System.loadLibrary will give an error because it will not find the symbol it expected to find. In the header file for the C library, can you try putting in the following lines :
    Before all the function definitions :
    #ifdef __cplusplus
    extern "C" {
    #endif
    After the function definitions :
    #ifdef __cplusplus
    #endif
    This will force the g++ compiler to not mangle the names of the C functions.
    hth
    rahul

  • How to Load 2 library files using System.loadLibrary in one .java file!!!

    Hello,
    Someone please help me. What I am trying to do is load two .DLL files in my program. Program works fine when I
    do the following way i.e. I have two .java files and in each I am loading one .DLL file. But I don't want to have
    two .java files I want to load both the .DLL files in one program.
    **************** Example.java **********
    import java.io.*;
    import java.util.*;
    public class Example
    public native int A(String in);
    static
    System.loadLibrary( "API2" );
    public static void main( String args[])
         Ex ex = new Ex();
         int r;
         r = ex.A("TEST");
    public Example()
    *****************Ex.java*****************
    public class exsysml
    public native int A(String in);
    public exsysml()
    System.loadLibrary("API3");
    The above way works. But I need only one .java file to load both the .DLL files. i.e.
    import java.io.*;
    import java.util.*;
    public class Example
    public native int A(String in);
    static
    System.loadLibrary( "API2" );
    System.loadLibrary( "API3" );     
    public static void main( String args[])
         Example ex = new Example();
         int r;
         r = ex.A("TEST");
    public Example()
    but when I do this way it doesn't work and I get a UnSatisfiedLinkage Error at ex.A("TEST"). While doing the top way it works.
    How can I fix this to just have one .java file and load both the library files as done in the bottom program but doing this program doesn't work. Any help is appreciated.
    Thanks!

    what I figured out so far is that we can only load one library file in a single class and define all the native methods present in that library in the class where we are loading it. Means we can't load multiple library files in a single class. It's just my thought else if someone provides a better solution. I may be wrong so that's why I need your help.
    Thanks

  • XmlSaveDom unresolved symbol, and special characters in output...

    I have a couple of issues with XmlSaveDom() that I'm hoping someone can help with...
    Firstly, under windows I'm having difficulty locating the library that it lives in. I'm linking to:
    oraxml10.lib (from the 10.1.0.2 XDK, the latest version I can find) and oci.lib (from the 10.2 client)...but getting an unresolved symbol on XMLSaveDom().
    I'm using the XDK because under windows I only have a client install which does not appear to have any of the XML headers or libraries in it. I'm using
    10.1.0.2 because it's the latest version I can find to download from technet.
    Secondly, under Solaris I'm just linking to libclntsh.so from 10.1.0.2 server home, and this resolves XMLSaveDom() ok. However when I use XMLSaveDom() I find unusual special characters in the output periodically:
    ÿ¾Ý <SOME_TAG>some_value</SOME_TAG>
    The strange character sequence is always the same.
    Any help with either of these would be greatly appreciated.

    The DOM is not required to escape the characters, so it is correct that you get the literal ampersand characters when you ask the DOM for a getNodeValue().
    When an XML document is serialized -- using, for example, the XMLDocument.print() method -- it is when this external form of the document is produced that escaping occurs.
    You can always call XMLNode.print() to serialize the value of a node and it's children into a PrintWriter that wraps a StringWriter to get the string equivalent of the properly escaped values.

  • System.loadLibrary works in 1.3.1 but not in 1.2.2

    I Have a basic hello world application on Sun Solaris 7 that calls C++ from Java using JNI.
    The code works well on 1.3.1, but when I recompile it under 1.2.2 and run I get the following exception when I call System.loadLibrary to load my shared library:
    java.lang.UnsatisfiedLinkError: no MyLib in java.library.path
    My LD_LIBRARY_PATH is set correctly since it worked under 1.3.1.
    Just in case, I used the following code to get and set the java.library.path to no avail.
    // Check System properties
    String strLibPath = System.getProperty("java.library.path");
    System.out.println("The Lib Path before set == " + strLibPath);
    StringBuffer strLibPathBuffer = new StringBuffer("/u/kbonacc/mypath:");
    strLibPathBuffer.append(strLibPath);
    System.setProperty("java.library.path", strLibPathBuffer.toString());
    strLibPath = System.getProperty("java.library.path");
    System.out.println("The Lib Path after set == " + strLibPath);
    Are there any differences between 1.3.1 and 1.2.2 in this respect?
    Thanks,
    -- Ken

    In the bug parade I've heard excuses from Sun programmers that this is a read-only property and isn't supposed to be changed. It probably took them longer to write the reply to the bug than it would have to fix the code.
    I looked at the source code for the ClassLoader and for the source release of the JDK 1.3.1 and here's the code I found in the ClassLoader.loadLibrary() method:
            if (sys_paths == null) {
                    usr_paths = initializePath("java.library.path");
                    sys_paths = initializePath("sun.boot.library.path");
            }It seems it parses and caches the system and user library paths on startup and then never bothers to check them to see if they've changed ever again. I think it would be pretty simple to rewrite that code block by moving one line of code down two lines as this:
            if (sys_paths == null) {
                    sys_paths = initializePath("sun.boot.library.path");
            usr_paths = initializePath("java.library.path");I mean, it's not as if loadLibrary is really performance intensive or even critical enough to bother caching at all!
    This one code change could fix a lot of headaches.
    The particular headache I'm working on is that there doesn't seem to be any support in the Servlet 2.2 or 2.3 specification for JNI files. I'd really love to be able to use a directory like WEB-INF\jni to store libraries that need to be distributed with my web application. I tried to dynamically change java.library.path to include WEB-INF\jni, but alas I ran into the same problem you did, it doesn't work.
    Is is possible for this to be fixed, ever? I think it would take longer to say no and make up a reason why not then it would to actually make the fix... seems a good enough arguement to do it to me.
    And alternately, can we come up with a standard place to put JNI stuff for web applications in the next Servlet standards?
    Thanks in advance!
    -J.C.
    [email protected]

  • JNI System.loadLibrary troubles

    Hello again!
    I am so close to finishing this program I can taste it! But�
    OK, I am doing a bit of JNI. All appears to be well except my program can�t seem to use
    System.loadLibrary("myCPPdll");
    to find the dll file I need to run the C++ code.
    I�ve tired replacement with
    Runtime.getRuntime().loadLibrary("myCPPdll ");
    just for grins with the same result.
    I also tried
    System.loadLibrary("C:/fullPath/myCPPdll");
    with no luck.
    The error message I get, regardless if I run from the command line or via Eclipse is
    java.lang.UnsatisfiedLinkError: no myCPPdll in java.library.path.
    Possibly related: when I use the tutorial form
         Static
    System.loadLibrary("myCPPdll");
    my compiler tells me it can�t find the main. Just how critical is it to have it in this static format? It compiles great without the System call embedded in the static{} block!
    Thanks for your time!

    I added the .dll and get the same error. It was my
    understanding that System.loadLibrary(fileName)
    automatically added the file to the library path for
    the individual program in question. If this is not
    the case, could you please elaborate a bit on adding
    it to the path?
    No, in effect it searches the path to find the dll library. You need to (re-)read the tutorial -
    http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/step5.html

  • Unresolved symbol: U_get_previous_frame_x in intermedia

    Hi All
    I am getting the following error while running a test command "exec ctx_output.start_log('log')"
    /usr/lib/dld.sl: Unresolved symbol: U_get_previous_frame_x (code) from /opt/ims
    /oracle/product/RDBMS/8.1.5/ctx/lib/libctxx8.sl
    /usr/lib/dld.sl: Unresolved symbol: U_get_frame_info (code) from /opt/ims/oracl
    e/product/RDBMS/8.1.5/ctx/lib/libctxx8.sl
    BEGIN ctx_output.start_log('log'); END;
    ERROR at line 1:
    ORA-20000: ConText error:
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: Unresolved external
    ORA-06512: at "CTXSYS.DRUE", line 122
    ORA-06512: at "CTXSYS.CTX_OUTPUT", line 39
    ORA-06512: at line 1.
    Can some body help me on this please.....
    This is very urgent.
    Regards
    UDay
    null

    Hi Tofubug,
    Since I'm not familiar about C#, however, if want to run powershell script in C#, the script below may be helpful for you:
    RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create();
    Runspace runspace = RunspaceFactory.CreateRunspace(runspaceConfiguration);
    runspace.Open();
    RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace);
    Pipeline pipeline = runspace.CreatePipeline();
    //Here's how you add a new script with arguments
    Command myCommand = new Command(scriptfile);
    CommandParameter testParam = new CommandParameter("key","value");
    myCommand.Parameters.Add(testParam);
    pipeline.Commands.Add(myCommand);
    // Execute PowerShell script
    results = pipeline.Invoke();
    And these threads for your reference:
    Execute PowerShell Script from C# with Commandline Arguments
    How to run PowerShell scripts from C#
    How do you set FullLanguage mode
    for remote PowerShell from C#?
    If I have any misunderstanding, please feel free to let me know.
    Best Regards,
    Anna Wang

  • Unresolved symbol : OCIEnvCreate (code)  from libocci.sl.10.1

    I'm getting a core dump, with the error message "Unresolved symbol : OCIEnvCreate (code) from libocci.sl.10.1", when I try to execute a simple OCCI code that connects to the database and performs some SQL queries. It is occuring at the following line :
    Environment *env = Environment::createEnvironment(Environment::DEFAULT);
    I'm using oracle 9i (Ver 9.2.0.6.0) on HP-UX (Ver 11),
    I'm using Oracle Instant Client for HP-UX PA-RISC (32-bit) (Version 10.2.0.2) libraries for OCCI.
    Can anyone help me out?

    I'm using aCC compiler, and doing dynamic linking..I've specified the directory path of the .sl files of the instant client in SHLIB_PATH, do I need to specify the path in ORACLE_HOME, or some other env variable??
    Can you tell me steps that I should follow while compiling, linking & execute the code?

  • Dlopen failed, Unsatisfied data symbol ''[Vtable_Q2_3std12out_of_range]key

    After compiling and linking a shared library on HPUX that uses the OCI, attempts to load that shared library fail with the error:
    dlopen failed, Unsatisfied data symbol ''[Vtable_Q2_3std12out_of_range]key:''
    in load module ''/usr/lib/oracle/10.2.0.4/client64/lib/libocci.sl.10.1''.; Filename: MySharedLibrary.sl'
    The same code compiled and linked on other platforms (Solaris, Linux, AIX) runs OK.
    On the surface, it looks like there's a symbol referenced in libocci.sl that isn't found in any of the other Oracle library files, but comparing the /usr/liboracle/10.2.0.4/client64/lib directories on the other platforms that work don't show any different files.
    Any ideas?
    Regards,
    Bill Erickson

  • Jni library loaded by System.load fails on later call to System.loadLibrary

    I'm attempting to use jnotify to listen for directory modifications. This requires using jni to dynamically link to a c library. I have gotten everything to work successfully if I put the library on the java.library.path. However, I would prefer to let my application specify the full path to the jnotify library. My understanding is that I should be able to do a System.load("/foo/libjnotify.so") in a static block and then subsequent calls to System.loadLibrary("jnotify") should do nothing as the library is already loaded. However I am getting a 'Exception in thread "main" java.lang.UnsatisfiedLinkError: no jnotify in java.library.path'. Am I misunderstanding the correct usage of these System calls?

    Joe wrote:
    That makes sense.
    The System.loadLibrary portion is in a 3rd party library which I am legally not allowed to change.
    Are there any other possible ways to accomplish the loading without the library being on the java.library.path?
    You have two problems - not one.
    The library itself is calling loadLibrary(). The standard idiom is that one does that in a static block. If a static block throws an exception, any exception, then the class will not load.
    Presumably the library is not checking for a duplicate library load. So your problem is that that loadLibrary() call must not throw an exception.
    Thus you cannot preload the library.
    Far as I can see you have the following options.
    - Put it on the path.
    - Create a jave exec handler (via Runtime.exec or jni), put the library on that path before you start another VM which does the real work.
    - Modify the java API loadLibrary() call so it catches the dup exception, that of course requires a boot option.

  • Cannot load sharedfile.so by System.LoadLibrary() in a remote machine

    Hi, I am facing a weired problem. I have written a very simple java native interface program that works fine in my computer. But when I
    ssh to another machine and run the same code there..
    class TestJni
         static
         try
         System.loadLibrary( "test" );
         catch( UnsatisfiedLinkError e )
         * System.out.println("Could not load native code for user authentication." ); *
         System.exit(1);
         public static void main( String [] args )
    public static native int sum( int x, int y );
    The output is: Could not load native code for user authentication.. which means the catch block has executed and the program is not being able to
    load the shared library. To run the code I am doing something like this:
    LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH java TestJni
    this works fine in my pc... but is there any limitation in running the code remotely.. this does not make any sense though...

    It's a bug, fixed in TT 7.0.4.

  • System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError:

    Hello,
    I have a problem about jDriver
    the configuration is:
    solaris 8
    WLS 6.1 sp2
    Oracle9i 9.0.1
    jDriver oci 901_8
    (Weblogic server and Oracle db in same machine)
    I follow the "Installing WebLogic jDriver for Oracle" setting from BEA online
    documantation.
    but I got some error and exception as follow:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError:
    /export/home/bea/wlserver6.1/lib/solaris/oci901_8/libweblogicoci37.so: ld.so.1:
    /export/home/bea/jdk131/jre/bin/../bin/sparc/native_threads/java: ?P?R??: /usr/local/oracle/OraHome1/lib/libclntsh.so.9.0:
    ???~?? ELF ??§O?G ELFCLASS64
         at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
         at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
    somebody can give me a hang,thanks!!!
    -Winson

    You need to have /export/home/bea/wlserver6.1/lib/solaris/oci901_8 in your LD_LIBRARY_PATH env variable so that the library
    can be found and loaded dynamically. Check the startWebLogic.sh script for an example and make sure that it is getting set
    appropriately when you start the server.
    Bill
    Winson Lee wrote:
    Hello,
    I have a problem about jDriver
    the configuration is:
    solaris 8
    WLS 6.1 sp2
    Oracle9i 9.0.1
    jDriver oci 901_8
    (Weblogic server and Oracle db in same machine)
    I follow the "Installing WebLogic jDriver for Oracle" setting from BEA online
    documantation.
    but I got some error and exception as follow:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError:
    /export/home/bea/wlserver6.1/lib/solaris/oci901_8/libweblogicoci37.so: ld.so.1:
    /export/home/bea/jdk131/jre/bin/../bin/sparc/native_threads/java: ?P?R??: /usr/local/oracle/OraHome1/lib/libclntsh.so.9.0:
    ???~?? ELF ??§O?G ELFCLASS64
    at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
    at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
    somebody can give me a hang,thanks!!!
    -Winson

  • "specified handle or index is not valid" on System.loadLibrary

    Hi,
    I have a WAS 6.40 installation on HPUX 11i. I am using a native method in one of the login modules I have made, but am getting the following error (stack trace shown below):
    [Jan 11, 2005 11:33:27 AM - 10 - Err] java.lang.UnsatisfiedLinkError: /usr/lib/libJDecrypt.sl: specified handle or index is not valid.
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 0: java.lang.ClassLoader$NativeLibrary.load(Native Method)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 1: java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1611)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 2: java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 3: java.lang.Runtime.loadLibrary0(Runtime.java:795)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 4: java.lang.System.loadLibrary(System.java:834)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 5: com.netegrity.siteminder.sap.webas.util.JavaDecrypt.<clinit>(JavaDecrypt.java:56)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 6: com.netegrity.siteminder.sap.webas.jaas.SiteMinderLoginModule.<clinit>(SiteMinderLoginModule.java:146)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 7: sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 8: sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 9: sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 10: java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 11: java.lang.Class.newInstance0(Class.java:308)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 12: java.lang.Class.newInstance(Class.java:261)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 13: com.sap.engine.services.security.login.LoginContextFactory.initializeLoginContext(LoginContextFactory.java:160)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 14: com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:127)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 15: com.sap.engine.services.servlets_jsp.server.runtime.context.SessionServletContext.doLogin(SessionServletContext.java:619)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 16: com.sap.engine.services.servlets_jsp.server.runtime.context.SessionServletContext.checkUser(SessionServletContext.java:294)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 17: com.sap.engine.services.servlets_jsp.server.runtime.context.ApplicationContext.checkMap(ApplicationContext.java:403)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 18: com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.checkRequest(HttpHandlerImpl.java:67)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 19: com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:780)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 20: com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 21: com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 22: com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 23: com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 24: com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 25: com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 26: java.security.AccessController.doPrivileged(Native Method)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 27: com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
    [Jan 11, 2005 11:33:27 AM - 10 - Err] 28: com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Strangely when I try to load the .sl library from a test application outside WAS it loads perfectly. Have tested a similar DLL on a WAS setup on Windows. It works fine there.
    regards,
    Vishal

    Hi Markus,
    Thanks for pointing out the problem. I was suspecting the same too.
    Unfortunately we are also using some third party libraries, which happen to be 32-bit. Would need a workaround somehow.
    Could you mention the location from where u got the info regarding PAM on HPUX? As in where is it documented etc.?
    regards,
    Vishal

Maybe you are looking for

  • Can not see wireless TM in disk utility or desktop.

    Am I running a TM Airport (router) it runs great, I love everything about it and the backups have no issues. But I wanted to partition my 500mb drive on my TM yet for some reason I can not see the drive either on my desktop or in disk utility. Is the

  • ALE Serialization on the basis of Data Value

    Dear All , I have a query related to scheduling of Inbound IDOC . I am using a scenario Legacy system to SAP using ALE layer communication . For Goods movement IDOC WPUWBW01 I am having 7 or 8 files and each files are posting one IDOC in SAP . Now si

  • Satellite Pro 6100, WXP installing SP2, after stand-by mode the USB is unknown

    Hi, after installing the update SP2 for Win XP on my notebook Toshiba Sat. Pro 6100, the following happens: when the notebook awakes from the stand-by mode, the USB connector is unknown and the communication is lost. Who knows the answer for this pro

  • Apple TV won't reboot

    I have a constant flashing amber light on my ATV. I have tried a restart and I have been able to run diagnostics and it says the ATV is fine but then I only get the option to restart or reset to factory settings. Having tried the restart as I don't p

  • How to use XMHTTP in jsp

    Hello, can any body tell me how to use the XMHTTP in jsp programming are servlet..what i know is XMLHTTP used in with java script functions..for connecting to servers without refrshing the page.can we use directly in jsp page.if so which APIs we have