When i call function from service_ctrl() (NT-service)that create JVM and invoke my java-function i recieve next "error 1064: An exception occured in the service when handling the control request", but same code work in service_impl_main(). What must i do it will work?
My guess would be that you are caching something that is not supposed to be cached between different threads and that service_impl_main() executes on a different thread than service_ctrl(). The most likely candidates for your problem are:
- a cached JNIEnv *
- a cached local object reference (you can cache global or weak global references between threads