Problem with JNI

i have to implement a few standard APIs. As a part of the implementation I have to provide references to an object I create. Now my underlying code is C++ with JNI used to throw the Java APIs. Problem is JNI now returns different references for the same object and hence my prupose id defeated. Could anyone suggest how this problem can be overcome.

I tried to figure out what your problem is, but can't. Please rephrase it and give a bit more detail on what you are doing and what is going wrong.

Similar Messages

  • Awkward problems with JNI on J2SE 5.0

    I'm experiencing a strange problem with JNI and I hope someone can help me out.I've installed Cygwin, MinGW and then the CDT plug-in for Eclipse C/C++ development. This means I've used the MinGW make utility. It successfully creates the DLL file, but for some awkward reason, function www_tutorial_jni_HelloWorld_displayHelloWorld cannot be found (UnsatisfiedLinkError: displayHelloWorld).
    The Java class looks like this:
    package www.tutorial.jni;
    public class HelloWorld {
        public native void displayHelloWorld();
        static {
            System.loadLibrary("hello");
        public static final void main(String[] args) {
             try {
                  HelloWorld hw = new HelloWorld();
                  hw.displayHelloWorld();
             } catch (Exception e) {
                  System.out.println(e.toString());
    }The header that was generated by javah.exe (version 1.5.0_01) looks like this:
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class www_tutorial_jni_HelloWorld */
    #ifndef _Included_www_tutorial_jni_HelloWorld
    #define _Included_www_tutorial_jni_HelloWorld
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     www_tutorial_jni_HelloWorld
    * Method:    displayHelloWorld
    * Signature: ()V
    JNIEXPORT void JNICALL
    Java_www_tutorial_jni_HelloWorld_displayHelloWorld
      (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endifThe C++ implementation looks like this:
    #include <jni.h>
    #include "www_tutorial_jni_HelloWorld.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL
    Java_www_tutorial_jni_HelloWorld_displayHelloWorld(JNIEnv
    *env, jobject obj)
        printf("Hello world!\n");
        return;
    }I've made sure that the fully qualified name of the implementation function is identical to the one in the header. I don't understand why I still get the error; especially since checking the DLL reveals that a function called "Java_www_tutorial_jni_HelloWorld_displayHelloWorld" exists.
    Could someone try and produce a successfull DLL/SO from the C++ code and then try and run the Java part on a 5.0 version of Java? I'm really curious as to what on Earth is going on...

    ... Otherwise, I would have
    to add whatever directory I put my DLL into to the
    PATH variable.Not necessarily. I believe the "PATH" also implicitly includes the "current directory". I also think that most JNI users put their DLL in a directory from which they also launch java (so it's in the current directory).
    >
    ... a java.library.path set.
    If I don't explicitly set a Java library path,
    Eclipse can't even find the DLL. I'm beginning to
    believe that Eclipse somehow screws up running Java
    programs with native code...I don't know about that... Probably just something extra you have to do with your Eclipse project so that it can find the DLL.
    But like I said, I don't really know - just trying to throw out ideas, small as they may be.

  • Problem with JNI and Parallel Port dll

    Hi. I'm doing some testes with JNI. Firs i followed the netbeans tutorial for doing a C programa that prints somthing for java.. like.. "Hello java from C".
    So i tried to load a dll from my dll. Like, I have this dll to use the parallel port on windows Xp. So i created a dll to access it an comunicates eoth java.
    I did everything just fine.
    When I start my Java app, the first thing it does is to load this parallel port dll and configure the functions of it.
    After that .. I get this error
    EXCEPTION_FLT_STACK_CHECK (0xc0000092) at pc=0x0093d269, pid=2284, tid=3000
    Can someone explain why ?
    (Sorry if i wasn't clear enough, english is not my native language, so ask if you don't understand something.. )

    hi ,
    I met the same problem this morning, and searched the www.google.com in order to solve it, as a result, your article was shown on my screen. :)
    Till now I have read some technical information and solved my problems. Maybe the solution be useful to you:
    ==============================
    error message : (Environment : Tomcat 5, Windows 2003, Mysql5)
    2006-3-29 11:53:48 org.apache.catalina.core.StandardWrapper unload
    message: Waiting for 2 instance(s) to be deallocated
    ==============================
    cause: the number of connection to database exceeded.another word,too many connections.
    ==============================
    solution: close the connection when it becomes useless for your program. :)
    ==============================
    ps. Sorry for my weak English . hehe ....

  • Problem with JNI hello world

    I found some tutorial on SUN site on how to use JNI. I'm using Eclipse to compije Java and C (via Cygwin) files. Here are complete files:
    Hello.java:
    class Hello
         public native void sayHello();
         static
              try
              System.loadLibrary("hello");
              catch(Exception e)
                   System.out.println("exc");
         public static void main(String[] args)
              Hello h = new Hello();
              h.sayHello ();
    }Hello.c:
    #include <mingw/_mingw.h> //because there are some types needed for JNI
    #include <jni.h>
    #include "Hello.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL Java_Hello_sayHello
      (JNIEnv *env, jobject obj)
         printf("Hello world!\n");
         return;
    }Makefile:
    hello.dll : Hello.o Hello.def
         gcc -g -shared -Wl,--kill-at -o hello.dll Hello.o hello.def
    Hello.o : Hello.c Hello.h
         gcc -c -g -I"$(JAVA_HOME)\include" -I"$(JAVA_HOME)\include\win32" Hello.c -o Hello.o
    Hello.h : Hello.class
         javah -jni Hello
    clean :
         rm Hello.h
         rm Hello.o
         rm hello.dllHello.def
    EXPORTS
    Java_Hello_sayHelloEverything goes well, but when I run java program it does nothin (it should print message, but it just exit without any error).I'm sure that it's something stupid, but I cant see what. Can anyone tell me what am I doing wrong?
    Thenks.

    Answer 1: yes, there was no problem. I compiled and started simple 'hello world' program from Cygwin and from WinXP console, and it worked well.
    Answer 2: This is weird, I changed code to this:
    Hello.java:
         public native int getInt();
              System.out.println("Returned int is " + h.getInt());Hello.c:
    JNIEXPORT jint JNICALL Java_Hello_getInt
      (JNIEnv *env, jobject obj)
         return 25;
    }It does not print anything. I started this program from Cygwin and from WinXP console, and from Eclipse. Only if I debug in Eclipse (step by step) I get:
    Returned int is 25and still I don't get Hello string printed (even if I go step by step). It looks like cygwin has some problem with OS. Do you have any idea what to do, I'm a bit confused?
    Thank you.
    Message was edited by:
    zly

  • Problem with JNI for target armlinux

    Dear friends,
    We have compiled CVM for ARM Linux and it is working fine for java programs as well as C programs.
    But when I try to make shared library out of a sample hello world JNI program for arm linux it says 'jni.h: No such file or directory' and after that many lines 'syntax error' and 'parse error' etc.
    But the same program is running fine on x86 linux. Problem only while cross compiling for arm linux. It is not problem with arm-v5t-le-gcc because that is working fine. Problem is with what I need to include in makefiles.
    As I am new to this domain could anyone help me where I am missing?
    Regards
    Kishore

    I'm not exactly sure what you're talking about, but it sounds like you may need to look into global references. Look at NewGlobalRef() and DeleteGlobalRef() and see if those help you out.
    God bless,
    -Toby Reyelts
    For all your JNI woes, check out Jace - http://jace.reyelts.com/jace

  • Problem with jni references

    i have to implement a few standard APIs. As a part of the implementation I have to provide references to an object I create. Now my underlying code is C++ with JNI used to throw the Java APIs. Problem is JNI now returns different references for the same object and hence my prupose id defeated. Could anyone suggest how this problem can be overcome.

    I'm not exactly sure what you're talking about, but it sounds like you may need to look into global references. Look at NewGlobalRef() and DeleteGlobalRef() and see if those help you out.
    God bless,
    -Toby Reyelts
    For all your JNI woes, check out Jace - http://jace.reyelts.com/jace

  • Problem with JNI form C++

    Hi all,
    I'm fairly new to programming with JNI, so please excuse me if I ask a dumb question.
    I'm trying to call a Java method from a C++ class, but when I run the program, it throws an error, crashing the program. I'm pretty sure the problem is that the call to env->getMethodID() is throwing an error. I have looked around to try and find a way call a function with no arguments, but all of the examples that I have found all call a Java main.
    I'll post my code and the error message below so that things are a bit clearer.
    Thanks,
    Robert.
    Here is the main.cpp. This is where the program is started.
    #include "/usr/lib/jvm/java-6-sun-1.6.0.06/include/jni.h"
    int main()
       JNIEnv *env;
       JavaVM *jvm;
       jint res;
       jclass cls;
       jmethodID mid;
       // creation of the JVM
       JavaVMInitArgs vm_args;
       JavaVMOption options[1];
       options[0].optionString = "-Djava.class.path= .";
       vm_args.version = 0x00010002;
       vm_args.options = options;
       vm_args.nOptions = 1;
       vm_args.ignoreUnrecognized = JNI_TRUE;
       res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
       // now the rest of the code can work
       cls = env->FindClass("Test");
       mid = env->GetMethodID(cls, "run", "()V");
       env->CallVoidMethod(cls, mid);
       jvm->DestroyJavaVM();
    }Here is Test.java
    public class Test
       public void run()
          System.out.println("stuff");
          foo();
       public void foo()
          System.out.println("asdfasdf");
    }And here is the error message.
    # An unexpected error has been detected by Java Runtime Environment:
    #  SIGSEGV (0xb) at pc=0x06245f7d, pid=9054, tid=1076641792
    # Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode, sharing linux-x86)
    # Problematic frame:
    # V  [libjvm.so+0x245f7d]
    # An error report file with more information is saved as:
    # /media/MY STICK/jni/cpp/hs_err_pid9054.log
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    AbortedEdited by: metaldrummer610 on Apr 23, 2008 8:35 PM

    Yeah, so I just figured out what was wrong. I wasn't calling main from in Java. My bad guys.

  • Problem with JNI and Tomcat (and threads???)

    Howdy,
    Here is the issue - I would like some help on HOW to debug and fix this problem:
    2 test use cases -
    1)
    a)User goes to Login.jsp, enters user and password
    b) User submits to LoginServlet
    c) login calls JNI code that connects to a powerbuilder(Yes I know this is ugly) PBNI code module (this is a .dll) that authenticates the user with the database
    d) the servlet then redirects to another .jsp page
    e) user then submits to LogoutServlet - also a JNI call to a powerbuilder PBNI code module
    f) REPEAT STEPS a-e over a few times (inconsistent) and then the call to the JNI code hangs
    2)
    a) users does NOT goto Login.jsp, but rather calls LoginServlet and passes the userid and password as GET parms
    b) user does NOT get redirected to a page (redirect code commented out)
    c) user calls LogoutServlet
    d) repeat steps a-c at will and no failure, no hanging
    The only difference is that in case 1 (with JSP), there is a redirect and it afffected the JNI call by haniging inside JNI code.
    In case 2 (without JSP) there is still a JNI call, but it does not hang. In addition, when it hangs and I stop Tomcat, the logs show cleanup entries that say:
    Oct 19, 2004 9:17:09 AM org.apache.catalina.core.StandardWrapper unload
    INFO: Waiting for 1 instance(s) to be deallocated
    Oct 19, 2004 9:17:10 AM org.apache.catalina.core.StandardWrapper unload
    INFO: Waiting for 1 instance(s) to be deallocated
    Oct 19, 2004 9:17:11 AM org.apache.catalina.core.StandardWrapper unload
    INFO: Waiting for 1 instance(s) to be deallocated
    Is this a threading issue in Tomcat???
    On would assume that the JNI code is not cleaning up after itself, but I don't believe this is the case,
    and even if it was, why would I get the tomcat log cleanup entries above???
    What do those cleanup entries imply about the state of Tomcat????

    hi ,
    I met the same problem this morning, and searched the www.google.com in order to solve it, as a result, your article was shown on my screen. :)
    Till now I have read some technical information and solved my problems. Maybe the solution be useful to you:
    ==============================
    error message : (Environment : Tomcat 5, Windows 2003, Mysql5)
    2006-3-29 11:53:48 org.apache.catalina.core.StandardWrapper unload
    message: Waiting for 2 instance(s) to be deallocated
    ==============================
    cause: the number of connection to database exceeded.another word,too many connections.
    ==============================
    solution: close the connection when it becomes useless for your program. :)
    ==============================
    ps. Sorry for my weak English . hehe ....

  • Problem with JNI on netBeans

    Hi !
    After a search on the forum, I request your help about a little JNI app developped to work with a 3D sensor. The research team in which I work use to working with Eclipse IDE, and this JNI appliation work on it. However, impossible to find a way on NetBeans... I get an exception :
    Exception in thread "main" java.lang.UnsatisfiedLinkError:
    materiel.videoproj.JNIsiapp.SiInitialize()I
    at materiel.videoproj.JNIsiapp.SiInitialize(Native Method)
    at materiel.videoproj.JNIsiapp.main(JNIsiapp.java:138)
    It seems the IDE get the DLL (if I change the name in the loadLibrary method, the exception change) but encounter an error with the native method.
    The application (source code + dll + java code) could be find on ftp :
    ftp://ftp-us.3dconnexion.com
    login: jni
    password: dev1221
    Please help me too find a way !
    FloDeTours

    Library loading seems to continue to be a problem. There are two things to consider. First if you wrote the C/C++ code (like in the tutorials) then you compile it into a dll. This is the only dll you have to worry about. It will get loaded by your Java code using loadLibrary.
    This method is going to look for the dll on the path java.library.path. If you don't set this, it is equal to the system path. I like to keep everything inside my project so I put alll dlls in a directory off my project root called "native". So I set java.library.path to "native". In any case it should point to the location of the dll if it is not on the system path.
    Second if you have a 3rd party dll then you also have a JNI dll. The JNI dll is the one that loadLibrary loads, so the above applies to it. The third party dll is loaded on the C/C++ side, which know nothing about java.library.path. I only knows system path. This means that the location of this dll must be in that path. You can add the location to the system path permanently or use the IDE project setting to add it only inside the project scope.
    When you deploy the app you will need to supply the various path settings in the launching code.
    Jim

  • Problem with JNI in a Solaris shared library

    Hi,
    I have a problem.
    I have used JNI in my .dll on Windows & .so on Solaris . I have also used the same JNI code in a .exe on Windows & an executable on Solaris. 3 out of the above 4 combinations work & 1 doesen't. When I use JNI from a .so on Solaris 8(with/without the J2SE recommended patch), the JVM seems to have some exception & dumps core when I invoke CreateJavaVM(). See Below - I've included the output on the screen & the output from 'pstack core' :
    Unexpected Signal : 11 occurred at PC=0xFED29D44
    Function=[Unknown. Nearest: JVM_GetMethodIxExceptionIndexes+0x1994]
    Library=/usr/java/jre/lib/sparc/libjvm.so
    Current Java thread:
    Dynamic libraries:
    0x10000 SblSim
    0xff280000 /usr/lib/libnsl.so.1
    0xfec00000 /usr/java/jre/lib/sparc/libjvm.so
    0xff370000 /usr/lib/libpthread.so.1
    0xff350000 /usr/lib/librt.so.1
    0xff260000 /usr/lib/libsocket.so.1
    0xff390000 /usr/lib/libdl.so.1
    0xff230000 /usr/lib/libCrun.so.1
    0xff200000 /usr/lib/libm.so.1
    0xff340000 /usr/lib/libw.so.1
    0xff1b0000 /usr/lib/libthread.so.1
    0xff080000 /usr/lib/libc.so.1
    0xff180000 /usr/lib/libmp.so.2
    0xff160000 /usr/lib/libaio.so.1
    0xff1f0000 /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
    0xfebd0000 /usr/j2se/jre/lib/sparc/native_threads/libhpi.so
    0xfeba0000 /usr/j2se/jre/lib/sparc/libverify.so
    0xfeb60000 /usr/j2se/jre/lib/sparc/libjava.so
    0xfeb40000 /usr/j2se/jre/lib/sparc/libzip.so
    0xfe920000 /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
    0xf1400000 ./libaicd.so
    0xfc480000 ./libmttoolkit.so
    0xfdfe0000 ./libmttlogger.so
    0xfdfb0000 /usr/j2se/jre/lib/sparc/libnet.so
    Local Time = Tue Nov 12 09:51:37 2002
    Elapsed Time = 29
    # HotSpot Virtual Machine Error : 11
    # Error ID : 4F530E43505002D5 01
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode)
    # An error report file has been saved as hs_err_pid3120.log.
    # Please refer to the file for further information.
    Abort(coredump)
    Below is the output of 'pstack core'
    $ pstack core
    core 'core' of 3120: SblSim libaicd.so 127.0.0.1 9999
    ----------------- lwp# 1 / thread# 1 --------------------
    ff1c9764 __sigprocmask (ff1cbf60, 0, 0, 565f8, ff1de000, 0) + 8
    ff1be110 _sigon   (565f8, ff1e5930, 6, ffbedba4, 565f8, 6) + d0
    ff1c1150 thrpkill (0, 1, 6, ff1de000, 1, ff140450) + f8
    ff0cb900 raise (6, 0, 0, ffffffff, ff1403bc, 4) + 40
    ff0b58ec abort (ff13c000, ffbedcf8, 0, fffffff8, 4, ffbedd19) + 100
    feee2700 ???????? (1, fef98e50, ffbedd98, 0, feffc130, feee1258)
    feee12c8 ???????? (60650, b, fed29d44, ffbeeab8, b, 0)
    fede77c0 ???????? (fed29d44, ffbeeab8, ffbee800, fed29d44, fed03744, 0)
    ff1cb824 __sighndlr (b, ffbeeab8, ffbee800, fede6f38, 5669c, 5668c) + c
    ff1c84d8 sigacthandler (b, 565f8, 0, 0, 0, ff1de000) + 708
    --- called from signal handler with signal 11 (SIGSEGV) ---
    fed29d44 ???????? (0, 60650, 0, 0, 0, 0)
    fed2d7d4 ???????? (606e4, 0, 0, ffbeed00, 0, 0)
    f172e818 __1cHJNIEnv_JNewObject6MpnH_jclass_pnK_jmethodID_E_pnI_jobject__ (606e4, 0, 0, ffbeed70, 39, 107f90) + 70
    f172dbf8 __1cGJEvent2t5B6M_v_ (107f60, f1a877f4, db088, ff0c1c44, 107f48, 0) + 80
    f16f2864 __1cGCEvent2t6Mii_v_ (107f60, 0, 1, ff13c000, 107f48, 0) + 7c
    f16e62e8 __1cVCISCHelperThreadMutex2t6M_v_ (107f50, 0, 560ac, 30f68, fefe4000, 0) + c0
    f16ddc34 __1cLinitGlobals6F_v_ (0, 1, 19a, f1a198ec, f1a198ec, 0) + 5c
    f16de4e4 CreateISCDriverInstance (0, 5cc40, 0, 57608, 565e8, 0) + 554
    00034f08 __1cJRunSblSim6F_v_ (1, ffbef322, ffbef32c, ff13fc70, 100d4, 0) + 320
    00035588 main (4, ffbef1dc, ffbef1f0, 55c00, 0, 0) + 1a8
    00018460 _start   (0, 0, 0, 0, 0, 0) + 108
    ----------------- lwp# 2 / thread# 2 --------------------
    ff11e958 _signotifywait (ff1de000, 59, 0, 0, 0, 0) + 8
    ff1c2030 thr_yield (0, 0, 0, 0, 0, 0) + 8c
    ----------------- lwp# 3 --------------------------------
    ff1c9774 private___lwp_cond_wait (ff075d70, ff1ded9c, ff1de000, 0, 0, 4) + 8
    ff11c554 doorreturn (ff075cb0, ff1ba740, 0, 0, 0, 0) + 68
    ----------------- lwp# 4 / thread# 4 --------------------
    ff11efbc ___lwp_cond_wait (60048, 60030, fe901ad0, 0, 0, fe901ac8) + 8
    ff116610 lwpcond_timedwait (1cb8c88, 3dd1157a, fe901ba4, 60030, 60048, 1) + 98
    fecfc7d8 ???????? (0, 1, 0, 581b8, feffa26c, 0)
    fecfcfd4 ???????? (ff00a15c, feffa4b8, feffa4b4, 0, 0, 0)
    fecfccc0 ???????? (d3980, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (d3980, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (d3980, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 5 --------------------------------
    ff11c4fc doorreturn (4, ff1df688, ff1df6a0, 3, ff1de000, 1) + 10
    ff1ba740 lwpstart (fea95d70, 0, 6000, ff075b74, 0, 0) + 18
    ff1c2030 thr_yield (0, 0, 0, 0, 0, 0) + 8c
    ----------------- lwp# 6 / thread# 5 --------------------
    ff11efbc ___lwp_cond_wait (d5720, d5708, 0, fed10a40, 0, 0) + 8
    fed110d4 ???????? (d56c8, 0, 5000, 5210, d4d38, 4d24)
    fed10824 ???????? (fdf8172c, 0, 0, d4d38, d4d38, 30dec8)
    fed103b0 ???????? (d4dcc, fdf81824, 0, 0, 0, 0)
    fa40cc94 ???????? (f2000380, b6, fdf818a4, ffffffff, 0, fdf817c0)
    fa405da0 ???????? (f2000380, b6, fdf818a8, fa415444, 0, fdf81840)
    fa405da0 ???????? (fdf81938, 0, 0, fa4157a4, 2f4210, fdf818d8)
    fa400438 ???????? (fdf819c0, fdf81c08, a, f6050b68, fa40bc8c, fdf81b50)
    fecfe2f8 ???????? (fdf81c00, fdf81a88, fdf81b48, d4d38, d4d38, fdf81a9c)
    fed0ff90 ???????? (fefe4000, d5298, fdf81b3c, fdf81b38, fdf81b48, d4d38)
    fed0fdf0 ???????? (fdf81c00, fdf81bfc, fdf81bf0, fdf81be8, fdf81be0, d4d38)
    fed0fd78 ???????? (d4d38, d4d38, ac9a0, d5298, 2d4488, fed0fa60)
    fed0fa88 ???????? (d4d38, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (d4d38, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (d4d38, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 7 / thread# 6 --------------------
    ff11efbc ___lwp_cond_wait (d7040, d7028, 0, 1, 0, 0) + 8
    fed110d4 ???????? (d6fe8, 0, 5000, 5210, d6658, 4d24)
    fed10824 ???????? (fa38169c, 0, 0, d6658, d6658, 30dec8)
    fed103b0 ???????? (d66ec, fa38179c, 0, 0, 0, 0)
    fa40cc94 ???????? (f2000490, b6, fa3817a0, fa414050, 0, fa381730)
    fa405da0 ???????? (f2000478, b6, fa3818b4, fa415444, 0, fa3817d8)
    fa405c4c ???????? (f2000478, b6, fa381934, fa415444, d6658, fa381858)
    fa405c4c ???????? (fa381938, 0, 0, fa38197c, 2f4210, fa3818d8)
    fa400438 ???????? (fa3819c0, fa381c08, a, f60520b8, fa40bc8c, fa381b50)
    fecfe2f8 ???????? (fa381c00, fa381a88, fa381b48, d6658, d6658, fa381a9c)
    fed0ff90 ???????? (fefe4000, d6bb8, fa381b3c, fa381b38, fa381b48, d6658)
    fed0fdf0 ???????? (fa381c00, fa381bfc, fa381bf0, fa381be8, fa381be0, d6658)
    fed0fd78 ???????? (d6658, d6658, ac9e0, d6bb8, 2d4488, fed0fa60)
    fed0fa88 ???????? (d6658, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (d6658, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (d6658, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 8 / thread# 7 --------------------
    ff11d194 _poll    (0, 0, 0, fa281a28, ff13f1b4, fa281a28) + 8
    ff1cb134 select (0, a, 0, ff1de000, fa281e14, 0) + 34
    fed32afc ???????? (d8040, 0, a, 0, 0, 0)
    fed328b4 ???????? (d8040, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (d8040, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (d8040, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 9 / thread# 8 --------------------
    ff11efbc ___lwp_cond_wait (5f998, 5f980, 2e7aa0, ff1de000, fa181e14, 0) + 8
    fecfc634 ???????? (5f950, 0, 0, 0, feffa26c, 0)
    fed3371c ???????? (3c00, 3f44, 0, 0, 0, 0)
    fecfcbd0 ???????? (d81a8, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (d81a8, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 10 / thread# 9 --------------------
    ff11f008 lwpsema_wait (f1f81e30, ff1de000, 0, f1f81d70, ff3e2628, 0) + c
    ff1b94c0 _swtch   (f1f81d70, ffffffff, ff1de000, 5, 1000, 0) + 158
    ff1bcc64 sema_wait (ff020fe0, ff1e98e4, 5000, 10000, 534d, 1) + bc
    fed345c8 ???????? (0, 6, b, a, 1, 0)
    fed34254 ???????? (ff002ae4, ff00a5a0, ff00a5d4, dab90, 2d4488, fed0fa60)
    fed0fa88 ???????? (da630, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (da630, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (da630, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 11 / thread# 10 --------------------
    ff11efbc ___lwp_cond_wait (604e8, 604d0, 2e7aa0, feffa26c, 106c40, 0) + 8
    fecfc88c ???????? (604a0, 0, 0, dbbd0, feffa26c, 0)
    fed349ac ???????? (db670, db670, dbfd0, dbbd0, 2d4488, fed0fa60)
    fed0fa88 ???????? (db670, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (db670, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (db670, 0, 0, 0, 0, 0) + 40
    -------------------------- thread# 3 --------------------
    ff1bddbc reapwait (ff1e29e0, 20520, 0, ff1de000, 0, 0) + 38
    ff1bdb14 _reaper  (ff1dee30, ff1e4740, ff1e29e0, ff1dee08, 1, fe400000) + 38
    ff1cb728 threadstart (0, 0, 0, 0, 0, 0) + 40

    This is an update to the original message -
    I have tried both HotSpot & Server JVMs but still see the
    same behavior. I'm using 1.4 .
    I'd like to provide more information to those who can help
    me. I have a feeling there might be something wrong in my
    CC options. Thus you will find below what my CC statement
    looks like for one of the files in my project & for the
    linking of the final shared library. I also have
    provided the output of ldd on my shared library libaicd.so
    & for comparison the output of ldd on libjvm.so as that
    might provide some usefull information just incase
    something looks suspecious & might ring a bell.
    /opt/SUNWspro.cc6/bin/CC -c -KPIC -g -DDEBUG=DEBUG -
    D_DEBUG -mt -DSOLARIS -DSTD_STREAM -
    I/vob1/qwsrc/fw/include -I.-I/vob4/source/idl -
    I/vob4/source/mttoolkit -I/vob4/source/mttoolkit/tools -
    I/vob4/source/integrations/siebel/aicd -
    I/vob4/source/include -I/vob1/qwsrc/fw/include -
    I/vob4/source/source -I/vob4/source/mttoolkit -
    I/vob1/external/platform_neutral/siebel/scapi/include -
    I/external/sparc/Sun/jdk/1.3.1/include -
    I/external/sparc/Sun/jdk/1.3.1/include/solaris -
    I/vob4/source/idl -I/vob4/source/mttoolkit -
    I/vob4/source/mttoolkit/tools -
    I/vob4/source/mttoolkit/vnet -
    I/vob4/source/mttoolkit/bool -DUNIX -
    D_USE_MTTServerToolkit -D_JAVA_ WIAcceptTimeOut.cpp -
    o /space/users/janak/buildoutput/sparc/debug/obj/integratio s/siebel/aicd/WIAcceptTimeOut.o
    /opt/SUNWspro.cc6/bin/CC -G -
    o /space/users/janak/buildoutput/sparc/debug/lib/fw/libaicd.so
    /space/us
    ers/janak/buildoutput/sparc/debug/obj/integrations/siebel/ai
    cd/AgentService.o /space/users/janak/buildoutput/sparc/debug
    /obj/integrations/siebel/aicd/AgentServiceCmds.o /space/user
    s/janak/buildoutput/sparc/debug/obj/integrations/siebel/aicd
    /AgentServiceEvents.o /space/users/janak/buildoutput/sparc/d
    ebug/obj/integrations/siebel/aicd/AgentServiceICAReq.o /spac
    e/users/janak/buildoutput/sparc/debug/obj/integrations/siebe
    l/aicd/AgentServiceICEvents.o /space/users/janak/buildoutput
    /sparc/debug/obj/integrations/siebel/aicd/AgentServiceUtilit
    ies.o /space/users/janak/buildoutput/sparc/debug/obj/integra
    tions/siebel/aicd/AvMc.o /space/users/janak/buildoutput/spar
    c/debug/obj/integrations/siebel/aicd/InternationalStrings.o
    /space/users/janak/buildoutput/sparc/debug/obj/integrations/
    siebel/aicd/JEvent.o /space/users/janak/buildoutput/sparc/de
    bug/obj/integrations/siebel/aicd/JMultipleEvents.o /space/us
    ers/janak/buildoutput/sparc/debug/obj/integrations/siebel/ai
    cd/JNIObject.o /space/users/janak/buildoutput/sparc/debug/ob
    j/integrations/siebel/aicd/JObject.o /space/users/janak/buil
    doutput/sparc/debug/obj/integrations/siebel/aicd/JSemaphore.
    o /space/users/janak/buildoutput/sparc/debug/obj/integration
    s/siebel/aicd/JWorkerThread.o /space/users/janak/buildoutput
    /sparc/debug/obj/integrations/siebel/aicd/MultipleEvents.o /
    space/users/janak/buildoutput/sparc/debug/obj/integrations/s
    iebel/aicd/Param.o /space/users/janak/buildoutput/sparc/debu
    g/obj/integrations/siebel/aicd/ParamQueue.o /space/users/jan
    ak/buildoutput/sparc/debug/obj/integrations/siebel/aicd/RefC
    ount.o /space/users/janak/buildoutput/sparc/debug/obj/integr
    ations/siebel/aicd/SiebelDriver.o /space/users/janak/buildou
    tput/sparc/debug/obj/integrations/siebel/aicd/SiebelEvent.o
    /space/users/janak/buildoutput/sparc/debug/obj/integrations/
    siebel/aicd/SiebelWorkItem.o /space/users/janak/buildoutput/
    sparc/debug/obj/integrations/siebel/aicd/SingleEvent.o /spac
    e/users/janak/buildoutput/sparc/debug/obj/integrations/siebe
    l/aicd/SmartPtr.o /space/users/janak/buildoutput/sparc/debug
    /obj/integrations/siebel/aicd/StdAfx.o /space/users/janak/bu
    ildoutput/sparc/debug/obj/integrations/siebel/aicd/ThreadPoo
    l.o /space/users/janak/buildoutput/sparc/debug/obj/integrati
    ons/siebel/aicd/Utilities.o /space/users/janak/buildoutput/s
    parc/debug/obj/integrations/siebel/aicd/WIAcceptTimeOut.o -
    lnsl -lc -lCstd -
    L/space/users/janak/buildoutput/sparc/debug/lib/cti -
    lmttoolkit -
    L/space/users/janak/buildoutput/sparc/debug/lib/fw -
    lmttlogger -
    L/space/users/janak/buildoutput/sparc/debug/lib/fw -
    lqwlicmtt -
    L/external/sparc/Sun/jdk/1.3.1/jre/lib/sparc/server -
    Bdynamic -ljvm -mt -lpthread -lposix4
    $ ldd /usr/j2se/jre/lib/sparc/libjvm.so
    libCrun.so.1 => /usr/lib/libCrun.so.1
    libdl.so.1 => /usr/lib/libdl.so.1
    libthread.so.1 => /usr/lib/libthread.so.1
    libsocket.so.1 => /usr/lib/libsocket.so.1
    libnsl.so.1 => /usr/lib/libnsl.so.1
    libm.so.1 => /usr/lib/libm.so.1
    libw.so.1 => /usr/lib/libw.so.1
    libc.so.1 => /usr/lib/libc.so.1
    libmp.so.2 => /usr/lib/libmp.so.2
    /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
    $ ldd libaicd.so
    libnsl.so.1 => /usr/lib/libnsl.so.1
    libc.so.1 => /usr/lib/libc.so.1
    libmttoolkit.so => ./libmttoolkit.so
    libmttlogger.so => ./libmttlogger.so
    libjvm.so => /usr/java/jre/lib/sparc/libjvm.so
    libpthread.so.1 => /usr/lib/libpthread.so.1
    librt.so.1 => /usr/lib/librt.so.1
    libdl.so.1 => /usr/lib/libdl.so.1
    libmp.so.2 => /usr/lib/libmp.so.2
    libCrun.so.1 => /usr/lib/libCrun.so.1
    libthread.so.1 => /usr/lib/libthread.so.1
    libsocket.so.1 => /usr/lib/libsocket.so.1
    libm.so.1 => /usr/lib/libm.so.1
    libaio.so.1 => /usr/lib/libaio.so.1
    libw.so.1 => /usr/lib/libw.so.1
    /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1

  • Problem with JNI and Tomcat in windows

    Hello guys...
    I have the following problem.
    I used Tomcat 4 and I have following ApiEncriptacion class, in package com.servipag.sts;
    package com.servipag.sts;
    class ApiEncriptacion
         public native String encripta(String texto, String ubicacionLlavePublica, String semilla);
         static
              System.loadLibrary("apisdark");
         public native String desencripta(String texto, String ubicacionLlavePrivada);
         static
              System.loadLibrary("apisdark");
    the LD_LIBRARY_PATH is set in following dir c:\tomcat\bice
    the dll this in the following path = c:\tomcat\bice\apisdark.dll
    I run Tomcat at the following way..
    C:\jdk1.4\bin\java.exe -jar -Djava.library.path="c:\tomcat\bice" -Duser.dir="C:\Tomcat" "C:\Tomcat\bin\bootstrap.jar" start
    but, still appear the error:
    java.lang.UnsatisfiedLinkError: encripta
         at com.servipag.sts.ApiEncriptacion.encripta(Native Method)
         at com.servipag.sts.ServiciosServiPagImpl.rescatarFirma(ServiciosServiPagImpl.java:2143)
         at com.servipag.sts.ServiciosServiPagImpl.pagarCuenta(ServiciosServiPagImpl.java:310)
         at org.apache.jsp.SBCO_0005flogin_0005fbice_0005f4$jsp._jspService(SBCO_0005flogin_0005fbice_0005f4$jsp.java:265)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
         at java.lang.Thread.run(Thread.java:536)
    please help me
    Luis Navarro.
    Chile

    ApiEncripatcion.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class ApiEncriptacion */
    #ifndef IncludedApiEncriptacion
    #define IncludedApiEncriptacion
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: ApiEncriptacion
    * Method: encripta
    * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_ApiEncriptacion_encripta
    (JNIEnv *, jobject, jstring, jstring, jstring);
    * Class: ApiEncriptacion
    * Method: desencripta
    * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_ApiEncriptacion_desencripta
    (JNIEnv *, jobject, jstring, jstring);
    #ifdef __cplusplus
    #endif
    #endif
    ApiEncriptacion.c
    #include "jni.h"
    #include <stdio.h>
    #include "files.h"
    #include "hex.h"
    #include "rsa.h"
    #include "randpool.h"
    USING_NAMESPACE(CryptoPP)
    USING_NAMESPACE(std)
    void GenerateRSAKey(unsigned int keyLength, const char privFilename, const char pubFilename, const char *seed);
    char RSAEncryptString(const char pubFilename, const char seed, const char message);
    char RSADecryptString(const char privFilename, const char *ciphertext);
    JNIEXPORT jstring JNICALL
    Java_ApiEncriptacion_encripta(JNIEnv *env, jobject obj, jstring texto, jstring ubicacionLlavePublica, jstring semilla)
         try
              char *ciphertext = RSAEncryptString(ubicacionLlavePublica, semilla, texto);
              delete [] ciphertext;
              return(ciphertext);
         catch(CryptoPP::Exception &e)
              return ("");
         catch(std::exception &e)
              return ("");
         catch(...)
              return ("");
    JNIEXPORT jstring JNICALL
    Java_ApiEncriptacion_desencripta(JNIEnv *env, jobject obj, jstring texto, jstring ubicacionLlavePrivada)
         try
              char *decrypted = RSADecryptString(ubicacionLlavePrivada, texto);
              return(decrypted);
         catch(CryptoPP::Exception &e)
              return ("");
         catch(std::exception &e)
              return ("");
         catch(...)
              return ("");
    int main()
         return(0);     
    void GenerateRSAKey(unsigned int keyLength, const char privFilename, const char pubFilename, const char *seed)
         RandomPool randPool;
         randPool.Put((byte *)seed, strlen(seed));
         RSAES_OAEP_SHA_Decryptor priv(randPool, keyLength);
         HexEncoder privFile(new FileSink(privFilename));
         priv.DEREncode(privFile);
         privFile.MessageEnd();
         RSAES_OAEP_SHA_Encryptor pub(priv);
         HexEncoder pubFile(new FileSink(pubFilename));
         pub.DEREncode(pubFile);
         pubFile.MessageEnd();
    char RSAEncryptString(const char pubFilename, const char seed, const char message)
         FileSource pubFile(pubFilename, true, new HexDecoder);
         RSAES_OAEP_SHA_Encryptor pub(pubFile);
         if (strlen(message) > pub.MaxPlainTextLength())
              cerr << "message too long for this key\n";
              abort();
         RandomPool randPool;
         randPool.Put((byte *)seed, strlen(seed));
         char outstr = new char[2pub.CipherTextLength()+1];
         pub.Encrypt(randPool, (byte *)message, strlen(message), (byte *)outstr);
         HexEncoder hexEncoder;
         hexEncoder.Put((byte *)outstr, pub.CipherTextLength());
         hexEncoder.MessageEnd();
         hexEncoder.Get((byte *)outstr, 2*pub.CipherTextLength());
         outstr[2*pub.CipherTextLength()] = 0;
         return outstr;
    char RSADecryptString(const char privFilename, const char *ciphertext)
         FileSource privFile(privFilename, true, new HexDecoder);
         RSAES_OAEP_SHA_Decryptor priv(privFile);
         HexDecoder hexDecoder;
         hexDecoder.Put((byte *)ciphertext, strlen(ciphertext));
         hexDecoder.MessageEnd();
         SecByteBlock buf(priv.CipherTextLength());
         hexDecoder.Get(buf, priv.CipherTextLength());
         char *outstr = new char[priv.MaxPlainTextLength()+1];
         unsigned messageLength = priv.Decrypt(buf, (byte *)outstr);
         outstr[messageLength] = 0;
         return outstr;

  • Problem with Jni on Solaris

    Hello I am using a Native code that is working perfect on Windows .
    I have used DllMain calls to initialize my threads .
    I attach my lower stack threads to the JNI by using these methods.
    Well I want to know what is way to put the same functionality on Solaris.As this particular method is specific to Windows Platform only.
    BOOL APIENTRY DllMain( HANDLE hModule,                     // handle to DLL module
    DWORD ul_reason_for_call,      // reason for calling function
    LPVOID lpReserved                // reserved
         BOOL returnValue = FALSE;
    switch (ul_reason_for_call)
              case DLL_PROCESS_ATTACH:
                   // We do not perform any initialization
                   // within this section. Instead we have
                   // chosen to use the JNI_OnLoad function
                   // as the library initialization point.
                   returnValue = TRUE;
                   break;
              case DLL_THREAD_ATTACH:
                   // We are to initialize the thread local storage
                   // variables in this call.
                   if( BridgeUtility::getInstance() -> threadInitialize() != 0 ) {
                        returnValue = FALSE;
                        printf(" Thread initialize failed..\n");
                   }else {
                        printf(" Thread initialize succed..\n");
                        returnValue = TRUE;
                   break;
              case DLL_THREAD_DETACH:
                   // We are to uninitialize the thread local storage
                   // variables in this call.
                   if( BridgeUtility::getInstance() -> threadUninitialize() != 0 )
                        returnValue = FALSE;
                   else
                        returnValue = TRUE;
                   break;
              case DLL_PROCESS_DETACH:
                   // We do not perform any uninitialization
                   // within this section. Instead we have
                   // chosen to use the JNI_OnUnload function
                   // as the library initialization point.
                   returnValue = TRUE;
                   break;

    If your aim is to load the library and initialize it
    that one time, consider using the pthread once routines
    to handle library initialization. See, for example,
    chapter 5 of Butenhof's "Programming with POSIX
    threads".

  • Problem with JNI (custom shared library) on App Server

    We have a custom built shared library (.so) we want to use with the app server (a webapp). The .so is wrapped with java class and works to spec when tested outside of app server (webapp) environment with test stub. When wrapper class is introduced to App Server (webapp) & embedded function is invoked we recieve java.lang.UnsatisfiedLinkError(). We've looked to make sure $LD_LIBRARY_PATH is correct but still recieve this exception. Any suggestions? Running nm against the .so shows undefined symbols but these should be resolved by $LD_LIBRARY_PATH. Any suggestions?

    what version of appserver are u using...if 7.0 then try using their common class loader as per this docs:
    http://docs.sun.com/source/817-2171-10/dgdeploy.html#wp69906

  • Problems with the ActiveX bridge for Java beans when using third-party .jar

    I encountered the following problem when using the ActiveX bridge for a java bean:
    I am using JDK 1.4.2_09 and MS Visual Basic 6.0 (SP6). I wrote a java bean called ProcessViewer (my class ProcessViewer inherits from JComponent and implements the interfaces Serializable and AdjustmentListener) which I would like to use within a VB 6.0 application. I used the ActiveX bridge (packager.exe) to generate a DLL (ProcessViewer.dll) and registered it successfully. The java bean GUI-control works fine within my VB 6.0 application unless my java bean (ProcessViewer.jar) uses any third-party .jar files.
    But when I tried to add a reference to some third-party class (com.sap.xxx.xxx....) I got some problems. I could solve the problem with packager.exe by setting the correct CLASSPATH. But at runtime my VB 6.0 application does not work. It crashes or it reports an error like this: "The control ... could not be loaded from axbridge.dll" (although I deployed my .jar file correctly to the directory C:\Programme\Java\j2re1.4.2_09\axbridge\bin and lib). Setting the CLASSPATH environment variable before calling my VB 6.0 application (exe) did not solve the problem.
    How can I teach my VB 6.0 application (containing the Java bean ActiveX control) where to find the third-party .jar file? Copying the third-party .jar file to the JRE lib-folder or to the axbridge\lib folder did not solve the problem either.
    I studied the documentation about the ActiveX bridge given at:
    http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html
    but I am missing informations on how the third-party .jar files can be found during runtime of the ActiveX container (e. g. a VB 6.0 application).

    See how to solve your problem with JNI:
    http://codeproject.com/cpp/OOJNIUse.asp
    More examples (for SWING) in tools setup:
    http://www.simtel.net/product.php[id]95126[SiteID]simtel.net
    http://www.simtel.net/product.php[id]94368[SiteID]simtel.net
    http://www.simtel.net/product.php[id]93174[SiteID]simtel.net

  • Problem with streaming video

    Hi!
    I have a problem with my project. Please help me!
    I tried to send a video streaming between 2 computers. I used socket connection and AVReceive2, AVTransmit. When received computer display 59 seconds, it stop the connection, socket is closed and program send a error report.
    I list here:
    =========================================================================
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x070b17ff, pid=1180, tid=2176
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_13-b05 mixed mode, sharing)
    # Problematic frame:
    # C [jmmpegv.dll+0x17ff]
    --------------- T H R E A D ---------------
    Current thread (0x02cdf930): JavaThread "Loop thread: com.sun.media.parser.RawBufferParser$FrameTrack@27391d" daemon [_thread_in_native, id=2176]
    siginfo: ExceptionCode=0xc0000005, reading address 0x0d2451f8
    Registers:
    EAX=0x0000008e, EBX=0xfffffffd, ECX=0x070c2a68, EDX=0x0000ffff
    ESP=0x078ff8a4, EBP=0x0000000d, ESI=0x016c0000, EDI=0x077451f8
    EIP=0x070b17ff, EFLAGS=0x00010202
    Top of Stack: (sp=0x078ff8a4)
    0x078ff8a4: 00000001 00000164 07110650 00000000
    0x078ff8b4: 00000005 0000010f 070c2a34 00000003
    0x078ff8c4: 00000003 070b65c8 070c250f 070c2b3c
    0x078ff8d4: 07740048 00000002 00000000 00000000
    0x078ff8e4: 00000000 00000000 070b66c0 07740048
    0x078ff8f4: 07740048 070b6c3b 00000001 07740048
    0x078ff904: 071101a0 07740048 078ff990 00000000
    0x078ff914: 00000000 070b74b5 07740048 078ff97c
    Instructions: (pc=0x070b17ff)
    0x070b17ef: fc 01 0c 07 0b d7 8b 3d c0 2d 0c 07 c1 fe 03 45
    0x070b17ff: d9 04 b7 8b 35 44 36 0c 07 8b f9 d8 0c 86 d9 1c
    Stack: [0x078c0000,0x07900000), sp=0x078ff8a4, free space=254k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [jmmpegv.dll+0x17ff]
    [error occurred during error reporting, step 120, id 0xc0000005]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j com.ibm.media.codec.video.mpeg.MpegVideo.videoDecode(J[BIIILjava/lang/Object;JII[I[I[I[I[I[I)I+0
    j com.ibm.media.codec.video.mpeg.MpegVideo.process(Ljavax/media/Buffer;Ljavax/media/Buffer;)I+574
    J com.sun.media.BasicFilterModule.process()V
    J com.sun.media.BasicOutputConnector.writeReport()V
    J com.sun.media.BasicFilterModule.process()V
    J com.sun.media.BasicOutputConnector.writeReport()V
    J com.sun.media.SourceThread.process()Z
    j com.sun.media.util.LoopThread.run()V+14
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x02cdd008 JavaThread "Loop thread: com.sun.media.parser.RawBufferParser$FrameTrack@cec0c5" daemon [_thread_blocked, id=3104]
    0x02d1df88 JavaThread "Loop thread: com.sun.media.renderer.audio.DirectAudioRenderer@2ce908" daemon [_thread_blocked, id=1176]
    =>0x02cdf930 JavaThread "Loop thread: com.sun.media.parser.RawBufferParser$FrameTrack@27391d" daemon [_thread_in_native, id=2176]
    0x02ce0890 JavaThread "Loop thread: com.sun.media.renderer.video.DDRenderer@14a8cd1" daemon [_thread_blocked, id=2296]
    0x02c5e920 JavaThread "Progress Slider thread" daemon [_thread_blocked, id=3172]
    0x02d18c58 JavaThread "Loop thread" daemon [_thread_blocked, id=2920]
    0x00ab5a50 JavaThread "DirectSound Request Thread" daemon [_thread_blocked, id=3984]
    0x00a80480 JavaThread "Progress Slider thread" daemon [_thread_blocked, id=3180]
    0x02c89d18 JavaThread "Loop thread" daemon [_thread_blocked, id=788]
    0x02d37098 JavaThread "JMF thread: SendEventQueue: com.sun.media.PlaybackEngine" daemon [_thread_blocked, id=3328]
    0x02c8bc28 JavaThread "JMF thread: SendEventQueue: com.sun.media.content.unknown.Handler" daemon [_thread_blocked, id=2916]
    0x02c78720 JavaThread "RTPStream" daemon [_thread_blocked, id=3400]
    0x02db1d90 JavaThread "JMF thread: SendEventQueue: com.sun.media.PlaybackEngine" daemon [_thread_blocked, id=3032]
    0x02c73c10 JavaThread "JMF thread: SendEventQueue: com.sun.media.content.unknown.Handler" daemon [_thread_blocked, id=1440]
    0x02c7d930 JavaThread "RTPStream" daemon [_thread_blocked, id=2664]
    0x02d195e0 JavaThread "RTCP Reporter" daemon [_thread_blocked, id=2416]
    0x02d19008 JavaThread "SSRC Cache Cleaner" daemon [_thread_blocked, id=592]
    0x02d24a30 JavaThread "RTP Forwarder for address 192.168.1.34 port 1627" daemon [_thread_in_native, id=376]
    0x02c5fa30 JavaThread "RTCP Forwarder for address192.168.1.34 port 1628" daemon [_thread_in_native, id=3840]
    0x02c5f008 JavaThread "RTPEventHandler" daemon [_thread_blocked, id=2516]
    0x02c60440 JavaThread "RTCP Reporter" daemon [_thread_blocked, id=2820]
    0x02c602b8 JavaThread "SSRC Cache Cleaner" daemon [_thread_blocked, id=3816]
    0x02d403d0 JavaThread "RTP Forwarder for address 192.168.1.34 port 1625" daemon [_thread_in_native, id=2272]
    0x02d0de20 JavaThread "RTCP Forwarder for address192.168.1.34 port 1626" daemon [_thread_in_native, id=1500]
    0x00a64e30 JavaThread "RTPEventHandler" daemon [_thread_blocked, id=3852]
    0x02c9d6e8 JavaThread "TimerQueue" daemon [_thread_blocked, id=2472]
    0x00035c78 JavaThread "DestroyJavaVM" [_thread_blocked, id=2776]
    0x02cbbb10 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=364]
    0x02c58478 JavaThread "AWT-Shutdown" [_thread_blocked, id=1008]
    0x02c58898 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3548]
    0x00aabf08 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=2440]
    0x00a716d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3644]
    0x00a702b0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3348]
    0x00a6f598 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1184]
    0x00a6a300 JavaThread "Finalizer" daemon [_thread_blocked, id=2556]
    0x00a68e78 JavaThread "Reference Handler" daemon [_thread_blocked, id=1296]
    Other Threads:
    0x00a67c38 VMThread [id=1956]
    0x00a6f440 WatcherThread [id=3560]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 640K, used 501K [0x22a70000, 0x22b20000, 0x22f50000)
    eden space 576K, 76% used [0x22a70000, 0x22adde88, 0x22b00000)
    from space 64K, 96% used [0x22b10000, 0x22b1f758, 0x22b20000)
    to space 64K, 0% used [0x22b00000, 0x22b00000, 0x22b10000)
    tenured generation total 8172K, used 6973K [0x22f50000, 0x2374b000, 0x26a70000)
    the space 8172K, 85% used [0x22f50000, 0x2361f4e0, 0x2361f600, 0x2374b000)
    compacting perm gen total 8192K, used 2098K [0x26a70000, 0x27270000, 0x2aa70000)
    the space 8192K, 25% used [0x26a70000, 0x26c7ca90, 0x26c7cc00, 0x27270000)
    ro space 8192K, 67% used [0x2aa70000, 0x2afd23e0, 0x2afd2400, 0x2b270000)
    rw space 12288K, 47% used [0x2b270000, 0x2b81f450, 0x2b81f600, 0x2be70000)
    Dynamic libraries:
    0x00400000 - 0x0040d000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\java.exe
    0x7c900000 - 0x7c9b0000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f4000      C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f01000      C:\WINDOWS\system32\RPCRT4.dll
    0x77c10000 - 0x77c68000      C:\WINDOWS\system32\MSVCRT.dll
    0x6d740000 - 0x6d8dd000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\client\jvm.dll
    0x77d40000 - 0x77dd0000      C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f56000      C:\WINDOWS\system32\GDI32.dll
    0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
    0x6d300000 - 0x6d308000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\hpi.dll
    0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d710000 - 0x6d71c000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\verify.dll
    0x6d380000 - 0x6d39d000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\java.dll
    0x6d730000 - 0x6d73f000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\zip.dll
    0x6d070000 - 0x6d1da000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\awt.dll
    0x73000000 - 0x73026000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x76390000 - 0x763ad000      C:\WINDOWS\system32\IMM32.dll
    0x774e0000 - 0x7761c000      C:\WINDOWS\system32\ole32.dll
    0x305e0000 - 0x305f6000      C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 7.0\miscr3.dll
    0x77f60000 - 0x77fd6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x30480000 - 0x3048e000      C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 7.0\fssync.dll
    0x78130000 - 0x781cb000      C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd\MSVCR80.dll
    0x5ad70000 - 0x5ada8000      C:\WINDOWS\system32\uxtheme.dll
    0x73760000 - 0x737a9000      C:\WINDOWS\system32\ddraw.dll
    0x73bc0000 - 0x73bc6000      C:\WINDOWS\system32\DCIMAN32.dll
    0x6d2b0000 - 0x6d300000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\fontmanager.dll
    0x7c9c0000 - 0x7d1d4000      C:\WINDOWS\system32\shell32.dll
    0x773d0000 - 0x774d2000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x5d090000 - 0x5d127000      C:\WINDOWS\system32\comctl32.dll
    0x6d540000 - 0x6d553000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\net.dll
    0x71ab0000 - 0x71ac7000      C:\WINDOWS\system32\WS2_32.dll
    0x71aa0000 - 0x71aa8000      C:\WINDOWS\system32\WS2HELP.dll
    0x6d560000 - 0x6d569000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\nio.dll
    0x60300000 - 0x60307000      C:\PROGRA~1\Yahoo!\MESSEN~1\idle.dll
    0x7c340000 - 0x7c396000      C:\PROGRA~1\Yahoo!\MESSEN~1\MSVCR71.dll
    0x71a50000 - 0x71a8f000      C:\WINDOWS\system32\mswsock.dll
    0x662b0000 - 0x66308000      C:\WINDOWS\system32\hnetcfg.dll
    0x71a90000 - 0x71a98000      C:\WINDOWS\System32\wshtcpip.dll
    0x10000000 - 0x10015000      C:\WINDOWS\system32\jmutil.dll
    0x76f20000 - 0x76f47000      C:\WINDOWS\system32\DNSAPI.dll
    0x30460000 - 0x3047b000      C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 7.0\dnsq.dll
    0x76fb0000 - 0x76fb8000      C:\WINDOWS\System32\winrnr.dll
    0x76f60000 - 0x76f8c000      C:\WINDOWS\system32\WLDAP32.dll
    0x76fc0000 - 0x76fc6000      C:\WINDOWS\system32\rasadhlp.dll
    0x05540000 - 0x0554d000      C:\WINDOWS\system32\jmacm.dll
    0x77be0000 - 0x77bf5000      C:\WINDOWS\system32\MSACM32.dll
    0x58420000 - 0x58427000      C:\WINDOWS\system32\imaadp32.acm
    0x72cf0000 - 0x72cf7000      C:\WINDOWS\system32\msadp32.acm
    0x58330000 - 0x58335000      C:\WINDOWS\system32\msg711.acm
    0x58300000 - 0x58308000      C:\WINDOWS\system32\msgsm32.acm
    0x582d0000 - 0x582d4000      C:\WINDOWS\system32\tssoft32.acm
    0x73b70000 - 0x73b77000      C:\WINDOWS\system32\tsd32.dll
    0x58310000 - 0x5832d000      C:\WINDOWS\system32\msg723.acm
    0x58340000 - 0x5838d000      C:\WINDOWS\system32\msaud32.acm
    0x582e0000 - 0x582fe000      C:\WINDOWS\system32\sl_anet.acm
    0x581a0000 - 0x581d9000      C:\WINDOWS\system32\iac25_32.ax
    0x58390000 - 0x5841a000      C:\WINDOWS\system32\l3codeca.acm
    0x056d0000 - 0x056dc000      C:\WINDOWS\system32\jmdaud.dll
    0x73f10000 - 0x73f6c000      C:\WINDOWS\system32\DSOUND.dll
    0x77c00000 - 0x77c08000      C:\WINDOWS\system32\VERSION.dll
    0x06d50000 - 0x06dae000      C:\WINDOWS\system32\jmmpa.dll
    0x06c20000 - 0x06c2b000      C:\WINDOWS\system32\jmvcm.dll
    0x75a70000 - 0x75a91000      C:\WINDOWS\system32\MSVFW32.dll
    0x070b0000 - 0x070c6000      C:\WINDOWS\system32\jmmpegv.dll
    0x07210000 - 0x07218000      C:\WINDOWS\system32\jmddraw.dll
    0x073e0000 - 0x0748c000      C:\WINDOWS\system32\jmvh263.dll
    0x6d3e0000 - 0x6d3e6000      C:\Program Files\Java\jdk1.5.0_13\jre\bin\jawt.dll
    0x07340000 - 0x07349000      C:\WINDOWS\system32\jmfjawt.dll
    0x76c30000 - 0x76c5e000      C:\WINDOWS\system32\WINTRUST.dll
    0x77a80000 - 0x77b14000      C:\WINDOWS\system32\CRYPT32.dll
    0x77b20000 - 0x77b32000      C:\WINDOWS\system32\MSASN1.dll
    0x76c90000 - 0x76cb8000      C:\WINDOWS\system32\IMAGEHLP.dll
    0x72d20000 - 0x72d29000      C:\WINDOWS\system32\wdmaud.drv
    0x72d10000 - 0x72d18000      C:\WINDOWS\system32\msacm32.drv
    0x77bd0000 - 0x77bd7000      C:\WINDOWS\system32\midimap.dll
    0x73ee0000 - 0x73ee4000      C:\WINDOWS\system32\KsUser.dll
    VM Arguments:
    java_command: FrameLogin
    Launcher Type: SUN_STANDARD
    Environment Variables:
    CLASSPATH=.;.;C:\PROGRA~1\JMF21~1.1E\lib\sound.jar;C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;C:\PROGRA~1\JMF21~1.1E\lib;
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
    USERNAME=Tung
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 1 Stepping 2, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 1 (cores per cpu 1, threads per core 1) family 15 model 1 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 245280k(6040k free), swap 2279684k(1755548k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_13-b05) for windows-x86, built on Sep 25 2007 19:11:52 by "java_re" with MS VC++ 6.0
    ==============================================================================
    Is it a problem with jre or a problem with socket connection?
    Please help me! Thanks!

    rohitmadiwal, don't post on old threads. If you have a problem, post a new thread.
    The above error was caused by a bug in the JNI code inside of JMF. The best solution to such problems is to reboot your system, and if that doesn't work, reinstall JMF.
    If neither of those 2 things fix it, it cannot be fixed.

Maybe you are looking for