We are new to JNI and facing a problem while integrating an SDK written in "C" with our web application.
Below is the problem description:
We are having a problem to call JNI method through Java Web Application.
We have followed the approach of JNI ( Java Native Interface) to bridge a communication with C programs. As JNI accepts only DLL approach to communicate with required C functions. We have created DLL from C code by using CL command available in VC++. Now in our Java application we have sucessfully created and loaded the DLL, but when we call the JNI method through DLL we are getting following error.
HTTP Status 500 -
type Exception report
description The server encountered an internal error () that prevented it from fulfilling this request.
javax.servlet.ServletException: Servlet execution threw an exception
: Method name
package_name. classname.MethodName(Native Method) .
We are not able to solve this issue.
We think that it is packaging issue because the DLL is not created as per the package given in Java Class.
We don't understand why we are getting HTTP Status 500 error while calling JNI method.
Experts, please guide us; If you aware about this problem.
p.s. - I am going to add relevant code segments if required.