Failure with embedding GUI java app into VC++ MFC app

I have the GUI Java application, wich I wish to be embedded into MFC application. But VC traces the message about unhandled exception and message "HEAP[app.exe]: HEAP: Free Heap block 3c40418 modified at 3c40438 after it was freed. Unhandled exception at 0x77f9193c in app.exe: User breakpoint." I had builded short tests. So console win32 apllication with gui java works and gui mfc without ui java too. Loading and unloadig the JVM is implemented in InitInstance() and ExitInstance() methods of main MFC app class. Which native thread is "main" for JVM is stored and verified when JNI-functions are called from another native thread. Java gui as it's own message processing thread which shouldn't confuse the native MFC one. Every Java-class method JNI-call is provided by exception checking. I'm at loss where to dig. Could you give me any hint, please?

[866 byte] By [yaro73a] at [2007-10-2 0:00:59]
# 1
See response at http://forum.java.sun.com/thread.jspa?threadID=664098&tstart=0
vitallisa at 2007-7-15 15:55:17 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

Well, I missed the right place for my post, sorry. It should be placed at "Native methods"...

I had selected JVM 1.4.2_08 (it was 1.5.0_04 at first) for running Java part and the failure had gone away. Though I can't unload JVM DLL before exitting correctly anyway cause my program uses OLE and jvm.dll unloading provokes the memory access exception at awt.dll through ole.dll down the call stack. The test Java program works, but sometimes mouse cursor doesn't change it shape. It happens with Swing tables. There are no faults with columns exchange or cell editors activation but mouse cursor remains "arrow" when cell editor is active or I change the column width with mouse.

yaro73a at 2007-7-15 15:55:17 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3
Well, I had solved all the problems.Using the OLE in the MFC app wasn't essential.
yaro73a at 2007-7-15 15:55:17 > top of Java-index,Java HotSpot Virtual Machine,Specifications...