-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dennis,
On 7/5/2010 3:35 AM, dennis ch wrote:
modelJNI.java
===
public final static native void initModel();
native code
=
#include HEC.h
#include vector
#include string
[snip]
void initModel() {
You can't use JNI like
Hi Chris,
Thanks for your reply. I recompiled everything and checked method
signature, but still got the same error. I felt it's weird why it worked
for standalone app but not deployed web service... Thanks.
model.java
public static void initModel() {
modelJNI.initModel();
}
=mediacomcc@tomcat.apache.org[users-return-214329-racarlson=
mediacomcc@tomcat.apache.org] On Behalf Of Shay Rojansky [
r...@roji.org]
Sent: Saturday, July 03, 2010 12:40 AM
To: Tomcat Users List
Subject: Re: JNI error under tomcat: java.lang.UnsatisfiedLinkError
Hi Dennis.
So do you
Hi Shay,
Thanks for your input. And yes, I did see the Load library successful
message. I've also fixed the code with static { } block. However, I still
received the same error message. Any other thoughts?
Thanks,
Dennis
2010/7/2 Shay Rojansky r...@roji.org
Hi Dennis.
So do you see the
2010/7/2 dennis ch dennis.ch2...@gmail.com:
Do I miss anything here? Any input is appreciated!
IIRC, native libraries can be loaded only once,
but webapplication classloader is disposed and recreated each time the
web application is stopped/reloaded. Thus the class that loads your
library must
Had You tried to made c header by javah -jni
./your_packages/your_class.class ?
It gives header for You with properly named method to be written in c..
On Mon, Jul 5, 2010 at 4:11 PM, Konstantin Kolinko
knst.koli...@gmail.comwrote:
2010/7/2 dennis ch dennis.ch2...@gmail.com:
Do I miss
] On Behalf Of
Shay Rojansky [r...@roji.org]
Sent: Saturday, July 03, 2010 12:40 AM
To: Tomcat Users List
Subject: Re: JNI error under tomcat: java.lang.UnsatisfiedLinkError
Hi Dennis.
So do you see the Load library successful message?
Also, if I remember correctly, the code in eval.java is not a safe way
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dennis,
On 7/2/2010 3:46 AM, dennis ch wrote:
However, when I deploy it as a web service (tomcat 6.0.26 + axis2 1.5.1 +
eclipse jee helios) to call the native method, I got the following error
(the first line means the .so was successfully
Hi,
I have a java class (eval.java) that invokes a native method in an so file
(libmodel.so, using SWIG 1.3.29 to generate JNI code/wrapper and compiled
the library). I can use System.loadLibrary() to load the libmodel.so without
any error (-Djava.library.path=/usr/lib), and the native method
Hi Dennis.
So do you see the Load library successful message?
Also, if I remember correctly, the code in eval.java is not a safe way to
load a native library. It's a very good idea to place the System.loadLibrary
in a static { } block, instead of in a method. The way your class is
written, it's
10 matches
Mail list logo