7 Replies Latest reply on Jul 14, 2003 11:29 AM by bialek

    Reflective Thread

    bialek

      Hi,
      Javassist is great - thanks for the work :)

      I need to make a reflective class, which extends Thread.
      When I do it, I get the following exception.
      If I construct the thread from the Thread(new A) it works but I have some synchronization issues. I would prefer to use the first method (A extends Thread).
      Any clues how to overcome it?
      I'm using SUN's VM 1.4.1_3
      Thanks
      ++Robert

      Exception in thread "main" java.lang.VerifyError: (class: workflow/Application, method: _m_50_sleep signature: (J)V) Accessing value from uninitialized register pair 1/2
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:1627)
      at java.lang.Class.getMethod0(Class.java:1746)
      at java.lang.Class.getDeclaredMethod(Class.java:1233)
      at javassist.Loader.run(Loader.java:246)
      at workflow.Main.main(Main.java:32)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at javassist.Loader.run(Loader.java:247)
      at javassist.Loader.run(Loader.java:233)
      at javassist.reflect.Loader.main(Loader.java:121)