JNI-Visual C++ 6.0

Hi
I want to use the file scanner�dll in java�aplication so i use JNI for that.
I read that I have to implement the wrapper JNI and for that i need to link the file scanner�file .lib but i have problem because the C++ compiler say me Cannot open file LS100.lib.
May be I don�t doy the link correctly, but I read that for link I have to follow this steps:
In project setting-----link----Object library module include the file LS100.lib but Its�t enoght
because the C++ compiler say me Cannot open file LS100.lib.
Please help me
Thank for advance and sorry for my english
I�m developming and file JNI C and I need tolink the file .lib beca

Hi
I want to use the file scanner�dll in java�aplication so i use JNI for that.
I read that I have to implement the wrapper JNI and for that i need to link the file scanner�file .lib but i have problem because the C++ compiler say me Cannot open file LS100.lib.
May be I don�t doy the link correctly, but I read that for link I have to follow this steps:
In project setting-----link----Object library module include the file LS100.lib but Its�t enoght
because the C++ compiler say me Cannot open file LS100.lib.
Please help me
Thank for advance and sorry for my english
I�m developming and file JNI C and I need tolink the file .lib beca

Similar Messages

  • Exception Occur while Using Microsoft Visual Studio for Debugging JNI app.

    Hi all,
    My JNI program works fine. And also Visual Studio IDE allow to debug C++ program properly.
    But after each instance of program executation(Under Visual Studio IDE) I am getting following log file.
    ================================================================================================================
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d99f278, pid=4800, tid=1196
    # Java VM: Java HotSpot(TM) Client VM (1.6.0_02-b06 mixed mode)
    # Problematic frame:
    # V [jvm.dll+0x12f278]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x00446c00): JavaThread "main" [_thread_in_vm, id=1196]
    siginfo: ExceptionCode=0xc0000005, reading address 0x545c3a49
    Registers:
    EAX=0x545c3a45, EBX=0x00000000, ECX=0x004475c8, EDX=0x01bdf6a8
    ESP=0x01bdf69c, EBP=0x00447594, ESI=0x00446c00, EDI=0x00447594
    EIP=0x6d99f278, EFLAGS=0x00010202
    Top of Stack: (sp=0x01bdf69c)
    0x01bdf69c: 00447598 00446c00 000000b6 004475c8
    0x01bdf6ac: 004475c4 004475c0 004475bc 6d99f3d1
    0x01bdf6bc: 01bdf720 00447594 00447598 00000e00
    0x01bdf6cc: 00446c00 6d92a997 01bdf720 00447594
    0x01bdf6dc: 00447598 00000e00 000000b6 00446c00
    0x01bdf6ec: 00446c00 07e73fd9 01bdf768 000000b6
    0x01bdf6fc: 00446c00 00446c00 01bdf700 01c67cb4
    0x01bdf70c: 01bdf768 01bdf708 00447158 00447160
    Instructions: (pc=0x6d99f278)
    0x6d99f268: 4a 57 8b 7c 24 24 3b fb 75 04 33 c0 eb 05 8b 07
    0x6d99f278: 8b 40 04 50 56 8d 4c 24 38 e8 fa 89 ed ff 8b 4c
    Stack: [0x01b90000,0x01be0000), sp=0x01bdf69c, free space=317k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0x12f278]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j FILE_INFO_J.SetOutputFileName(Ljava/lang/String;)V+1
    v ~StubRoutines::call_stub
    j FILE_INFO_J.ReadBinaryFile(Ljava/lang/String;LFILE_INFO_J;)V+0
    j FILE_INFO_J.CopyBinaryFile(Ljava/lang/String;)V+3
    j FILE_INFO_J.main([Ljava/lang/String;)V+38
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x0be19c00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3888]
    0x0be18000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3752]
    0x0be0cc00 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=1336]
    0x0be09800 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_in_native, id=4848]
    0x0bdfbc00 JavaThread "Attach Listener" daemon [_thread_blocked, id=4160]
    0x0bdfac00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1436]
    0x0bde8000 JavaThread "Finalizer" daemon [_thread_blocked, id=676]
    0x0bde6c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=4516]
    =>0x00446c00 JavaThread "main" [_thread_in_vm, id=1196]
    Other Threads:
    0x0bde3800 VMThread [id=4640]
    0x0be34c00 WatcherThread [id=5112]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 960K, used 17K [0x03cd0000, 0x03dd0000, 0x041b0000)
    eden space 896K, 2% used [0x03cd0000, 0x03cd47c8, 0x03db0000)
    from space 64K, 0% used [0x03dc0000, 0x03dc0000, 0x03dd0000)
    to space 64K, 0% used [0x03db0000, 0x03db0000, 0x03dc0000)
    tenured generation total 11948K, used 7985K [0x041b0000, 0x04d5b000, 0x07cd0000)
    the space 11948K, 66% used [0x041b0000, 0x0497c5b8, 0x0497c600, 0x04d5b000)
    compacting perm gen total 12288K, used 1690K [0x07cd0000, 0x088d0000, 0x0bcd0000)
    the space 12288K, 13% used [0x07cd0000, 0x07e76a30, 0x07e76c00, 0x088d0000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\Program Files (x86)\Java\jdk1.6.0_02\bin\java.exe
    0x7d600000 - 0x7d6f0000      C:\WINDOWS\system32\ntdll.dll
    0x7d4c0000 - 0x7d5f0000      C:\WINDOWS\syswow64\kernel32.dll
    0x00350000 - 0x003eb000      C:\WINDOWS\syswow64\ADVAPI32.dll
    0x7da20000 - 0x7db00000      C:\WINDOWS\syswow64\RPCRT4.dll
    0x7d8d0000 - 0x7d920000      C:\WINDOWS\syswow64\Secur32.dll
    0x7c340000 - 0x7c396000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\msvcr71.dll
    0x6d870000 - 0x6dab9000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\client\jvm.dll
    0x7d930000 - 0x7da00000      C:\WINDOWS\syswow64\USER32.dll
    0x7d800000 - 0x7d890000      C:\WINDOWS\syswow64\GDI32.dll
    0x76aa0000 - 0x76acd000      C:\WINDOWS\system32\WINMM.dll
    0x7dee0000 - 0x7df40000      C:\WINDOWS\system32\IMM32.DLL
    0x6d3c0000 - 0x6d3c8000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\hpi.dll
    0x76b70000 - 0x76b7b000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d4b0000 - 0x6d4d9000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\jdwp.dll
    0x6d770000 - 0x6d776000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\npt.dll
    0x6d820000 - 0x6d82c000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\verify.dll
    0x6d460000 - 0x6d47f000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\java.dll
    0x6d860000 - 0x6d86f000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\zip.dll
    0x6d330000 - 0x6d337000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\dt_socket.dll
    0x71c00000 - 0x71c17000      C:\WINDOWS\system32\WS2_32.dll
    0x77ba0000 - 0x77bfa000      C:\WINDOWS\syswow64\msvcrt.dll
    0x71bf0000 - 0x71bf8000      C:\WINDOWS\system32\WS2HELP.dll
    0x10000000 - 0x10023000      C:\WINDOWS\system32\nvappfilter.dll
    0x77670000 - 0x777a9000      C:\WINDOWS\syswow64\ole32.dll
    0x0c150000 - 0x0c1db000      C:\WINDOWS\syswow64\OLEAUT32.dll
    0x7db30000 - 0x7dbb0000      C:\WINDOWS\system32\mswsock.dll
    0x5f270000 - 0x5f2ca000      C:\WINDOWS\system32\hnetcfg.dll
    0x71ae0000 - 0x71ae8000      C:\WINDOWS\System32\wshtcpip.dll
    0x7df50000 - 0x7dfc0000      C:\WINDOWS\system32\uxtheme.dll
    0x4b3c0000 - 0x4b410000      C:\WINDOWS\SysWOW64\MSCTF.dll
    0x777b0000 - 0x77833000      C:\WINDOWS\system32\CLBCatQ.DLL
    0x77010000 - 0x770d6000      C:\WINDOWS\system32\COMRes.dll
    0x77b90000 - 0x77b98000      C:\WINDOWS\syswow64\VERSION.dll
    0x0c500000 - 0x0c7c5000      C:\WINDOWS\system32\xpsp2res.dll
    0x75da0000 - 0x75e5d000      C:\WINDOWS\system32\SXS.DLL
    0x0cc60000 - 0x0ccc1000      E:\TI\Assignment_3\JNIFileOperation_C\Debug\JNIFileOperation.dll
    VM Arguments:
    jvm_args: -Xrunjdwp:transport=dt_socket,server=y,address=8888,suspend=n
    java_command: FILE_INFO_J E:\Assignment_3\VC.pdf
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=D:\oracle\app\oracle\product\10.2.0\server\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files (x86)\Subversion\bin;C:\Program Files (x86)\Java\jdk1.6.0_02\bin;C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\client;C:\Sun\SDK\bin;��!
    USERNAME=user
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=AMD64 Family 15 Model 47 Stepping 2, AuthenticAMD
    ================================================================================================================
    So please tell anyone could Figure out what is this file all about??
    Is this says to be worry about it .. or just provide information of current system status??
    I will be obliged to you if you would help me
    Thank you.

    This is exactly due to the memory stack.This error is entirely due to the native code.Check the native code,if there are data conversions handle them carefully
    and if you are passing an array see to that the array doesnt oveflow.
    Have some prints in the native code and watch the data transferred

  • Creating *.dll  in Visual Studio (using c++) for JNI

    Hi,
    I'd like to ask, if anybody has experience how to make *.dll using Visual studio (2003) and use c++.
    I make *.dll library in C ( in DEV-C++), it is no problem in C , but when I use C++, it doesnt work (it is the same in Visual studio)
    I have the same code like in C ( the same header , and the "same" code - in dev-c++ it works well ) but when I try to create this same project using C++ it doesn work.
    Visual studio throws exeption:
    c:\Documents and Settings\patak\Dokumenty\Visual Studio Projects\jniknihovna\jniknihovna.cpp(13): error C2227: left of '->GetStringUTFChars' must point to class/struct/union
    type is 'JNIEnv'
    did you intend to use '.' instead?
    c:\Documents and Settings\patak\Dokumenty\Visual Studio Projects\jniknihovna\jniknihovna.cpp(13): error C2819: type 'JNIEnv_' does not have an overloaded member 'operator ->'
    Well does anybody have any idea how to solve this problem?

    Well I think I use my compiler (dev-c++) corectly:
    My codes :
    *.h file (that is produced by javah)
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class IntArray */
    #ifndef IncludedIntArray
    #define IncludedIntArray
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: IntArray
    * Method: sumArray
    * Signature: ([I)I
    JNIEXPORT jint JNICALL Java_pole_IntArray_sumArray
    (JNIEnv *, jobject, jintArray);
    #ifdef __cplusplus
    #endif
    #endif
    And *.cpp
    #include <jni.h>
    #include <stdio.h>
    #include "dll.h"
    JNIEXPORT jint JNICALL
    Java_pole_IntArray_sumArray(JNIEnv *env, jobject obj, jintArray arr)
    jint buf[10];
    jint i, sum = 0;
    (*env)->GetIntArrayRegion(env, arr, 0, 10, buf);
    for (i = 0; i < 10; i++) {
    sum += buf;
    return sum;
    and in Java : private native int sumArray(int[] arr);
    and again error : 10 C:\Dev-Cpp\dllmain.cpp base operand of `->' has non-pointer type `JNIEnv_'
    (when I compile it as C library, it works , but I need to use C++ in other code, I can find only examples where only *.C is used )
    Maybe here is an error, but I don't know how to solve this problem
    Edited by: patakm1 on Apr 4, 2008 2:28 PM

  • JNI FindClass Error: Using the Invocation API  from visual C++

    I am using JNI invocation api in microsoft visual c++ to invoke java. When I use the FindClass method, I get a return value of 0. I have verified that the class "a" exists and believe have set the java class path appropriately. A valid jvm and jenv are created. The program fails at the FindClass call and returns 0.
    std::string classPath = "c:\\work\\java;C:\\j2sdk1.4.2_08;C:\\j2sdk1.4.2_08\\bin;C:\\j2sdk1.4.2_08\\lib";
         vmArgs.classpath = classpath;
         jint res = JNI_CreateJavaVM(&jvm, (void**)(&jenv), &vmArgs);
         if (res < 0)
              cout << "Error!! Cannot create jvm" << endl;
    jclass jFixEngineClass1 = jenv->FindClass("a");
         if (jFixEngineClass1 == 0)
              cout << "Error could not find a class" << endl;
         else
              cout << "a class found" << endl;
    thanks in advance,
    hcg

    Jschell,
    Thanks for your help.
    I found the error. I was using JDK1_1InitArgs for my vm_args. Since, I am using JDK 1.4, the classpath I was setting was not getting picked up. I changed the vm_args type as in the code below and it worked.
    JavaVMInitArgs vmArgs;
         JavaVMOption options[1];
         char classPathDef[1024];classPathDef[0] = '\0';
         sprintf(classPathDef, "%s", "-Djava.class.path=");
         sprintf(classpath, "%s%s", classPathDef, NYSE_FIX::userClassPath.c_str());
         options[0].optionString = classpath;
         cout << "Option string is:" << options[0].optionString << endl;
    vmArgs.version = 0x00010004;
    vmArgs.options = options;
    vmArgs.nOptions = 1;
    vmArgs.ignoreUnrecognized = JNI_TRUE;
         jint ret = JNI_GetDefaultJavaVMInitArgs(&vmArgs);

  • JNI with Visual C++

    Hi,
    I am a newbie. I have a code using Visual C++ with integrated libraries. Can I interface it with Java ?
    Regards,
    D. Anand Kumar

    Hi,
    I can explain more on the question. I would like to write a program in Java which calls a native method that's described in a C++ program.
    Sample.java
    public class Sample
         static
              System.loadLibrary("Sample");
         // A native method that receives nothing and returns void
         private native void test();
         public static void main(String[] args)
              new Sample().test(); // invoke the native method
    Sample.cpp
    #include "stdafx.h"
    #include <iostream>
    using namespace std;
    void test() // native function
    // function definition
    I compiled and builded the Sample.cpp in a Visual C++ environment into a .dll. Now I tried to execute the java program with this dll and it said it could not find dependent libraries. I tried the following too.
    #include <jni.h>
    #include "stdafx.h"
    #include <iostream>
    using namespace std;
    JNIEXPORT void JNICALL Java_RUI_test(JNIEnv *env, jobject thisObj)
    //code
    I added additional dependencies to the program to include the jni header from JAVA_HOME/include and JAVA_HOME/include/Win32. I builded a dll and tried to execute the java code and hit again at the same error "Unsatisfied Link Error : Cant find dependent libraries".

  • Using JNI with Visual C++!! kIND OF URGENT

    Hi PPL,
    I am trying to interface c++ programs compiled using the g++ compiler with JNI using Visual C++, Visual C++ for some reason is not able to locate pair and map header files, so i used the header file utility.h, but the problem is changing the g++ compiled code which use pair and map.h extensively, any ideas how i can do this.

    I don't see anything in this that suggests it has anything to do with java.
    So you might try posting to a VC++ list/board or a gnu(g++?) list/board.

  • Help with JNI using C in Visual Studio

    Hi,
    I need help in passing arguments such as "-Djava.class.path=xxxxxxx" in Visual C++ 2005 Express Edition. I have created the .dll and an .exe which uses that DLL to call Java using c and jni. If I hard code the classpath, then it seems to work, at least partially, but I need to send to arguments through the command line. I tired it in the properties of the file but it doesn't work. Any suggestion?

    What is the executable you are trying to debug? A DLL that is called from java?
    So your VC project is a DLL? (It's really hard to tell from your posts).
    If so, then suppose you have this folder structure:
    {dll_project_folder}
    {dll_project_folder}\debug\mylib.dll
    {java_project_folder}
    {java_project_folder}\MyJavaClass.class
    Then your VC project settings should be:
    Command : {java_root_folder}\bin\java.exe
    Command Arguments : -classpath {java_project_folder} MyJavaClass
    Working Directory : {dll_project_folder}\debug
    Regards

  • Debugging a JNI DLL created with Visual C++

    Hello.
    Due to the necessary libraries, I need to create a DLL in Visual C++ to be called from my Java class:
    System.loadLibrary("my_dll_name");
    But I've got a problem: I'm newbie in Visual C++ and I would like to debug the DLL, so when I press F5 (Go for Debug mode), I get the message "Please specify the executable file". Obviously, I've got a DLL, not an .exe or .com file.
    I would be extremely obliged if anybody could share any experience.
    Thank you very much.

    What you nee to do is this:
    Run your java app (in an IDE if poss.) and have it pause at some point (if its a command line app., wait for a key, if its a Swing app, you're ok, just wait for the app. to appear. Now start VC6 and go
    menus:
    Build/StartDebug/Attach to process. Ther should be one process calleed java. Attach to that. If your DLL has debug info in it, you should be able to navigae to the source and set breakpoints etc.
    Alternativly, you could just put OutputDebugString(...) (this is a Win32 function) statements in your DLL and use DBMON.EXE (from the win32 SDK) to look at the output.

  • Version of jvm.dll compatible with 64-bit development on Visual Studio 2013?

    Hi.  I am building a 64-bit C++ application under Visual Studio 2013. I am using jvm.dll to call Java methods from within the application.  The issue is that the version of jvm.dll that is distributed with Java 7 and Java 8 are compiled with Visual Studio 2010 (and thus rely on the msvcr100.dll runtime library).  This makes it very dangerous to use with a Visual Studio 2013 application which uses msvcr120.dll (mixing runtime libraries is a very big no-no).  I am seeing random memory errors as a result, at the JNI interface level.
    Is there any way to get a version of jvm.dll that is compiled with Visual Studio 2013 and is thus dependent on msvcr120.dll?
    Thanks,
    Dan

    Hello,
    As per your description, remote deployment is not possible for server side code in sharepoint so if you are using server object model then you won't be able to debug or deploy your solution from visual studio.
    VS is not required to installed on UAT/prod server but you need sharepoint along with visual studio in same development machine to develop any custom webpart.
    Once you deploy your custom webpart on site then you will be able to see that webpart in webpart gallery and that gallery is also available in designer so it means you can also add your custom webpart from designer to any page.
    Correct me if i misunderstood you
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Error in Java Runtime Environment when running JNI native library

    Hi,
    I am kinda new to JNI but understand it [and done some tutorials]. I am trying to implement JavaStyle [ a Java vst host that uses JNI ] and have reached a point where i successfully build the native code to a dll, and almost manage to load the native dll library. I do not get a Unsatisfied Link Error, but instead have the JVM close due an internal error.
    I am completely lost and dont know what to try now, and I would appreciate any help offered.
    I have debugged and the error arrives at the System.load line of code:
      static {
        System.out.print("Pre loadLibrary..."); 
        System.loadLibrary("JaVaSTyle");
        System.out.println("JavaStyle dll loaded in JVSTLibrary");
      }Detail: I compiled the native library with MS visual studio .NET 2003 using the project settings supplied from the CVS repository.
    I use Netbeans 6.0 for the java side of things. The console output is:
    # An unexpected error has been detected by Java Runtime Environment:
    #  Internal Error (0xe0434f4d), pid=1500, tid=6012
    # Java VM: Java HotSpot(TM) Client VM (1.6.0_03-b05 mixed mode, sharing)
    # Problematic frame:
    # C  [kernel32.dll+0x12a5b]
    # An error report file with more information is saved as hs_err_pid1500.logand the error report is :
    # An unexpected error has been detected by Java Runtime Environment:
    #  Internal Error (0xe0434f4d), pid=1500, tid=6012
    # Java VM: Java HotSpot(TM) Client VM (1.6.0_03-b05 mixed mode, sharing)
    # Problematic frame:
    # C  [kernel32.dll+0x12a5b]
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    ---------------  T H R E A D  ---------------
    Current thread (0x00297000):  JavaThread "main" [_thread_in_native, id=6012]
    siginfo: ExceptionCode=0xe0434f4d
    Registers:
    EAX=0x0090f4c0, EBX=0x00000001, ECX=0x000b0fd0, EDX=0x00000000
    ESP=0x0090f4bc, EBP=0x0090f510, ESI=0x00000000, EDI=0x00000000
    EIP=0x7c812a5b, EFLAGS=0x00000246
    Top of Stack: (sp=0x0090f4bc)
    0x0090f4bc:   000b0fd0 e0434f4d 00000001 00000000
    0x0090f4cc:   7c812a5b 00000000 791b9d02 02ea1198
    0x0090f4dc:   07624998 000b0fd0 0090f4fc 791be271
    0x0090f4ec:   000ae008 00000002 07624998 00000000
    0x0090f4fc:   0090f50c 791be286 000ae008 07624998
    0x0090f50c:   0090f51c 0090f568 7921020d e0434f4d
    0x0090f51c:   00000001 00000000 00000000 000b0fd0
    0x0090f52c:   0090f578 00000001 7c812a5b 0090f1f0
    Instructions: (pc=0x7c812a5b)
    0x7c812a4b:   8d 7d c4 f3 a5 5f 8d 45 b0 50 ff 15 08 15 80 7c
    0x7c812a5b:   5e c9 c2 10 00 85 ff 0f 8e 36 93 ff ff 8b 55 fc
    Stack: [0x008c0000,0x00910000),  sp=0x0090f4bc,  free space=317k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C  [kernel32.dll+0x12a5b]
    C  [mscorwks.dll+0x6020d]
    C  [mscorwks.dll+0x60190]
    C  [mscorwks.dll+0x60144]
    C  [mscorwks.dll+0xa6dcb]
    C  [mscorwks.dll+0x26a7e]
    C  0x000b15f6
    j  java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;)V+0
    j  java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+300
    j  java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+268
    j  java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/String;)V+54
    j  java.lang.System.loadLibrary(Ljava/lang/String;)V+7
    j  org.tango.JaVaSTyle.JVSTLibrary.<clinit>()V+10
    v  ~StubRoutines::call_stub
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;)V+0
    j  java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+300
    j  java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+268
    j  java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/String;)V+54
    j  java.lang.System.loadLibrary(Ljava/lang/String;)V+7
    j  org.tango.JaVaSTyle.JVSTLibrary.<clinit>()V+10
    v  ~StubRoutines::call_stub
    j  org.tango.JaVaSTyle.Main.main([Ljava/lang/String;)V+3
    v  ~StubRoutines::call_stub
    ---------------  P R O C E S S  ---------------
    Java Threads: ( => current thread )
      0x02a6d800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4752]
      0x02a68c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4472]
      0x02a67800 JavaThread "Attach Listener" daemon [_thread_blocked, id=2016]
      0x02a66c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4328]
      0x02a62400 JavaThread "Finalizer" daemon [_thread_blocked, id=5072]
      0x02a5dc00 JavaThread "Reference Handler" daemon [_thread_blocked, id=5552]
    =>0x00297000 JavaThread "main" [_thread_in_native, id=6012]
    Other Threads:
      0x02a5cc00 VMThread [id=4660]
      0x02a6f000 WatcherThread [id=3864]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation   total 960K, used 199K [0x22970000, 0x22a70000, 0x22e50000)
      eden space 896K,  22% used [0x22970000, 0x229a1ff0, 0x22a50000)
      from space 64K,   0% used [0x22a50000, 0x22a50000, 0x22a60000)
      to   space 64K,   0% used [0x22a60000, 0x22a60000, 0x22a70000)
    tenured generation   total 4096K, used 0K [0x22e50000, 0x23250000, 0x26970000)
       the space 4096K,   0% used [0x22e50000, 0x22e50000, 0x22e50200, 0x23250000)
    compacting perm gen  total 12288K, used 23K [0x26970000, 0x27570000, 0x2a970000)
       the space 12288K,   0% used [0x26970000, 0x26975c48, 0x26975e00, 0x27570000)
        ro space 8192K,  66% used [0x2a970000, 0x2aebf860, 0x2aebfa00, 0x2b170000)
        rw space 12288K,  52% used [0x2b170000, 0x2b7bf078, 0x2b7bf200, 0x2bd70000)
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\Program Files\Java\jdk1.6.0_03\jre\bin\java.exe
    0x7c900000 - 0x7c9b0000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f5000      C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f02000      C:\WINDOWS\system32\RPCRT4.dll
    0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
    0x7c340000 - 0x7c396000      C:\Program Files\Java\jdk1.6.0_03\jre\bin\msvcr71.dll
    0x6d870000 - 0x6daba000      C:\Program Files\Java\jdk1.6.0_03\jre\bin\client\jvm.dll
    0x7e410000 - 0x7e4a0000      C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f57000      C:\WINDOWS\system32\GDI32.dll
    0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
    0x76390000 - 0x763ad000      C:\WINDOWS\system32\IMM32.DLL
    0x5cd70000 - 0x5cd77000      C:\WINDOWS\system32\serwvdrv.dll
    0x5b0a0000 - 0x5b0a7000      C:\WINDOWS\system32\umdmxfrm.dll
    0x003a0000 - 0x003ad000      C:\WINDOWS\system32\myokent.dll
    0x6d3c0000 - 0x6d3c8000      C:\Program Files\Java\jdk1.6.0_03\jre\bin\hpi.dll
    0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d820000 - 0x6d82c000      C:\Program Files\Java\jdk1.6.0_03\jre\bin\verify.dll
    0x6d460000 - 0x6d47f000      C:\Program Files\Java\jdk1.6.0_03\jre\bin\java.dll
    0x6d860000 - 0x6d86f000      C:\Program Files\Java\jdk1.6.0_03\jre\bin\zip.dll
    0x10000000 - 0x10018000      D:\NetbeansWorkspace\myJavaStyle\JaVaSTyle.dll
    0x79170000 - 0x79196000      C:\WINDOWS\system32\mscoree.dll
    0x10480000 - 0x1053c000      C:\WINDOWS\system32\MSVCP71D.dll
    0x10200000 - 0x10287000      C:\WINDOWS\system32\MSVCR71D.dll
    0x77f60000 - 0x77fd6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x77c10000 - 0x77c68000      C:\WINDOWS\system32\msvcrt.dll
    0x791b0000 - 0x79412000      C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorwks.dll
    0x79040000 - 0x79085000      C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
    0x7c9c0000 - 0x7d1d6000      C:\WINDOWS\system32\SHELL32.dll
    0x773d0000 - 0x774d3000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
    0x5d090000 - 0x5d12a000      C:\WINDOWS\system32\comctl32.dll
    0x79780000 - 0x79980000      c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll
    0x774e0000 - 0x7761d000      C:\WINDOWS\system32\ole32.dll
    0x79430000 - 0x7947c000      C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\MSCORJIT.DLL
    0x51a70000 - 0x51af0000      C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\diasymreader.dll
    VM Arguments:
    java_command: org.tango.JaVaSTyle.Main
    Launcher Type: SUN_STANDARD
    Environment Variables:
    CLASSPATH=.;C:\jdk1.5.0_09\bin;C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip
    PATH=C:\Program Files\MiKTeX 2.7\miktex\bin;c:\program files\imagemagick-6.3.7-q16;C:\texmf\miktex\bin;C:\Program Files\ActiveState Komodo IDE 4.2\;C:\Program Files\Autodesk\Maya2008\bin;C:\Python25\;C:\Program Files\PC Connectivity Solution\;C:\ORANT\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\GPS Pathfinder Office 3.00;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls\ENGLISH;C:\Program Files\Common Files\Motorola\Toolbox;C:\PROGRA~1\COMMON~1\Motorola\Toolbox;C:\Program Files\Novell\ZENworks\;C:\Program Files\Novell\SecureLogin;C:\Program Files\Smart Projects\IsoBuster;C:\Latex\MikTeX\V2.10;C:\PROGRA~1\CA\Common\SCANEN~1;C:\Program Files\CA\Common\ScanEngine;C:\Program Files\CA\SharedComponents\CAUpdate\;C:\Program Files\CA\SharedComponents\ThirdParty\;C:\Program Files\CA\SharedComponents\SubscriptionLicense\;C:\PROGRA~1\CA\ETRUST~1;C:\Program Files\QuickTime\QTSystem\;C:\cygwin\bin;C:\Program Files\Tcl\bin;D:\netbeansWorkspace\myJavaStyle;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\Program Files\Csound\bin;C:\Program Files\CVSNT\
    USERNAME=hectorj
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 8, GenuineIntel
    ---------------  S Y S T E M  ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 1 (1 cores per cpu, 1 threads per core) family 6 model 13 stepping 8, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 1047920k(270244k free), swap 2520456k(1654520k free)
    vm_info: Java HotSpot(TM) Client VM (1.6.0_03-b05) for windows-x86, built on Sep 24 2007 22:24:33 by "java_re" with unknown MS VC++:1310

    Something is wrong with the library.
    Staring at java code will not help you figure that out.
    Maybe it isn't intended to be loaded in java but instead it loads java itself?
    If not then write a C/C++ basic app that links that dll in and see if you can at least get it to start.

  • JNI Hotspot Error: Access Violation, need help interpreting the log.

    Hello. I'm a relatively new developer (previously an engineer), and so to start me off I was given the task of providing a JNI-enabled interface to some legacy licensing software (it's C++, we want Java). Now the functionality of JNI is not the problem I have. I HAD those types of problems but now I'm having a far more obscure problem that is absolutely stumping me.
    It's a Hotspot error that I cannot get rid off... and I cannot find a clear bit of info on how to interpret them.
    About the problem...first off this does not happen on my development machine, where it is isolated from other components in the end-product. The integration machine with the rest of the software runs fine with a "Dummy" version of my component, but we get errors when the real version is in use. I'd really appreciate any help in understanding these things, even if it is just some general pointers.
    First off here is the log
    # An unexpected error has been detected by HotSpot Virtual Machine:
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c82caa4, pid=5516, tid=4420
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_14-b03 mixed mode)
    # Problematic frame:
    # C  [ntdll.dll+0x2caa4]
    ---------------  T H R E A D  ---------------
    Current thread (0x0aa1eaa0):  JavaThread "btpool0-5" [_thread_in_native, id=4420]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000004
    Registers:
    EAX=0x0b1a9a40, EBX=0x00030000, ECX=0x00001448, EDX=0x00000000
    ESP=0x0c90e774, EBP=0x0c90e780, ESI=0x0b1a9a38, EDI=0x0b1aa000
    EIP=0x7c82caa4, EFLAGS=0x00010246
    Top of Stack: (sp=0x0c90e774)
    0x0c90e774:   00030000 00000003 00030005 0c90e7b8
    0x0c90e784:   7c833a2a 0b1a9a4c 0b1aa000 0c90e7ac
    0x0c90e794:   00000000 00000477 00030178 00030000
    0x0c90e7a4:   0ab2de05 0003015c 00000600 0afd0000
    0x0c90e7b4:   00030178 0c90e9e4 7c82b5fb 04030000
    0x0c90e7c4:   000023b8 000023ac 00000000 7c829fd6
    0x0c90e7d4:   7c82a124 00031138 0c90ea04 7c82a0b8
    0x0c90e7e4:   7c82a0fc 000001ba 00000000 7c829fd6
    Instructions: (pc=0x7c82caa4)
    0x7c82ca94:   63 02 00 8b 4e 0c 8d 46 08 8b 10 89 4d 08 8b 09
    0x7c82caa4:   3b 4a 04 89 55 0c 0f 85 ae 4f 01 00 3b c8 0f 85
    Stack: [0x0c8d0000,0x0c910000),  sp=0x0c90e774,  free space=249k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C  [ntdll.dll+0x2caa4]
    C  [ntdll.dll+0x33a2a]
    C  [ntdll.dll+0x2b5fb]
    C  [MSVCRT.dll+0x1d08c]
    C  [verify.dll+0x4897]
    C  [verify.dll+0x19c6]
    C  [verify.dll+0x126b]
    C  [java.dll+0x3fb7]
    V  [jvm.dll+0x11d86a]
    V  [jvm.dll+0x78acb]
    V  [jvm.dll+0x78deb]
    V  [jvm.dll+0x78aaa]
    V  [jvm.dll+0xcb029]
    V  [jvm.dll+0xcbcc6]
    V  [jvm.dll+0xcbbac]
    V  [jvm.dll+0x82c7b]
    j  com.a.b.c.lmv.Factoralproducer.MeanManagerImpl.subscribe
    (Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;
    Lcom/a/b/c/lmv/baseFactoral/TopicExpressionType;Ljava/lang/Boolean;
    Lorg/oasis_open/docs/wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;
    Lorg/oasis_open/docs/
    wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;
    Lcom/a/b/c/lmv/Factoralproducer/MeanPolicyType;Ljavax/xml/datatype/XMLGregorianCalendar;
    Lcom/a/b/c/lmv/types/ppoToken;)
    Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;+231
    j  com.a.b.c.lmv.Factoralproducer.FactoralProducerImpl.subscribe
    (Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;
    Lcom/a/b/c/lmv/baseFactoral/TopicExpressionType;Ljava/lang/Boolean;Lorg/oasis_open/docs/wsrf/_2004/_06/
    wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;Lorg/oasis_open/docs/
    wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;Lcom/a/b/c/lmv
    /Factoralproducer/MeanPolicyType;Ljavax/xml/datatype/XMLGregorianCalendar;Lcom/a/b/c/lmv/types/ppoToken;)
    Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;+20
    v  ~StubRoutines::call_stub
    V  [jvm.dll+0x875dd]
    V  [jvm.dll+0xdfd96]
    V  [jvm.dll+0x874ae]
    V  [jvm.dll+0xf3f82]
    V  [jvm.dll+0xa5752]
    C  [java.dll+0x6d4f]
    j  sun.reflect.NativeMethodAccepporImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
    J  sun.reflect.DelegatingMethodAccepporImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    J  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    v  ~RuntimeStub::alignment_frame_return Runtime1 stub
    j  org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Lorg/apache/cxf/message/Exchange;
    Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+57
    j  org.apache.cxf.service.invoker.AbstractInvoker.invoke(Lorg/apache/cxf/message/Exchange;Ljava/lang/Object;
    Ljava/lang/reflect/Method;Ljava/util/List;)Ljava/lang/Object;+26
    j  org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(Lorg/apache/cxf/message/Exchange;Ljava/lang/Object
    ;Ljava/lang/reflect/Method;Ljava/util/List;)Ljava/lang/Object;+179
    j  org.apache.cxf.service.invoker.AbstractInvoker.invoke(Lorg/apache/cxf/message/Exchange;Ljava/lang/Object;)
    Ljava/lang/Object;+114
    j  org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run()V+26
    j  org.apache.cxf.workqueue.SynchronousExecutor.execute(Ljava/lang/Runnable;)V+1
    j  org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Lorg/apache/cxf/message/Message;)V+94
    j  org.apache.cxf.phase.PhaseInterceptorChain.dcntercept(Lorg/apache/cxf/message/Message;)Z+76
    j  org.apache.cxf.transport.ChainInitiationObserver.onMessage(Lorg/apache/cxf/message/Message;)V+137
    j  org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;)V+334
    j  org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;)V+341
    j  org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+47
    j  org.mortbay.jetty.handler.ContextHandler.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+700
    j  org.mortbay.jetty.handler.ContextHandlerCollection.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+272
    j  org.mortbay.jetty.handler.HandlerWrapper.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+23
    j  org.mortbay.jetty.Server.handle(Lorg/mortbay/jetty/HttpConnection;)V+110
    j  org.mortbay.jetty.HttpConnection.handleRequest()V+131
    J  org.mortbay.jetty.HttpParser.parseNext()J
    v  ~RuntimeStub::alignment_frame_return Runtime1 stub
    j  org.mortbay.jetty.HttpParser.parseAvailable()J+1
    j  org.mortbay.jetty.HttpConnection.handle()V+122
    j  org.mortbay.jetty.bio.SocketConnector$Connection.run()V+130
    j  org.mortbay.jetty.security.SslSocketConnector$SslConnection.run()V+51
    j  org.mortbay.thread.BoundedThreadPool$PoolThread.run()V+45
    v  ~StubRoutines::call_stub
    V  [jvm.dll+0x875dd]
    V  [jvm.dll+0xdfd96]
    V  [jvm.dll+0x874ae]
    V  [jvm.dll+0x8720b]
    V  [jvm.dll+0xa2089]
    V  [jvm.dll+0x1112e8]
    V  [jvm.dll+0x1112b6]
    C  [MSVCRT.dll+0x2b530]
    C  [kernel32.dll+0x24829]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  com.a.b.c.lmv.Factoralproducer.MeanManagerImpl.subscribe
    (Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;Lcom/a/b/c/lmv/baseFactoral/TopicExpressionType;
    Ljava/lang/Boolean;Lorg/oasis_open/docs/wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;
    Lorg/oasis_open/docs/
    wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;Lcom/a/b/c/lmv/Factoralproducer/MeanPolicyType;
    Ljavax/xml/datatype/XMLGregorianCalendar;Lcom/a/b/c/lmv/types/ppoToken;)
    Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;+231
    j  com.a.b.c.lmv.Factoralproducer.FactoralProducerImpl.subscribe
    (Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;Lcom/a/b/c/lmv/baseFactoral/TopicExpressionType;
    Ljava/lang/Boolean;Lorg/oasis_open/docs/wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;
    Lorg/oasis_open/docs/
    wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;Lcom/a/b/c/lmv/Factoralproducer
    /MeanPolicyType;Ljavax/xml/datatype/XMLGregorianCalendar;Lcom/a/b/c/lmv/types/ppoToken;)
    Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;+20
    v  ~StubRoutines::call_stub
    j  sun.reflect.NativeMethodAccepporImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)
    Ljava/lang/Object;+0
    j  sun.reflect.NativeMethodAccepporImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
    J  sun.reflect.DelegatingMethodAccepporImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    J  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    v  ~RuntimeStub::alignment_frame_return Runtime1 stub
    j  org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Lorg/apache/cxf/message/
    Exchange;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+57
    j  org.apache.cxf.service.invoker.AbstractInvoker.invoke(Lorg/apache/cxf/message/Exchange;
    Ljava/lang/Object;Ljava/lang/reflect/Method;Ljava/util/List;)Ljava/lang/Object;+26
    j  org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(Lorg/apache/cxf/message/Exchange;
    Ljava/lang/Object;Ljava/lang/reflect/Method;Ljava/util/List;)Ljava/lang/Object;+179
    j  org.apache.cxf.service.invoker.AbstractInvoker.invoke(Lorg/apache/cxf/message/Exchange;Ljava/lang/Object;)
    Ljava/lang/Object;+114
    j  org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run()V+26
    j  org.apache.cxf.workqueue.SynchronousExecutor.execute(Ljava/lang/Runnable;)V+1
    j  org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Lorg/apache/cxf/message/Message;)V+94
    j  org.apache.cxf.phase.PhaseInterceptorChain.dcntercept(Lorg/apache/cxf/message/Message;)Z+76
    j  org.apache.cxf.transport.ChainInitiationObserver.onMessage(Lorg/apache/cxf/message/Message;)V+137
    j  org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;)V+334
    j  org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;)V+341
    j  org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+47
    j  org.mortbay.jetty.handler.ContextHandler.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+700
    j  org.mortbay.jetty.handler.ContextHandlerCollection.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+272
    j  org.mortbay.jetty.handler.HandlerWrapper.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+23
    j  org.mortbay.jetty.Server.handle(Lorg/mortbay/jetty/HttpConnection;)V+110
    j  org.mortbay.jetty.HttpConnection.handleRequest()V+131
    J  org.mortbay.jetty.HttpParser.parseNext()J
    v  ~RuntimeStub::alignment_frame_return Runtime1 stub
    j  org.mortbay.jetty.HttpParser.parseAvailable()J+1
    j  org.mortbay.jetty.HttpConnection.handle()V+122
    j  org.mortbay.jetty.bio.SocketConnector$Connection.run()V+130
    j  org.mortbay.jetty.security.SslSocketConnector$SslConnection.run()V+51
    j  org.mortbay.thread.BoundedThreadPool$PoolThread.run()V+45
    v  ~StubRoutines::call_stub
    ---------------  P R O C E S S  ---------------
    Java Threads: ( => current thread )
      0x0aa2d9f8 JavaThread "RMI RenewClean-[47.166.94.29:3617]" daemon [_thread_in_native, id=4792]
    =>0x0aa1eaa0 JavaThread "btpool0-5" [_thread_in_native, id=4420]
      0x0aa1c450 JavaThread "btpool0-4" [_thread_in_native, id=4600]
      0x0aa574d0 JavaThread "btpool0-3" [_thread_in_native, id=3456]
      0x0aa61c60 JavaThread "RMI ConnectionExpiration-[localhost:8099]" daemon [_thread_blocked, id=5060]
      0x0aa44988 JavaThread "btpool0-2" [_thread_in_native, id=3956]
      0x0aa2f270 JavaThread "RMI LeaseChecker" daemon [_thread_blocked, id=4640]
      0x0aa2e668 JavaThread "RMI TCP Connection(1)-47.166.94.29" daemon [_thread_in_native, id=1600]
      0x0aa40d48 JavaThread "RMI Reaper" [_thread_blocked, id=4696]
      0x0b20ae68 JavaThread "Timer-0" daemon [_thread_blocked, id=4688]
      0x0aa294f8 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=4884]
      0x0aa29680 JavaThread "RMI ConnectionExpiration-[47.166.94.29:4375]" daemon [_thread_blocked, id=4860]
      0x0abfe318 JavaThread "btpool0-1" [_thread_in_native, id=716]
      0x0ac2b1f0 JavaThread "GC Daemon" daemon [_thread_blocked, id=3588]
      0x0ac26730 JavaThread "RMI RenewClean-[47.166.94.29:4375]" daemon [_thread_blocked, id=1820]
      0x0ab92d70 JavaThread "btpool1-0 - Acceptor0 [email protected]:9082" [_thread_in_native, id=3168]
      0x0b162be0 JavaThread "btpool0-0 - Acceptor0 [email protected]:9080" [_thread_in_native, id=5856]
      0x0b0e7a18 JavaThread "RMManager-Timer-12388840" daemon [_thread_blocked, id=4328]
      0x00035088 JavaThread "DestroyJavaVM" [_thread_blocked, id=4780]
      0x0afc6460 JavaThread "Thread-1" [_thread_blocked, id=440]
      0x0afd6768 JavaThread "Thread-0" daemon [_thread_blocked, id=4840]
      0x00814cc8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3076]
      0x00813950 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3248]
      0x00812cc8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5140]
      0x00809bf8 JavaThread "Finalizer" daemon [_thread_blocked, id=3704]
      0x00808780 JavaThread "Reference Handler" daemon [_thread_blocked, id=5196]
    Other Threads:
      0x00804530 VMThread [id=736]
      0x00816058 WatcherThread [id=4436]
    VM state:not at safepcnt (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation   total 1984K, used 1897K [0x02850000, 0x02a70000, 0x02d30000)
    *eden space 1792K,  95% used [0x02850000, 0x029fa418, 0x02a10000)*
    * from space 192K, 100% used [0x02a40000, 0x02a70000, 0x02a70000)*
      to   space 192K,   0% used [0x02a10000, 0x02a10000, 0x02a40000)
    tenured generation   total 25896K, used 18178K [0x02d30000, 0x0467a000, 0x06850000)
       the space 25896K,  70% used [0x02d30000, 0x03ef0b60, 0x03ef0c00, 0x0467a000)
    compacting perm gen  total 22784K, used 22721K [0x06850000, 0x07e90000, 0x0a850000)
      * the space 22784K,  99% used [0x06850000, 0x07e806c8, 0x07e80800, 0x07e90000)*
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x0040d000      D:\apps\Java\jre1.5.0_14\bin\java.exe
    0x7c800000 - 0x7c8c0000      C:\WINDOWS\system32\ntdll.dll
    0x77e40000 - 0x77f42000      C:\WINDOWS\system32\kernel32.dll
    0x77f50000 - 0x77feb000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77c50000 - 0x77cef000      C:\WINDOWS\system32\RPCRT4.dll
    0x76f50000 - 0x76f63000      C:\WINDOWS\system32\Secur32.dll
    0x77ba0000 - 0x77bfa000      C:\WINDOWS\system32\MSVCRT.dll
    0x6d640000 - 0x6d7de000      D:\apps\Java\jre1.5.0_14\bin\client\jvm.dll
    0x77380000 - 0x77411000      C:\WINDOWS\system32\USER32.dll
    0x77c00000 - 0x77c48000      C:\WINDOWS\system32\GDI32.dll
    0x76aa0000 - 0x76acd000      C:\WINDOWS\system32\WINMM.dll
    0x71bc0000 - 0x71bc8000      C:\WINDOWS\system32\rdpsnd.dll
    0x771f0000 - 0x77201000      C:\WINDOWS\system32\WINSTA.dll
    0x71c40000 - 0x71c97000      C:\WINDOWS\system32\NETAPI32.dll
    0x76b70000 - 0x76b7b000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d290000 - 0x6d298000      D:\apps\Java\jre1.5.0_14\bin\hpi.dll
    0x6d610000 - 0x6d61c000      D:\apps\Java\jre1.5.0_14\bin\verify.dll
    0x6d310000 - 0x6d32d000      D:\apps\Java\jre1.5.0_14\bin\java.dll
    0x6d630000 - 0x6d63f000      D:\apps\Java\jre1.5.0_14\bin\zip.dll
    0x68000000 - 0x68035000      C:\WINDOWS\system32\rsaenh.dll
    0x7c8d0000 - 0x7d0cf000      C:\WINDOWS\system32\SHELL32.dll
    0x77da0000 - 0x77df2000      C:\WINDOWS\system32\SHLWAPI.dll
    0x77420000 - 0x77523000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls
                                           _6595b64144ccf1df_6.0.3790.3959_x-ww_D8713E55\comctl32.dll
    0x6d4d0000 - 0x6d4e3000      D:\apps\Java\jre1.5.0_14\bin\net.dll
    0x71c00000 - 0x71c17000      C:\WINDOWS\system32\WS2_32.dll
    0x71bf0000 - 0x71bf8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71b20000 - 0x71b61000      C:\WINDOWS\System32\mswsock.dll
    0x76ed0000 - 0x76efa000      C:\WINDOWS\system32\DNSAPI.dll
    0x76f70000 - 0x76f77000      C:\WINDOWS\System32\winrnr.dll
    0x76f10000 - 0x76f3e000      C:\WINDOWS\system32\WLDAP32.dll
    0x76f80000 - 0x76f85000      C:\WINDOWS\system32\rasadhlp.dll
    0x5f270000 - 0x5f2ca000      C:\WINDOWS\system32\hnetcfg.dll
    0x71ae0000 - 0x71ae8000      C:\WINDOWS\System32\wshtcpip.dll
    0x6d4f0000 - 0x6d4f9000      D:\apps\Java\jre1.5.0_14\bin\nio.dll
    0x6d5f0000 - 0x6d5f6000      D:\apps\Java\jre1.5.0_14\bin\rmi.dll
    0x10000000 - 0x10006000      C:\Program Files\a\lmv\punix.dll
    0x71f50000 - 0x71f58000      C:\WINDOWS\system32\snmpapi.dll
    0x0bb90000 - 0x0bb98000      C:\Program Files\a\lmv\periwin.dll
    0x0bba0000 - 0x0bbab000      C:\Program Files\a\lmv\vas.dll
    0x0bbb0000 - 0x0bbd0000      C:\Program Files\a\lmv\nilm.dll
    0x48890000 - 0x488cd000      C:\WINDOWS\system32\ODBC32.dll
    0x77530000 - 0x775c7000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls
                                            _6595b64144ccf1df_5.82.3790.3959_x-ww_78FCF8D0\COMCTL32.dll
    0x762b0000 - 0x762f9000      C:\WINDOWS\system32\comdlg32.dll
    0x76cf0000 - 0x76d0a000      C:\WINDOWS\system32\iphlpapi.dll
    0x7f010000 - 0x7f134000      C:\WINDOWS\system32\MFC42u.DLL
    0x77670000 - 0x777a9000      C:\WINDOWS\system32\ole32.dll
    0x77d00000 - 0x77d8b000      C:\WINDOWS\system32\OLEAUT32.dll
    0x77210000 - 0x772bb000      C:\WINDOWS\system32\WININET.dll
    0x761b0000 - 0x76243000      C:\WINDOWS\system32\CRYPT32.dll
    0x76190000 - 0x761a2000      C:\WINDOWS\system32\MSASN1.dll
    0x71bb0000 - 0x71bb9000      C:\WINDOWS\system32\WSOCK32.dll
    0x0bda0000 - 0x0bdb7000      C:\WINDOWS\system32\odbcint.dll
    0x0bf20000 - 0x0bf61000      C:\Program Files\a\lmv\JniLib.dll
    0x76cd0000 - 0x76ce9000      C:\WINDOWS\system32\MPRAPI.dll
    0x76df0000 - 0x76e24000      C:\WINDOWS\system32\ACTIVEDS.dll
    0x76dc0000 - 0x76de8000      C:\WINDOWS\system32\adsldpc.dll
    0x76b80000 - 0x76bae000      C:\WINDOWS\system32\credui.dll
    0x76a80000 - 0x76a98000      C:\WINDOWS\system32\ATL.DLL
    0x76e30000 - 0x76e3c000      C:\WINDOWS\system32\rtutils.dll
    0x7e020000 - 0x7e02f000      C:\WINDOWS\system32\SAMLIB.dll
    0x770e0000 - 0x771e8000      C:\WINDOWS\system32\SETUPAPI.dll
    0x77840000 - 0x77882000      C:\WINDOWS\system32\netman.dll
    0x76300000 - 0x764c0000      C:\WINDOWS\system32\netshell.dll
    0x74de0000 - 0x74df2000      C:\WINDOWS\system32\CLUSAPI.dll
    0x76e90000 - 0x76ecf000      C:\WINDOWS\system32\RASAPI32.dll
    0x76e40000 - 0x76e52000      C:\WINDOWS\system32\rasman.dll
    0x76e60000 - 0x76e8f000      C:\WINDOWS\system32\TAPI32.dll
    0x7fcf0000 - 0x7fd7e000      C:\WINDOWS\system32\WZCSvc.DLL
    0x76cc0000 - 0x76cc5000      C:\WINDOWS\system32\WMI.dll
    0x76d10000 - 0x76d2f000      C:\WINDOWS\system32\DHCPCSVC.DLL
    0x76f00000 - 0x76f08000      C:\WINDOWS\system32\WTSAPI32.dll
    0x4b180000 - 0x4b284000      C:\WINDOWS\system32\ESENT.dll
    0x730a0000 - 0x730ae000      C:\WINDOWS\system32\WZCSAPI.DLL
    VM Arguments:
    java_command: C:\Program Files\a\lmv\CDF\b_c_lmv.jar C:\Program Files\a\lmv\CDF
    Launcher Type: SUN_STANDARD
    Environment Variables:
    CLASSPATH=D:\a\Contact Center\Common Components\Cache\lib
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;
    C:\Program Files\Rational\ClearCase\bin;C:\Program Files\Rational\common;
    C:\a\Cache\CacheSys\Mgr\a\DLL;C:\Program Files\a\lmv\TAPI;C:\Program Files\a\lmv\
    OS=Windows_NT
    PROCEppoR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel
    ---------------  S Y S T E M  ---------------
    OS: Windows Server 2003 family Build 3790 Service Pack 2
    CPU:total 4 (cores per cpu 4, threads per core 1) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(3537076k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_14-b03) for windows-x86, built on Oct  5 2007 01:21:52 by "java_re" with MS VC++ 6.0
    {code}
    Sorry it's so long.
    Anyways my dll is Jni_interface.dll. It loads legacy.dll, and its dependents. Other code also uses these libraries.
    *So question 1* :
    I load the jni_interface.dll (and also the legacy.dll and its dependents) library at the start of execution in a static class and so it is never unloaded. I do this because the legacy.dll will be calling functions in my Jni_Interface.dll, which are propagated into the Java class on top of it all. Does this stop other code from loading the legacy.dll or from using its functionality?
    *On to question 2*:
    Here is the logged output from my library, immediately before the crash:
    {code:java}
          ***     JNI INTERFACE LIB - LOG 21 Jul 08 19:11:35.682     *** Log Level = DEBUG
    21 Jul 08 19:11:35.698 - Level[ info ] -          Thread[ 716 ]     :: initRegistry     Registry initialisation ok
    21 Jul 08 19:11:35.760 - Level[ info ] -          Thread[ 716 ]     :: vPersistData     vPersistData() called
    21 Jul 08 19:11:35.823 - Level[ debug ] -     Thread[ 716 ]     :: doVoidCallback() [ persistDataHandler ]       Signature  = (I)V
    21 Jul 08 19:11:35.823 - Level[ debug ] -     Thread[ 716 ]     :: doVoidCallback() [ setMaxUsageHandler ]       Signature  = (I)V
    21 Jul 08 19:11:35.838 - Level[ info ] -          Thread[ 716 ]     :: Constructor     _instance is instantiated
    21 Jul 08 19:11:35.838 - Level[ info ] -          Thread[ 716 ]     :: initiateLegacy()     JniManager initialisation successful
    21 Jul 08 19:11:35.838 - Level[ info ] -          Thread[ 716 ]     :: initiateLegacy()     Initial state is NORMAL
    21 Jul 08 19:11:35.838 - Level[ debug ] -     Thread[ 716 ]     :: getLicense()     Get request
    21 Jul 08 19:11:36.010 - Level[ debug ] -     Thread[ 716 ]     :: getLicense()     Get request
    {code}
    Now notice that the current thread in the Hotspot output is NOT the thread in my library. Thread 716 is a java thread by the way. This log appears absolutely fine according to me. Also note that in the hotspot log there is no mention of my java component  (the "boss" class), which is called LegacyLM. So does that mean that is in not to do with my code even though the problem only occurs when my component is included? Or is this just the cryptic nature of these problems?
    *Question 3*:
    If you see the heap section of the report, there are 3 items that I have highlighted that seem like very high values. Is this a possible cause of a crash? Or would I have received an "Out of space" error instead?
    In terms of actual code, I cannot post much, but I can tell you what I have done to try to solve the problem:
    (i) I have added mutex synchronisation to most of my shared variables.
    (ii) I have used monitorEnter and MonitorExit to control callback access to my java class.
    (iii) I have re-organised my code and replaced nearly every occurance of non-string character arrays with string equivalents.
    (iv) I changed how I attach and detach my threads so that I only attach/detach ones that previously were not (i.e. I leave java threads alone)
    As I said at the start, I am utterly confused and I don't have much of an idea about how to proceed. I'd really really appreciate a pointer or two.
    Thanks in advance.
    D
    Edited by: Diom1982 on Jul 21, 2008 12:35 PM
    Edited by: Diom1982 on Jul 21, 2008 12:40 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    For those of you who might be interested, I found a solution to this problem (my version, at least). In my situation, this was caused by attempting to access the fields of a ActionEvent object in VC++ by casting a variant to a BSTR. While the cast "worked", it somehow caused the state of the Java plugin or the AxBridge DLL to get flummoxed, causing the VM dump far downstream.
    The takehome message?
    When seeing problems like this in the plugin / ActiveX bridge, do not assume that the causative error is occuring in the location noted in the stack trace. Visual C++, in all of its gory unprotected glory, gives full memory access to the DLL interface and you can do a serious fandango on the VM core. that won't necessarily bite you until later.
    PS -- Sun gurus ... does this present a security violation in the Java paradigm?

  • An unhandled win32 exception occured in java.exe , While running JNI

    I'm trying to use JNI to call 3rd party VB DLL , like this
    JNI <> VC++ DLL <> VB DLL
    In VC++DLL ,I have function(named Open) that call 3 function in VBDLL
    I have tested c++ code this function (by copy it and paste in normal vc++ project) ,and It works !
    But when I call this function(Open) via JNI , I've got "An unhandled win32 exception occured in java.exe" by Visual Studio Just-in-Time Debugger !!
    I think the problem is in the 3rd function that I call in Open, because when I remove the 3rd function It doesn't raise any exception.
    Before I do this, I alrealdy test every function in VBDLL in VB Project , and they work fine (Include the 3rd function that I think It cause exception).
    Can anybody tell me what's going on here ?
    or anything that I can do to fine What cause this problem ?
    Thanks in advance ^^
    Edited by: voteforpedro on Sep 2, 2008 4:18 AM

    You either have a pointer problem or you are calling the 3rd party library in an unexpected fashion.
    In terms of testing the most likely reason is that it wasn't tested enough. Moving/changing code modifies the layout in memory which can expose previously hidden pointer problems.

  • C++ do not support  JNi && how to return the array from jni?

    hi,
    1.. I have created the Cpp file to implemement the native method but it seems that the native method can not complie rightly , it tells me follows
    error C2819: type 'JNIEnv_' does not have an overloaded member 'operator ->'
    c:\program files\microsoft visual studio\vc98\include\jni.h(764) : see declaration of 'JNIEnv_'
    c:\users\wangyue\desktop\java_gui\beattrack 5.6 - ������_������_������������ 5.7\beattrack.cpp(202) : error C2227: left of '->GetByteArrayRegion' must point to class/struct/union
    then I use the c file to paste the same code, it can complie rightly , why? I really need my native method to complie rightly in Cpp file, how to solve it?
    2.I want to return a double, for the most simple way, I do the following
    #include "RealBeatTrack_BeatTrack.h"
    JNIEXPORT jdoubleArray JNICALL Java_playaudio_BeatTrack_BeatTrack
    (JNIEnv *env, jobject j, jbyteArray data)
    jdouble outdata[4]={1,2,3,4};
    return (*env)->NewDoubleArray(env, outdata);
    then in the java code, I difine a array to receive it,
    say double mydata[] = new double[4];
    mydata= BeatTrack(buffedata);
    but the java comlier tells me the Exception in thread "Thread-2" java.lang.OutOfMemoryError: Java heap space?
    anyone can help me?
    Thanks

    thanks for your reply
    another problem of my!
    the jni pass the string, I then convert it to the
    const char* filename = env->GetStringUTFChars(fname,NULL);
    then I use the filename to opent the file but fails, what is the problem???
    FILE *fp= fopen(filename,"w"); // there are some problem here!!!
         fprintf(fp, "%s\n","wangyue fighting!");
    the error is as follows
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0bfc1a55, pid=7040, tid=11384
    # Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode windows-x86)
    # Problematic frame:
    # C [beattrack.dll+0x1a55]
    # An error report file with more information is saved as:
    # D:\programs\playAudio\hs_err_pid7040.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    #

  • How to use a C# dll with JNI

    After a ton of issues, I finally got this working properly. I've come across a lot of forum posts about the various problems and VERY few answers so I thought I would post my solution here.
    To do this, you need to create a managed C++ layer in between C# and java. The JNI functions in C++ dll can make calls to the C# dll directly, and your java program can make calls directly to the native JNI functions. Some important notes on using C# classes in C++ are:
    -gcroot<CSClass ^> should be used on any objects that are instances of some C# class.
    -the symbol ^ should be used with all C# references (its the symbol for references)
    -gcnew should be used to allocate C# objects
    -in visual studio, add the C# dll as a reference rather than using #using <CsDLL.dll>
    -do not use #using <CsDLL.dll>
    The next issue is loading the libraries. By adding the folder your C++ dll is located in to the Djava.library.path VM argument, you can load your C++ library with System.LoadLibrary("Cppdll.dll"). You DO NOT need to load the C# dll in your java program. In fact, it will ignore you if you try. The problem with loading this dll is with how the CLR searches for referenced assemblies. The CLR First searches the DEVPATH environment variable (if the machine.config file has developer mode set to on), then it searches the GAC, then it searches the codebases, then it searchs the current executable's directory along with a list of definable subdirectories (probes).
    DEVPATH is a decent option, but it requires modifying the machine.config file to be in developer mode. Once that is done, it acts just like the PATH environment variable.
    If your C# dlls are strongly named, I would recommend adding them to the GAC or using codebases. However I have not done this and am not sure how.

    Hi,
    i have to use a c# dll in my java program .by following this link http://www.codeproject.com/KB/cross-platform/javacsharp.aspx i done that.but it is working for only one c# program.if i am trying to use a dll it is throwing error
    # An unexpected error has been detected by Java Runtime Environment:
    # Internal Error (0xe0434f4d), pid=3988, tid=3704
    # Java VM: Java HotSpot(TM) Client VM (11.0-b16 mixed mode, sharing windows-x86)
    # Problematic frame:
    # C [kernel32.dll+0x442eb]
    # An error report file with more information is saved as:
    # D:\Work\EclipseWorkspace\HelloInflux\hs_err_pid3988.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    Please help me out. i want a few steps to invoke a c# dll by using jni

  • JNI : cannot create JVM

    Hello everybody, sorry to bother all of you.
    I got problem with the JNI.
    I'm creating a Windows service that invoking a Java-based server via JNI.
    I'm copying the source from the JNI tutorial (from sun), and the problem is:
    res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args);
    res will result < 0, means it failed/cannot create Java VM.
    I read on JNI tutorial that said the problem is because it cannot locate the JVM, or in other words, it cannot found the java library.
    I'm using JDK 1.4.1_01 now, and Microsoft Visual C++.
    I'm installing the JDK under "C:\Java\J2SE"
    and I'm compile the c program inside "C:\Program Files\Microsoft Visual Studio\VC98\Bin", and I'm also copied the JVM.DLL into this directory, since it's needed when i'm running the exe file.
    I already set the vm_args.version into JNI_VERSION_1_4 (0x00010004)
    Does anybody know the workaround about this problem?
    what directory should I put into vm_args.classpath? is it ".;C:\Java\J2SE\lib" ?
    Thanks anyway.
    Regards,
    Loekito

    Here's some stuff I can tell you.
    1. dont copy the JVM.dll anywhere. Use the registry to find out where it is installed and then load it dynamically.
    2. look at the laucnher directory in the src.zip file in the j2sdk. there are some examples in there you should find handy.

Maybe you are looking for

  • Libre office can not start in arch with lxde (clucene was installed)

    installed Arch on Asus Eee Pc 900 (very old, cpu - 900 MHz, ram 1 G) then installed lxde and libre office. the problem is that Libre Office can not start and show the message with a language I don't understand. It say that: LibreOffice 4.0-Fatal Erro

  • Hello all - Newbie here wanting help transferring files

    Hello all Have had my Blackberry Curve for a couple of months and have mastered the basics.  I did transfer music and photo's from my PC to my Blackberry fine but all of a sudden there is a problem with this.....I can't transfer anything to my Blackb

  • How to upgrade my BB OS without BB Link?

    Hi, I just got a new BB Q-10 a week ago and it it is currently running OS 10.1.0.314. I have a notification of Blackberry OS update in BB Hub. Now the problem is that I am somehow unable to install BB Link on my PC (running Windows 8.1) as it says th

  • Nokia2730

    hiiiiii everyone. i am using my nokia2730c and it show error while opening ovistore "conflicting application show items".is anyone has it solution. thnks in advance.

  • Excessive redo generation in Production DB?

    my production database is generation lot of redo's since one month.Nearly 45 redo's its archiving per hour.b4 it use to generate 2 redo's per hour.The size of redolog file is 300M and we are having 3 redogroups.I want to know what is causing this muc