Linking native libraries in Win2K

M

Martin Pein

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
 
G

Gordon Beaton

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
 
M

Martin Pein

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
 
J

Jeff Gitlin

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

Martin Pein

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top