Skip to Content
avatar image
Former Member

Dispatcher crashes while using JNI .

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Feb 07, 2007 at 10:22 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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