Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2176865 | 7 | Karen Kinnear | P3 | Closed | Fixed | b10 |
JDK-2152692 | 6u4 | Karen Kinnear | P3 | Closed | Fixed | b02 |
JDK-2148034 | 6u2 | Unassigned | P3 | Closed | Cannot Reproduce | |
JDK-2213955 | 5.0u33 | Poonam Bajaj Parhar | P3 | Closed | Fixed | b08 |
When circular hierarchy is loaded using 2 class loaders delegating the loading of particular classes to each other, when the circularity is detected, in spite of ClassCircularityError, LinkageError is thrown. The peculiarity is that the loading should be initiated by calling to Class.forName(), not ClassLoader.loadClass().
The following test is affected:
runtime/ParallelClassLoading/ClassCircularityError/delegation/forName
Test debug output:
Main Thread: Starting...
Main Thread: Starting classloading...
Loading Thread #1: Ready to start. Waiting for command.
Main Thread: Waiting for threads. Threads running: 1
Loading Thread #1: Starting...
Loading Thread #1: [Delegate custom.A to Loader #2.]
Loading Thread #1: [runtime.ParallelClassLoading.shared.CustomLoader@743399: Loading custom.A from file]
Loading Thread #1: [Delegate custom.B to Loader #1.]
Loading Thread #1: [runtime.ParallelClassLoading.shared.CustomLoader@a981ca: Loading custom.B from file]
Loading Thread #1: Error "java.lang.LinkageError" during defining class "custom.B":
Loading Thread #1: java.lang.LinkageError: custom/A
Loading Thread #1: Calling findLoadedClass("custom.B")...
Loading Thread #1: Returning from findLoadedClass("custom.B")...
Loading Thread #1: ERROR: findLoadedClass("custom.B") returns null when
LinkageError due to class duplication is caught!
Loading Thread #1: Error "java.lang.NoClassDefFoundError" during defining class "custom.A":
Loading Thread #1: java.lang.NoClassDefFoundError: custom/B
Loading Thread #1: Calling findLoadedClass("custom.A")...
Loading Thread #1: Returning from findLoadedClass("custom.A")...
Loading Thread #1: ERROR: findLoadedClass("custom.A") returns null when
LinkageError due to class duplication is caught!
Loading Thread #1: Exception is caught: java.lang.ClassNotFoundException
Loading Thread #1: Finished: false
Main Thread: Waiting for 0 threads
java.lang.ClassNotFoundException exception is caught in "Loading Thread #1": null
1 threads failed during execution.
Main Thread: TEST FAILED
The following test is affected:
runtime/ParallelClassLoading/ClassCircularityError/delegation/forName
Test debug output:
Main Thread: Starting...
Main Thread: Starting classloading...
Loading Thread #1: Ready to start. Waiting for command.
Main Thread: Waiting for threads. Threads running: 1
Loading Thread #1: Starting...
Loading Thread #1: [Delegate custom.A to Loader #2.]
Loading Thread #1: [runtime.ParallelClassLoading.shared.CustomLoader@743399: Loading custom.A from file]
Loading Thread #1: [Delegate custom.B to Loader #1.]
Loading Thread #1: [runtime.ParallelClassLoading.shared.CustomLoader@a981ca: Loading custom.B from file]
Loading Thread #1: Error "java.lang.LinkageError" during defining class "custom.B":
Loading Thread #1: java.lang.LinkageError: custom/A
Loading Thread #1: Calling findLoadedClass("custom.B")...
Loading Thread #1: Returning from findLoadedClass("custom.B")...
Loading Thread #1: ERROR: findLoadedClass("custom.B") returns null when
LinkageError due to class duplication is caught!
Loading Thread #1: Error "java.lang.NoClassDefFoundError" during defining class "custom.A":
Loading Thread #1: java.lang.NoClassDefFoundError: custom/B
Loading Thread #1: Calling findLoadedClass("custom.A")...
Loading Thread #1: Returning from findLoadedClass("custom.A")...
Loading Thread #1: ERROR: findLoadedClass("custom.A") returns null when
LinkageError due to class duplication is caught!
Loading Thread #1: Exception is caught: java.lang.ClassNotFoundException
Loading Thread #1: Finished: false
Main Thread: Waiting for 0 threads
java.lang.ClassNotFoundException exception is caught in "Loading Thread #1": null
1 threads failed during execution.
Main Thread: TEST FAILED
- backported by
-
JDK-2148034 LinkageError is thrown when ClassCircularityError should be reported
- Closed
-
JDK-2152692 LinkageError is thrown when ClassCircularityError should be reported
- Closed
-
JDK-2176865 LinkageError is thrown when ClassCircularityError should be reported
- Closed
-
JDK-2213955 LinkageError is thrown when ClassCircularityError should be reported
- Closed