[JBoss JIRA] (FORGE-1969) Exception wrapping loses information
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-1969?page=com.atlassian.jira.plugin... ]
Lincoln Baxter III closed FORGE-1969.
-------------------------------------
Fix Version/s: 2.8.1.Final
(was: 2.x Future)
Resolution: Done
Implemented fix in ClassLoaderAdapterCallback
> Exception wrapping loses information
> ------------------------------------
>
> Key: FORGE-1969
> URL: https://issues.jboss.org/browse/FORGE-1969
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Furnace (Container)
> Affects Versions: 2.7.2.Final
> Reporter: Ondrej Zizka
> Assignee: Lincoln Baxter III
> Fix For: 2.8.1.Final
>
>
> In Forge, exceptions are wrapped by Javassist to prevent CCEx when exceptions traverse the addon boundaries.
> But this wrapping is done in a way that the hierarchy of exceptions is not treated correctly - seems that it's only getting to the bottom of causes, dropping the important context and linked information (e.g. InvocationTargetException's target, JAXB's linkedException, ...).
> One example:
> Shown exception:
> org.javassist.tmp.java.lang.Exception_$$_javassist_3c6f95f1-dabc-4ae0-b23a-7fe4056dfdf3: null
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)
> at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:563)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:225)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:445)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:637)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
> at org.jboss.windup.reporting.xslt.jaxb.FrameToJaxbTest.testFrameToJaxb(FrameToJaxbTest.java:80)
> Actual exception:
> javax.xml.bind.JAXBException
> - with linked exception:
> [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "_DEFAULT_:259a118d-0dc2-4d39-bce5-46b4de8d118b_84602e04-6399-449b-89b8-874e07e9bcf9" from AddonModuleLoader]]
> Other example, not sure if the same problem, but similar symptoms:
> Thrown:
> java.lang.reflect.InvocationTargetException: null
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)
> at org.jboss.windup.reporting.xslt.jaxb.FrameToJaxbTest.testFrameToJaxb(FrameToJaxbTest.java:85)
> Actual exception:
> java.lang.reflect.InvocationTargetException
> target: java.lang.reflect.InvocationTargetException
> target: java.lang.NoClassDefFoundError: org/eclipse/persistence/jaxb/JAXBContextFactory
> cause: java.lang.ClassNotFoundException: org.eclipse.persistence.jaxb.JAXBContextFactory from [Module "_DEFAULT_:d6fe055f-7707-4e8e-ae01-3996910ddefe_3e63525b-91df-4f68-b300-a1166a74fa46" from AddonModuleLoader]
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)