This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EXCEPTION_ACCESS_VIOLATION when calling jni method in Weblogic  RSS feed

Steve Dalton
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There

I have inherited a piece of code that calls a DLL via JNI - this DLL in turn calls a proprietory VB DLL.

The code runs in an ejb on weblogic server - and previously worked fine when the jni methods were called from the ejb. If an exception occured in the DLL the exception was thrown correctly back to the ejb and dealt with appropriately.

However, if we needed to unload the DLL from memory for whatever reason - we needed to restart the whole of weblogic, which was not desirable. Because of this problem, my predecessor changed the code to add another layer. The part of the code that calls the DLL via JNI now exposes itself via RMI and the ejb in turn calls this. This allows us to redeploy the ejb and the DLL is unloaded and loaded correctly.

Now - getting around to my problem. In the new configuration - if an exception is thrown in the DLL, I now get an EXCEPTION_ACCESS_VIOLATION - causing the jvm to die and the whole weblogic server follows.

Nothing has changed in the code apart from the RMI split - DLLs and their interfaces to Java are still the same.

Any ideas?

Thanks in advance

ps. Not sure if this belongs in the J2EE forum - I thought it was more related to JNI so put it here.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!