There are two issues.
dll
invocation calls multiple Suneido callbacks before returning control to Suneido, it won't short-circuit if the first callback throws a Suneido (i.e. Java/JNI) exception.callback
invocation should check for a JNI exception and raise an SEH exception...dll
invocation should catch SEH exceptions and raise JNI exceptions.