JDK-7056328 : JSR 292 invocation sometimes fails in adapters for types not on boot class path
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.
When the server compiler spins an ad hoc bytecode adapter (in MethodHandleCompiler), this adapter can sometimes contain references to names not on the BCP. If this adapter is deoptimized, and run in the interpreter, look of these names can fail.
Language runtimes should be placed on the BCP until these corner cases are worked out.
Each ad hoc adapter has its own constant pool, to give meaning to the bytecodes which must mention names. This constant pool should be pre-resolved, coming out of MethodHandleWalk. (MHW has all the live values it needs to do this.) In particular, calls to MH.invoke and MH.invokeExact need to be resolved to customized invokers, with their own "live" MethodTypes. Note that MethodTypes cannot in general be recovered from "flat" signature strings, unless the caller is in the correct class loader. In the case of an ad hoc adapter, the loader is the BCP loader, which cannot see types outside the BCP.