2 Replies Latest reply: Mar 26, 2012 9:31 PM by EJP RSS

    Why do I get JVMTI_ERROR_ABSENT_INFORMATION???

    926470
      What is wrong with this code:

      jclass win_clazz = jniEnv->FindClass("java/lang/String");
      jmethodID this_id = jniEnv->GetMethodID(win_clazz,"<init>","()V");

      jint count;
      jvmtiLocalVariableEntry* var_entry;
      jvmtiError err = jvmti->GetLocalVariableTable(this_id,&count,&var_entry);

      The last function call gives me JVMTI_ERROR_ABSENT_INFORMATION. I would likt to know why? Any thoughts

      Thanks

      Nikita
        • 1. Re: Why do I get JVMTI_ERROR_ABSENT_INFORMATION???
          EJP
          JVMTI_ERROR_ABSENT_INFORMATION:     Class information does not include local variable information.

          And the no-args constructor for java.lang.String doesn't even have any local variables.

          What are you doing?
          • 2. Re: Why do I get JVMTI_ERROR_ABSENT_INFORMATION???
            926470
            Mostly, I am trying to understand what I can and cannot do with jvmti. Specifically, as I mentioned in one of my previous posts, I am trying to get a hold of an object that is being instantiated in jvm by another process, and I took this code snippet from one of the earlier posts in this group. The idea was that the method should always have a this field, so if I can get one of the methods of a class, and then somehow get to the "this" field, I will solve my problem. Obviously it does not work. If you have any better way to achieve what I am trying to do, I would love to hear it.

            Thanks