JDK-4917140 : RedefineClasses unregisters native methods causing UnsatisfiedLinkError
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_9
  • CPU: generic,sparc
  • Submitted: 2003-09-04
  • Updated: 2004-03-02
  • Resolved: 2004-03-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b41Fixed
Related Reports
Duplicate :  
Description
java.lang.UnsatisfiedLinkError: wait
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:426)
        at java.util.TimerThread.mainLoop(Timer.java:403)
        at java.util.TimerThread.run(Timer.java:382)

In this example Object has been redefined.

This occurs when a class that has native methods gets redefined.
After the redefinition, the native methods can no longer be called.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b41 tiger-beta2
14-06-2004

SUGGESTED FIX See evaluation. Since redefinition cannot change the native methods, I suggest that simply leaving the existing old native methods may be the solution. ###@###.### 2003-09-16
16-09-2003

EVALUATION During class redefinition, all the new methods are attached to the old class (which is always THE class), replacing the old methods. I assume that because the native methods are among these, and as a result the associated native registration is lost. ###@###.### 2003-09-16
16-09-2003