cancel
Showing results for 
Search instead for 
Did you mean: 

JNI Library can only be called once from statefull session bean

Former Member
0 Kudos

Hello,

I have deployed a stateful session bean, that call a C++ Library. The library path is added to LD_LIBRARY_PATH, and the first time I call this method, it works just fine, but if I try to recall the same method again, I received a java.lang.UnsatisfiedLinkError.

I tried to redeploy the app, but nothing. It's only if I restart the application Server, that the first call succeed.

Have any of you seen this behavior before ?

Regards.

Thierry

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi friends,

i'am developing one application that use a Visual Basic library a dll, i need to know how you are accessing to libraries. For example:

I have a simple Java Project in Eclipse, and my calling to the DLL Method runs ok.. . But when i put this code in a WebDynpro, doesn´t runs...

Can anybody help me or explain me. what are you doing ?

Thnsk

Former Member
0 Kudos

Hi Friends,

I am facing the same problem.

Can you help me by explaining how to use .dll in webdynpro java.

Regards,

Pooja

Former Member
0 Kudos

Hello,

Thank you!

I guess that my problem was indeed that my library might be loaded more than once, in 2 places.

Regards.

Thierry

Former Member
0 Kudos

Hello,

had the same problem with self developed jni library. the problem i had was that the libray got loaded every time i called a method (causing a unsatisfiedLinkError when calling the method more than once).

maybe your are loading your library every time you use the bean with system.loadlibrary? loading the library once could be achieved inside a static constructor for example

regards franz

guru_subramanianb
Active Contributor
0 Kudos

Hi Thierry,

Check your classpath I think it is not being set.

Also try to give your class path in the environment variable in your system settings.

regards,

guru