Linking native libraries in Win2K

Discussion in 'Java' started by Martin Pein, Oct 9, 2003.

  1. Martin Pein

    Martin Pein Guest

    Hi there,

    I'm trying to get some 3rd party "Kit" working and I'm struggling
    with a java.lang.UnsatisfiedLinkError.
    What I use is IBM's Visual Age 3.5.3 (JDK1.2.2) and the library in
    question is IBM's OnDemand 7.1.0.7.

    What I did was to copy all the DLLs and INIs etc. from the
    "IBM\OnDemand Web Enablement Kit" into my WINNT\system32 folder -
    where they should be found by any app, because it is listed in my
    PATH.
    However, I get an UnsatisfiedLinkError and I don't even know which
    library it is actually looking for, as the stack trace


    java.lang.UnsatisfiedLinkError
    java.lang.Throwable()
    java.lang.Error()
    java.lang.LinkageError()
    java.lang.UnsatisfiedLinkError()
    int com.ibm.edms.od.ArsWWWInterface.initialize(java.lang.String,
    int)
    int com.ibm.edms.od.ArsWWWInterface.initialize(java.lang.String,
    int)
    int com.ibm.edms.od.ArsWWWInterface.init(java.lang.String, int)
    void com.ibm.edms.od.ODServer.initialize(java.lang.String,
    java.lang.String)


    does not really help and I found when trying to catch this and dump
    the name of the library was "null".

    I somehow can't believe I'm the first one to struggle with this.
    Any help is greatly appreciated.

    Thanks,
    Martin
     
    Martin Pein, Oct 9, 2003
    #1
    1. Advertising

  2. On 9 Oct 2003 07:11:00 -0700, Martin Pein wrote:
    > However, I get an UnsatisfiedLinkError and I don't even know which
    > library it is actually looking for, as the stack trace
    >
    > java.lang.UnsatisfiedLinkError
    > java.lang.Throwable()
    > java.lang.Error()
    > java.lang.LinkageError()
    > java.lang.UnsatisfiedLinkError()
    > int com.ibm.edms.od.ArsWWWInterface.initialize(java.lang.String,
    > int)
    > int com.ibm.edms.od.ArsWWWInterface.initialize(java.lang.String,
    > int)
    > int com.ibm.edms.od.ArsWWWInterface.init(java.lang.String, int)
    > void com.ibm.edms.od.ODServer.initialize(java.lang.String,
    > java.lang.String)
    >
    > does not really help and I found when trying to catch this and dump
    > the name of the library was "null".


    That isn't the stack trace normally displayed when you fail to catch
    an UnsatisfiedLinkError, and as you say it doesn't really help. Did
    you hand type this, or somehow "process" the exception after catching
    it? In both cases: don't do that. The real stack trace is necessary to
    debug this.

    The real message would have said one of two things:

    java.lang.UnsatisfiedLinkError: no foo in java.library.path

    (meaning that "foo.dll" or "libfoo.so" couldn't be loaded)

    java.lang.UnsatisfiedLinkError: bar

    (meaning that method "bar" couldn't be found in the library)

    In other words, UnsatisfiedLinkError does not have to mean that the
    library itself couldn't be found. It could mean that a native method
    was missing from the library, possibly due to spelling or naming error
    in the code, or a version mismatch between class and library.

    /gordon

    --
    [ do not email me copies of your followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
     
    Gordon Beaton, Oct 9, 2003
    #2
    1. Advertising

  3. Martin Pein

    Martin Pein Guest

    Hi Gordon,

    > In other words, UnsatisfiedLinkError does not have to mean that the
    > library itself couldn't be found. It could mean that a native method
    > was missing from the library, possibly due to spelling or naming error
    > in the code, or a version mismatch between class and library.


    the thing I'm trying to get to run comes as Java layer on top of some
    native libraries.
    Both components have the same version number and come from the same
    source. So I guess it won't be a version conflict or misspelling -
    'though you never know and that was also my first guess.
    However, at the moment it looks to me like the exception gets thrown,
    caught and re-thrown within that java layer. And what I've pasted into
    my previous post is what gets handed over to my code.

    Thanks for your help,

    Martin
     
    Martin Pein, Oct 10, 2003
    #3
  4. Martin Pein

    Jeff Gitlin Guest

    I put arswwwsl.dll in the folder
    C:\Program Files\IBM\VisualAge for Java\ide\program

    (Martin Pein) wrote in message news:<>...
    > Hi there,
    >
    > I'm trying to get some 3rd party "Kit" working and I'm struggling
    > with a java.lang.UnsatisfiedLinkError.
    > What I use is IBM's Visual Age 3.5.3 (JDK1.2.2) and the library in
    > question is IBM's OnDemand 7.1.0.7.
    >
    > What I did was to copy all the DLLs and INIs etc. from the
    > "IBM\OnDemand Web Enablement Kit" into my WINNT\system32 folder -
    > where they should be found by any app, because it is listed in my
    > PATH.
    > However, I get an UnsatisfiedLinkError and I don't even know which
    > library it is actually looking for, as the stack trace
    >
    >
    > java.lang.UnsatisfiedLinkError
    > java.lang.Throwable()
    > java.lang.Error()
    > java.lang.LinkageError()
    > java.lang.UnsatisfiedLinkError()
    > int com.ibm.edms.od.ArsWWWInterface.initialize(java.lang.String,
    > int)
    > int com.ibm.edms.od.ArsWWWInterface.initialize(java.lang.String,
    > int)
    > int com.ibm.edms.od.ArsWWWInterface.init(java.lang.String, int)
    > void com.ibm.edms.od.ODServer.initialize(java.lang.String,
    > java.lang.String)
    >
    >
    > does not really help and I found when trying to catch this and dump
    > the name of the library was "null".
    >
    > I somehow can't believe I'm the first one to struggle with this.
    > Any help is greatly appreciated.
    >
    > Thanks,
    > Martin
     
    Jeff Gitlin, Oct 13, 2003
    #4
  5. Martin Pein

    Martin Pein Guest

    > I put arswwwsl.dll in the folder
    > C:\Program Files\IBM\VisualAge for Java\ide\program


    Today I deleted all my "ars*.*" files and reinstalled OnDemad and it
    turned out to be a version conflict between the Java layer and the
    OnDemand DLLs - due to an earlier installation on my machine.
    After my "clean install" it now works with the DLLs in "system32".

    Sorry for bothering everybody

    Thanks for your help
    - Martin
     
    Martin Pein, Oct 14, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Hunsley
    Replies:
    4
    Views:
    897
    Alex Hunsley
    Nov 14, 2003
  2. Replies:
    0
    Views:
    347
  3. Replies:
    16
    Views:
    1,022
    Chris Uppal
    Apr 6, 2006
  4. Replies:
    0
    Views:
    1,058
  5. Indigo Casson

    "Statically linking" native extensions.

    Indigo Casson, May 26, 2010, in forum: Ruby
    Replies:
    0
    Views:
    90
    Indigo Casson
    May 26, 2010
Loading...

Share This Page