cancel
Showing results for 
Search instead for 
Did you mean: 

Dispatcher crashes while using JNI .

Former Member
0 Kudos

Hi Members,

We are working on a webdynpro - java based development on SAP WAS 640.

we have to call some C library functions. We are using JNI to access the C library functions. We have created a jar file containing a class with a method that loads the C library (lib.so) in a static block and calls the native C functions using JNI.

We included the jar in the classpath of the j2ee server.

We added the jar as a external jar in our webdynpro project (properties>java build path>Libraries). when we deploy & execute the webdynpro application, it executes perfectly well the first time. if we execute/run it the 2nd time, Our dispatcher crashes. If we do a sap stop -start then, we are once again able to execute it for the first attempt and dispatcher crashes for the next attempt.

In case we comment the call to the java method which calls the native C function, the application executes successfully for every attempt.

we tried accesing the the java method calling C function thru a simple java (console) program, and it works perfectly for all the execution attempts.

We are looking forward for some guidance/tips to resolve this issue.

Any help in this regard will be greatly appreciated.

Thanking you all

Regards

Vinay rane

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I've never tried this.But just check you have any exit() statement in your code .

This might be the reason for Dispatcher crash !!!

Regards, Anilkumar

Former Member
0 Kudos

Thanks Anil for your inputs. The application executes perfectly for the first time.

After 1st execution attempt the server and dispatcher are up and remain so until we execute the same application again.

regards

Vinay