Showing results for 
Search instead for 
Did you mean: 

JNI connection to SolidEdge Type Library

Valued Contributor
Valued Contributor


I'm trying to make running process as java -> C++ -> C# -> Type Library.

I've compiled c# code making netmodule using csc that is called from c++.

Basically, java -> c++ -> c# works well. The problem is ocurred when C# calls COM library that is CAD application, Solid Edge Framework Type Library.

Just defining SolidEdgeFramework.Application application = null gives error.

I was given dump file from Java as follow.



# An unexpected error has been detected by Java Runtime Environment:


# Internal Error (0xe0434f4d), pid=5524, tid=5872


# Java VM: Java HotSpot(TM) Client VM (11.2-b01 mixed mode, sharing windows-x86)

# Problematic frame:

# C [kernel32.dll+0x12aeb]


# If you would like to submit a bug report, please visit:


# The crash happened outside the Java Virtual Machine in native code.

# See problematic frame for where to report the bug.


--------------- T H R E A D ---------------

Current thread (0x00846400): JavaThread "main" [_thread_in_native, id=5872, stack(0x008e0000,0x00930000)]

siginfo: ExceptionCode=0xe0434f4d, ExceptionInformation=0x80070002


EAX=0x0092f358, EBX=0xe0434f4d, ECX=0x00000000, EDX=0x00000028

ESP=0x0092f354, EBP=0x0092f3a8, ESI=0x0092f3e4, EDI=0x000acd68

EIP=0x7c812aeb, EFLAGS=0x00000202

Top of Stack: (sp=0x0092f354)

0x0092f354: 0092f3e0 e0434f4d 00000001 00000000

0x0092f364: 7c812aeb 00000001 80070002 02000038

0x0092f374: 0092f384 79e8006c 0092f38c 02000038

0x0092f384: 0092f390 79e806cf 79330cb4 0092f3a0

0x0092f394: 79eda7ef 79317310 0000012f 0092f3b0

0x0092f3a4: 79eda816 0092f408 79eda99c e0434f4d

0x0092f3b4: 00000001 00000001 0092f3e0 8000f7c4

0x0092f3c4: 00000000 038b5bf8 00000000 008e3000

Instructions: (pc=0x7c812aeb)

0x7c812adb: 8d 7d c4 f3 a5 5f 8d 45 b0 50 ff 15 10 15 80 7c

0x7c812aeb: 5e c9 c2 10 00 85 ff 0f 8e 36 93 ff ff 8b 55 fc

Stack: [0x008e0000,0x00930000], sp=0x0092f354, free space=316k

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

C [kernel32.dll+0x12aeb]

C [mscorwks.dll+0x6a99c]

C [mscorwks.dll+0xc9ec4]

C [mscorwks.dll+0x2656cd]

C [mscorjit.dll+0x1a7af]

C [mscorjit.dll+0x5b35]

C [mscorjit.dll+0x5d33]

C [mscorjit.dll+0x6448]

C [mscorwks.dll+0x15722c]

C [mscorwks.dll+0x1572c5]

C [mscorwks.dll+0x157338]

C [mscorwks.dll+0x1570ad]

C [mscorwks.dll+0x156e6f]

C [mscorwks.dll+0x111eb]

C [mscorwks.dll+0x113ab]

C 0x02e3fb9e

C 0x0329e1f1

C 0x0329e124

C 0x02e400f1


j HelloWorld.main([Ljava/lang/StringSmiley WinkV+14

v ~StubRoutines::call_stub

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)


j HelloWorld.main([Ljava/lang/StringSmiley WinkV+14

v ~StubRoutines::call_stub

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )

0x02b0c400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2224, stack(0x02d80000,0x02dd0000)]

0x02b06400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=1556, stack(0x02d30000,0x02d80000)]

0x02b3b000 JavaThread "Attach Listener" daemon [_thread_blocked, id=5888, stack(0x02ce0000,0x02d30000)]

0x02b23400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3788, stack(0x02c90000,0x02ce0000)]

0x02ac0400 JavaThread "Finalizer" daemon [_thread_blocked, id=5456, stack(0x02c40000,0x02c90000)]

0x02abec00 JavaThread "Reference Handler" daemon [_thread_blocked, id=1312, stack(0x02bf0000,0x02c40000)]

=>0x00846400 JavaThread "main" [_thread_in_native, id=5872, stack(0x008e0000,0x00930000)]

Other Threads:

0x02abd400 VMThread [stack: 0x02ba0000,0x02bf0000] [id=2120]

0x02b11400 WatcherThread [stack: 0x02dd0000,0x02e20000] [id=4656]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None


def new generation total 960K, used 224K [0x229e0000, 0x22ae0000, 0x22ec0000)

eden space 896K, 25% used [0x229e0000, 0x22a181c8, 0x22ac0000)

from space 64K, 0% used [0x22ac0000, 0x22ac0000, 0x22ad0000)

to space 64K, 0% used [0x22ad0000, 0x22ad0000, 0x22ae0000)

tenured generation total 4096K, used 0K [0x22ec0000, 0x232c0000, 0x269e0000)

the space 4096K, 0% used [0x22ec0000, 0x22ec0000, 0x22ec0200, 0x232c0000)

compacting perm gen total 12288K, used 392K [0x269e0000, 0x275e0000, 0x2a9e0000)

the space 12288K, 3% used [0x269e0000, 0x26a42340, 0x26a42400, 0x275e0000)

ro space 8192K, 67% used [0x2a9e0000, 0x2af47448, 0x2af47600, 0x2b1e0000)

rw space 12288K, 53% used [0x2b1e0000, 0x2b854d58, 0x2b854e00, 0x2bde0000)

Dynamic libraries:

0x00400000 - 0x00424000 D:\develop\sdk\j2sdk6\bin\javaw.exe

0x7c930000 - 0x7c9cb000 C:\WINDOWS\system32\ntdll.dll

0x7c800000 - 0x7c930000 C:\WINDOWS\system32\kernel32.dll

0x77f50000 - 0x77ff8000 C:\WINDOWS\system32\ADVAPI32.dll

0x77d80000 - 0x77e12000 C:\WINDOWS\system32\RPCRT4.dll

0x77ef0000 - 0x77f01000 C:\WINDOWS\system32\Secur32.dll

0x77cf0000 - 0x77d80000 C:\WINDOWS\system32\USER32.dll

0x77e20000 - 0x77e69000 C:\WINDOWS\system32\GDI32.dll

0x762e0000 - 0x762fd000 C:\WINDOWS\system32\IMM32.DLL

0x62340000 - 0x62349000 C:\WINDOWS\system32\LPK.DLL

0x73f80000 - 0x73feb000 C:\WINDOWS\system32\USP10.dll

0x7c340000 - 0x7c396000 D:\develop\sdk\j2sdk6\jre\bin\msvcr71.dll

0x6d8b0000 - 0x6db06000 D:\develop\sdk\j2sdk6\jre\bin\client\jvm.dll

0x76af0000 - 0x76b1b000 C:\WINDOWS\system32\WINMM.dll

0x6d340000 - 0x6d348000 D:\develop\sdk\j2sdk6\jre\bin\hpi.dll

0x76ba0000 - 0x76bab000 C:\WINDOWS\system32\PSAPI.DLL

0x6d860000 - 0x6d86c000 D:\develop\sdk\j2sdk6\jre\bin\verify.dll

0x6d3e0000 - 0x6d3ff000 D:\develop\sdk\j2sdk6\jre\bin\java.dll

0x6d8a0000 - 0x6d8af000 D:\develop\sdk\j2sdk6\jre\bin\zip.dll

0x10000000 - 0x1000e000 D:\develop\workspace\Jni_dll\BlueToolsBridge.dll

0x79000000 - 0x79046000 C:\WINDOWS\system32\mscoree.dll

0x10200000 - 0x10320000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\MSVCR80D.dll

0x77bc0000 - 0x77c18000 C:\WINDOWS\system32\msvcrt.dll

0x02e80000 - 0x02f82000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcm80d.dll

0x76970000 - 0x76aad000 C:\WINDOWS\system32\ole32.dll

0x77e70000 - 0x77ee6000 C:\WINDOWS\system32\SHLWAPI.dll

0x79e70000 - 0x7a400000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll

0x78130000 - 0x781cb000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca\MSVCR80.dll

0x7d5a0000 - 0x7dd9d000 C:\WINDOWS\system32\shell32.dll

0x77160000 - 0x77263000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll

0x305e0000 - 0x305f6000 C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 7.0\miscr3.dll

0x30480000 - 0x3048e000 C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 7.0\fssync.dll

0x790c0000 - 0x79bb7000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\6d667f19d687361886990f3ca0f49816\

0x79060000 - 0x790bb000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll

0x5e3a0000 - 0x5e42d000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll

0x68000000 - 0x68036000 C:\WINDOWS\system32\rsaenh.dll

0x7a440000 - 0x7abc5000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\80978a322d7dd39f0a71be1251ae395a\

0x03370000 - 0x03376000 D:\develop\workspace\Jni_dll\csharphelloworld.netmodule

VM Arguments:

jvm_args: -Djava.library.path=D:/develop/workspace/Jni_dll -Djava.library.path=D:/develop/workspace/Jni_dll

java_command: HelloWorld

Launcher Type: SUN_STANDARD

Environment Variables:


PATH=D:\develop\sdk\j2sdk6\bin;D:\develop\dll_lib;C:\XEClient\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\APM_Setup\Server\Apache\bin;C:\APM_Setup\Server\MySQL5\bin;C:\APM_Setup\Server\PHP5;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\IVT Corporation\BlueSoleil\Mobile;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\Program Files\TC UP\PLUGINS\Library;C:\Program Files\IDM Computer Solutions\UltraEdit\;C:\Program Files\UniUSB\Common



PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel

--------------- S Y S T E M ---------------

OS: Windows XP Build 2600 Service Pack 3

CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3

Memory: 4k page, physical 2097151k(1880624k free), swap 4194303k(3166132k free)

vm_info: Java HotSpot(TM) Client VM (11.2-b01) for windows-x86 JRE (1.6.0_12-b04), built on Jan 17 2009 09:57:14 by "java_re" with MS VC++ 7.1

time: Thu Apr 02 15:13:13 2009

elapsed time: 0 seconds


Posted by: James Cho
Post date: 4/22/2009 4:24:28 PM