Closed glassfishrobot closed 10 years ago
Reported by @pavelbucek
snajper said: Reason for the check is (AFAIR) suggestion from Sahoo to mitigate OSGi classloading issues where you can have classes loaded by multiple classloaders and that will cause weird hard to debug issues.
But I think the real issue here is that there's only one method for loading - not differentiating if the classloader has been passed to newInstance call or not. This should be fixed - in case classloader has been passed we should use only the passed classloader for loading, nothing else. I would discourage this to be fixed within 4.0 though - this will have consequences and we need to understand them properly before delivering the fix.
Issue-Links: is related to JERSEY-1818
Was assigned to yaroska
This issue was imported from java.net JIRA JSR222-46
Marked as fixed on Monday, October 13th 2014, 8:04:02 am
Custom classloader is not used for lookup unless it is Thread.currentThread().getContextClassloader(). I don't see any reason for this check.
See JERSEY-1818 for more context.
Related to JAXB API 2.2.7
workaround: set context ClassLoader to something you want to use before JAXBContext.newInstance(...) call.