Solved

Problem running Java program that calls methods in a Windows C++ DLL via a JNI wrapper.......

Posted on 2006-06-26
4
440 Views
Last Modified: 2012-06-22

Greetings,

Am having a problem running an Eclipse Java program in the IDE on Windows XP that calls Windows C++ methods in a Windows DLL via JNI. The JNI wrapper was developed using the SUN SDK. When we run the java program using the SUN JVM it all works well; when we attempt this using the JVM available with IBM Websphere 6.0.2.5 we have the following problem when we attempted to make the first C++ method call:

JVMDG217: Dump Handler is Processing Signal 11 - Please Wait.
JVMDG303: JVM Requesting Java core file
JVMDG304: Java core file written to C:\EclipseWorkspace\AppName\javacore.20060626.095514.392.txt

and in the dump file found the following:

NULL           ------------------------------------------------------------------------
0SECTION       TITLE subcomponent dump routine
NULL           ===============================
1TISIGINFO     signal 11 received
1TIDATETIME    Date:                 2006/06/26 at 09:55:32
1TIFILENAME    Javacore filename:    D:\EclipseWorkspace\SQLParser\javacore.20060626.095532.392.txt
NULL           ------------------------------------------------------------------------
0SECTION       XHPI subcomponent dump routine
NULL           ==============================
1XHEXCPCODE    Exception code: C0000005 Access Violation
1XHEXCPADDRESS Fault address:  1001F1C3 01:0001E1C3
1XHEXCPMODULE  Fault module:   D:\IBM\WebSphere\AppServer\_jvm\jre\bin\classic\jvm.dll
NULL          
1XHREGISTERS   Registers:
2XHREGISTER      EAX:00000000
2XHREGISTER      EBX:05E552D4
2XHREGISTER      ECX:0032AB18
2XHREGISTER      EDX:05E553A0
2XHREGISTER      ESI:002B1998
2XHREGISTER      EDI:00000000
2XHREGISTER      CS:EIP:001B:1001F1C3
2XHREGISTER      SS:ESP:0023:0006FC48  EBP:00000000
2XHREGISTER      DS:0023  ES:0023  FS:003B  GS:0000
NULL          
1XHFLAGS       Flags:00010246
NULL          
NULL           ------------------------------------------------------------------------
0SECTION       CI subcomponent dump routine
NULL           ============================
1CIJAVAVERSION J2RE 1.4.2 IBM Windows 32 build cn142ifx-20051115 (SR3 + 94164 + 97403 + 97482)
1CIRUNNINGAS   Running as a standalone JVM
1CICMDLINE     D:\IBM\WebSphere\AppServer\_jvm\bin\javaw.exe -classpath D:\EclipseWorkspace\SQLParser DSSqlParser.SqlParser
1CIJAVAHOMEDIR Java Home Dir:   D:\IBM\WebSphere\AppServer\_jvm\jre
1CIJAVADLLDIR  Java DLL Dir:    D:\IBM\WebSphere\AppServer\_jvm\jre\bin
1CISYSCP       Sys Classpath:   D:\IBM\WebSphere\AppServer\_jvm\jre\lib\core.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\graphics.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\security.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\server.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\xml.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\charsets.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmcertpathprovider.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjaasactivelm.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjaaslm.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjcefw.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjgssprovider.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjssefips.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjsseprovider.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmorb.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmorbapi.jar;D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmpkcs.jar
1CIUSERARGS    UserArgs:
2CIUSERARG               vfprintf 0x403000
2CIUSERARG               -Dinvokedviajava
2CIUSERARG               -Djava.class.path=D:\EclipseWorkspace\SQLParser
2CIUSERARG               vfprintf
NULL          
1CIJVMMI       JVM Monitoring Interface (JVMMI)
NULL           ------------------------
2CIJVMMIOFF    No events are enabled.
NULL          
NULL           ------------------------------------------------------------------------
0SECTION       DC subcomponent dump routine
NULL           ============================
1DCHEADEREYE   Header eye catcher  DCST
1DCHEADERLEN   Header length       24
1DCHEADERVER   Header version      1
1DCHEADERMOD   Header modification 0
2DCARRAYINFO     10 - index  9 signature S name  short[] factor 2
2DCARRAYINFO     11 - index 10 signature I name    int[] factor 4
2DCARRAYINFO     12 - index 11 signature J name   long[] factor 8
NULL           ------------------------------------------------------------------------
0SECTION       DG subcomponent dump routine
NULL           ============================
1DGTRCENABLED  Trace enabled: Yes
2DGTRCTYPE       Trace: Internal
2DGTRCBUFFERS    Buffer specification: 8k
2DGTRCBUFALLOC   Buffers allocated: 0
2DGTRCBUFUSED    Buffers in use:    0
1DGJDUMPBUFF   Javadump buffer size (allocated): 2621440
NULL           ------------------------------------------------------------------------
0SECTION       ST subcomponent dump routine
NULL           ============================
1STGCMODES     Resettable GC: No
1STGCMODES     Concurrent GC: No
1STCURHBASE    Current Heap Base: 0x101801FC
1STCURHLIM     Current Heap Limit: 0x1057FBFC
1STMWHBASE     Middleware Heap Base: 0x101801FC
1STMWHLIM      Middleware Heap Limit: 0x1057FBFC
1STGCHELPERS   Number of GC Helper Threads: 0
1STJVMOPTS     -Xconcurrentlevel: 0
1STJVMOPTS     -Xconcurrentbackground: 0
1STGCCTR       GC Counter: 0
1STAFCTR       AF Counter: 0
1STHEAPFREE    Bytes of Heap Space Free: 2f2e40
1STHEAPALLOC   Bytes of Heap Space Allocated: 3ffa00
1STSMBASE      SM Base: 0x0
1STSMEND       SM End: 0x0
1STPAMSTART    PAM Start: 0x0
1STPAMEND      PAM End: 0x0
1STCOMACTION   Compact Action: 0
NULL           ------------------------------------------------------------------------
0SECTION       XE subcomponent dump routine
NULL           ============================
1XETHRESHOLD   MMI threshold for java methods is set to 2000
1XEJITINIT     JIT is initialized
1XEJVMPIOFF    JVMPI is not activated
1XEJNITHRESH   MMI threshold for JNI methods is set to 0
1XETRCHIS      Trace history length is set to 4
1XEJITDUMP     JIT dump routine is not yet implemented.
NULL           ------------------------------------------------------------------------
0SECTION       LK subcomponent dump routine
NULL           ============================
NULL          
1LKPOOLINFO    Monitor pool info:
2LKPOOLINIT      Initial monitor count: 32
2LKPOOLEXPNUM    Minimum number of free monitors before expansion: 5
2LKPOOLEXPBY     Pool will next be expanded by: 16
2LKPOOLTOTAL     Current total number of monitors: 32
2LKPOOLFREE      Current number of free monitors: 28
NULL          
1LKMONPOOLDUMP Monitor Pool Dump (flat & inflated object-monitors):
2LKMONINUSE      sys_mon_t:0x0026FD30 infl_mon_t: 0x002B227C:
3LKMONOBJECT       java.lang.ref.Reference$Lock@10200598/102005A0: <unowned>
3LKNOTIFYQ            Waiting to be notified:
3LKWAITNOTIFY            "Reference Handler" (0x1D6FAA0)
2LKMONINUSE      sys_mon_t:0x0026FDC0 infl_mon_t: 0x002B22D4:
3LKMONOBJECT       java.lang.ref.ReferenceQueue$Lock@102002D0/102002D8: <unowned>
3LKNOTIFYQ            Waiting to be notified:
3LKWAITNOTIFY            "Finalizer" (0x1DF35E8)
NULL          
1LKREGMONDUMP  JVM System Monitor Dump (registered monitors):
2LKREGMON          JITC PIC Lock (0x01EB1448): <unowned>
2LKREGMON          JITC CHA lock (0x01E9B090): <unowned>
2LKREGMON          JITC MB UPDATE lock (0x026A0070): <unowned>
2LKREGMON          JITC Global_Compile lock (0x026A0020): <unowned>
2LKREGMON          Free Class Loader Cache Entry lock (0x002B4098): <unowned>
NULL          
1LKOBJMONDUMP  Java Object Monitor Dump (flat & inflated object-monitors):
2LKINFLATEDMON     java.lang.ref.ReferenceQueue$Lock@102002D0/102002D8
3LKINFLDETAILS         locknflags 80000400 Monitor inflated infl_mon 0x002B22D4
2LKINFLATEDMON     java.lang.ref.Reference$Lock@10200598/102005A0
3LKINFLDETAILS         locknflags 80000200 Monitor inflated infl_mon 0x002B227C
NULL           ------------------------------------------------------------------------
0SECTION       XM subcomponent dump routine
NULL           ============================
NULL            
1XMCURTHDINFO  Current Thread Details
NULL           ----------------------
3XMTHREADINFO      "main" (TID:0x101EB9B8, sys_thread_t:0x2B1B70, state:R, native ID:0xCBC) prio=5: pending=java.lang.NoClassDefFoundError
4XESTACKTRACE          at DSSqlParser.SqlParser.init(Native Method)
4XESTACKTRACE          at DSSqlParser.SqlParser.main(SqlParser.java:69)
1XMTHDINFO     All Thread Details
NULL           ------------------
NULL          
2XMFULLTHDDUMP Full thread dump Classic VM (J2RE 1.4.2 IBM Windows 32 build cn142ifx-20051115 (SR3 + 94164 + 97403 + 97482), native threads):
3XMTHREADINFO      "Finalizer" (TID:0x101EB8B0, sys_thread_t:0x1DF35E8, state:CW, native ID:0x4AC) prio=8
4XESTACKTRACE          at java.lang.Object.wait(Native Method)
4XESTACKTRACE          at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
4XESTACKTRACE          at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:160)
4XESTACKTRACE          at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:225)
3XMTHREADINFO      "Reference Handler" (TID:0x101EB908, sys_thread_t:0x1D6FAA0, state:CW, native ID:0xBB8) prio=10
4XESTACKTRACE          at java.lang.ref.Reference.process(Native Method)
4XESTACKTRACE          at java.lang.ref.Reference.access$300(Reference.java:50)
4XESTACKTRACE          at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:130)
3XMTHREADINFO      "Signal dispatcher" (TID:0x101EB960, sys_thread_t:0x1DE63C8, state:R, native ID:0xD84) prio=5
3XMTHREADINFO      "main" (TID:0x101EB9B8, sys_thread_t:0x2B1B70, state:R, native ID:0xCBC) prio=5: pending=java.lang.NoClassDefFoundError
4XESTACKTRACE          at DSSqlParser.SqlParser.init(Native Method)
4XESTACKTRACE          at DSSqlParser.SqlParser.main(SqlParser.java:69)
NULL           ------------------------------------------------------------------------
0SECTION       CL subcomponent dump routine
NULL           ============================
1CLCLASSPATH         Classpath Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\core.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\graphics.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\security.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\server.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\xml.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\charsets.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmcertpathprovider.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjaasactivelm.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjaaslm.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjcefw.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjgssprovider.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjssefips.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmjsseprovider.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmorb.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmorbapi.jar),Z(D:\IBM\WebSphere\AppServer\_jvm\jre\lib\ibmpkcs.jar)
1CLFLAGOLDJAVA       Oldjava mode false
1CLFLAGBOOTSTRP      Bootstrapping false
1CLFLAGVERBOSE       Verbose class dependencies false
1CLENUMVERIFY        Class verification VERIFY_REMOTE
1CLPNTRNAMECLLO      Namespace to classloader 0x00000000
1CLPNTRCLSEXT        Extension loader 0x101EB830
1CLPNTRSYSLOADR      System classloader 0x101EB7B0
1CLTEXTCLLOS         Classloader summaries
1CLTEXTCLLSS               12345678: 1=primordial,2=extension,3=shareable,4=middleware,5=system,6=trusted,7=application,8=delegating
2CLTEXTCLLOADER            -----ta- Loader sun/misc/Launcher$AppClassLoader(0x01EAC960), Shadow 0x101EB7B0, Parent sun/misc/Launcher$ExtClassLoader(0x101EB830)
3CLNMBRLOADEDCL                  Number of loaded classes 1
3CLNMBRCACHECLS                  Number of cached classes 259
3CLHEXDALLOCTIO                  Allocation used for loaded classes 1
3CLHEXDPCKGEOWN                  Package owner 0x101EB7B0
2CLTEXTCLLOADER            -xh-st-- Loader sun/misc/Launcher$ExtClassLoader(0x01EA20D0), Shadow 0x101EB830, Parent *none*(0x00000000)
3CLNMBRLOADEDCL                  Number of loaded classes 0
3CLNMBRCACHECLS                  Number of cached classes 0
3CLHEXDALLOCTIO                  Allocation used for loaded classes 3
3CLHEXDPCKGEOWN                  Package owner 0x101EB830
2CLTEXTCLLOADER            p-h-st-- Loader *System*(0x00361F20), Shadow 0x00000000
3CLNMBRLOADEDCL                  Number of loaded classes 306
3CLNMBRCACHECLS                  Number of cached classes 306
3CLHEXDALLOCTIO                  Allocation used for loaded classes 3
3CLHEXDPCKGEOWN                  Package owner 0x00000000
1CLTEXTCLLOD         ClassLoader loaded classes
2CLTEXTCLLOAD              Loader sun/misc/Launcher$AppClassLoader(0x01EAC960)
3CLTEXTCLASS                     DSSqlParser/SqlParser(0x101DF0E0)
2CLTEXTCLLOAD              Loader sun/misc/Launcher$ExtClassLoader(0x01EA20D0)
2CLTEXTCLLOAD              Loader *System*(0x00361F20)
3CLTEXTCLASS                     java/io/DataOutput(0x002DA068)
3CLTEXTCLASS                     sun/net/www/URLConnection(0x01E76898)
3CLTEXTCLASS                     com/ibm/jvm/io/FileOutputStream(0x002DC2D8)
3CLTEXTCLASS                     java/util/Hashtable$EmptyIterator(0x002D4758)
3CLTEXTCLASS                     java/lang/ClassLoader(0x002D29A8)
3CLTEXTCLASS                     java/lang/Comparable(0x002D0738)
NULL           ------------------------------------------------------------------------
0SECTION       Javadump End section
1DGJDUMP       Javadump Buffer Usage Information
NULL           =================================
2DGJDUMPALLOC  Javadump buffer size (allocated): 2621440
2DGJDUMPUSED   Javadump buffer size (used)     : 34558
NULL           ---------------------- END OF DUMP -------------------------------------

Any help is appreciated.

ADG13
0
Comment
Question by:adgarcia13
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
yuseungkim earned 500 total points
ID: 16988140
I believe you'd better open PMR with IBM since it is IBM WAS JVM issue.

Cheers

Andy K.
0
 

Author Comment

by:adgarcia13
ID: 16988180

Thanks Andy,

Do you know of any specific information on this issue? I did some research on the internet and it seems other people have run into related problems but not this specific one. I guess I am wondering if it has already been reported and there is some known workaround or patch. If I don't find something soon a PMR will be opened.

Thanks,

ADG13
0
 
LVL 3

Expert Comment

by:yuseungkim
ID: 16988430
Did you analyze this Java Core dump with IBM Thread analyzer ?

Check following URL ( You will also find URL to download IBM ThreadAnalyzer tool which read java core dump and analyze it ):

http://www-1.ibm.com/support/docview.wss?rs=180&context=SSEQTP&dc=DB520&dc=D600&dc=DB530&dc=D700&dc=DB500&dc=DB540&dc=DB510&dc=DB550&q1=c%2b%2b+method+call&uid=swg21180862&loc=en_US&cs=utf-8&lang=en

Good Luck.

Andy K
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 16989971
try running with java -Xcheck:jni, it helps you find out native problems
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now