[JBoss JIRA] (FORGE-908) LinkageError while using ShrinkWrap classes in Arquillian
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-908?page=com.atlassian.jira.plugin.... ]
Ondrej Zizka commented on FORGE-908:
------------------------------------
Could you please extend the documentation with Do's & Don'ts with how to prevent this? Thx
> LinkageError while using ShrinkWrap classes in Arquillian
> ---------------------------------------------------------
>
> Key: FORGE-908
> URL: https://issues.jboss.org/browse/FORGE-908
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Java EE
> Affects Versions: 2.0.0.Alpha4
> Reporter: George Gastaldi
> Assignee: Lincoln Baxter III
> Fix For: 2.0.0.Alpha5
>
>
> In javaee-tests, if you remove the @Ignore from the test test.org.jboss.forge.javaee.servlet.ServletFacetTest.testWebXMLCreatedWhenInstalled() you get the following exception:
> {code}
> Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/modules/ModuleClassLoader) previously initiated loading for a different type with name "org/jboss/shrinkwrap/descriptor/api/webapp30/WebAppDescriptor"
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344)
> at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422)
> at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260)
> at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75)
> at org.jboss.modules.Module.loadModuleClass(Module.java:528)
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119)
> at test.org.jboss.forge.javaee.servlet.ServletFacetTest.testWebXMLCreatedWhenInstalled(ServletFacetTest.java:63)
> ... 88 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1970) Copy cause's message to InvocationTargetException
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1970?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1970:
----------------------------------------
Here are the sources for the arquillian-forge-core project: https://github.com/forge/furnace/tree/master/test-harness/arquillian/core
> Copy cause's message to InvocationTargetException
> -------------------------------------------------
>
> Key: FORGE-1970
> URL: https://issues.jboss.org/browse/FORGE-1970
> Project: Forge
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Reporter: Ondrej Zizka
>
> InvocationTargetException
> in arquillian-forge-core appears without any message and with null cause. The cause is in {{target}} property.
> Then the logging frameworks do not show the additional information.
> I suggest to either copy the error to the {{cause}} property, or at least to copy the message.
> I.e. change this in {{org.jboss.forge.arquillian.ForgeTestMethodExecutor}}
> {code}
> if (e.getCause() != null && e.getCause() instanceof Exception)
> throw (Exception) e.getCause();
> else
> throw e;
> {code}
> into something like
> {code}
> if (e.getCause() != null) {
> if( e.getCause() instanceof Exception)
> throw (Exception) e.getCause();
> else{
> e = new InvocationTargetException( target, target.getMessage);
> // And some reflection to set the cause.
> throw e;
> }
> }
> {code}
> I would make a PR, but I didn't find where the repo for arq-forge-core is.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1970) Copy cause's message to InvocationTargetException
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1970?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-1970:
--------------------------------
Description:
InvocationTargetException
in arquillian-forge-core appears without any message and with null cause. The cause is in {{target}} property.
Then the logging frameworks do not show the additional information.
I suggest to either copy the error to the {{cause}} property, or at least to copy the message.
I.e. change this in {{org.jboss.forge.arquillian.ForgeTestMethodExecutor}}
{code}
if (e.getCause() != null && e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else
throw e;
{code}
into something like
{code}
if (e.getCause() != null) {
if( e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else{
e = new InvocationTargetException( target, target.getMessage);
// And some reflection to set the cause.
throw e;
}
}
{code}
I would make a PR, but I didn't find where the repo for arq-forge-core is.
was:
InvocationTargetException
in arquillian-forge-core appears without any message and with null cause. The cause is in {target} property.
Then the logging frameworks do not show the additional information.
I suggest to either copy the error to the {cause} property, or at least to copy the message.
I.e. change this in {org.jboss.forge.arquillian.ForgeTestMethodExecutor}
{code}
if (e.getCause() != null && e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else
throw e;
{code}
into something like
{code}
if (e.getCause() != null) {
if( e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else{
e = new InvocationTargetException( target, target.getMessage);
// And some reflection to set the cause.
throw e;
}
}
{code}
I would make a PR, but I didn't find where the repo for arq-forge-core is.
> Copy cause's message to InvocationTargetException
> -------------------------------------------------
>
> Key: FORGE-1970
> URL: https://issues.jboss.org/browse/FORGE-1970
> Project: Forge
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Reporter: Ondrej Zizka
>
> InvocationTargetException
> in arquillian-forge-core appears without any message and with null cause. The cause is in {{target}} property.
> Then the logging frameworks do not show the additional information.
> I suggest to either copy the error to the {{cause}} property, or at least to copy the message.
> I.e. change this in {{org.jboss.forge.arquillian.ForgeTestMethodExecutor}}
> {code}
> if (e.getCause() != null && e.getCause() instanceof Exception)
> throw (Exception) e.getCause();
> else
> throw e;
> {code}
> into something like
> {code}
> if (e.getCause() != null) {
> if( e.getCause() instanceof Exception)
> throw (Exception) e.getCause();
> else{
> e = new InvocationTargetException( target, target.getMessage);
> // And some reflection to set the cause.
> throw e;
> }
> }
> {code}
> I would make a PR, but I didn't find where the repo for arq-forge-core is.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1970) Copy cause's message to InvocationTargetException
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1970?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-1970:
--------------------------------
Description:
InvocationTargetException
in arquillian-forge-core appears without any message and with null cause. The cause is in {target} property.
Then the logging frameworks do not show the additional information.
I suggest to either copy the error to the {cause} property, or at least to copy the message.
I.e. change this in {org.jboss.forge.arquillian.ForgeTestMethodExecutor}
{code}
if (e.getCause() != null && e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else
throw e;
{code}
into something like
{code}
if (e.getCause() != null) {
if( e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else{
e = new InvocationTargetException( target, target.getMessage);
// And some reflection to set the cause.
throw e;
}
}
{code}
I would make a PR, but I didn't find where the repo for arq-forge-core is.
was:
InvocationTargetException
in arquillian-forge-core appears without any message and with null cause. The cause is in {target} property.
Then the logging frameworks do not show the additional information.
I suggest to either copy the error to the {cause} property, or at least to copy the message.
I.e. change this
{code}
if (e.getCause() != null && e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else
throw e;
{code}
into something like
{code}
if (e.getCause() != null) {
if( e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else{
e = new InvocationTargetException( target, target.getMessage);
// And some reflection to set the cause.
throw e;
}
}
{code}
I would make a PR, but I didn't find where the repo for arq-forge-core is.
> Copy cause's message to InvocationTargetException
> -------------------------------------------------
>
> Key: FORGE-1970
> URL: https://issues.jboss.org/browse/FORGE-1970
> Project: Forge
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Reporter: Ondrej Zizka
>
> InvocationTargetException
> in arquillian-forge-core appears without any message and with null cause. The cause is in {target} property.
> Then the logging frameworks do not show the additional information.
> I suggest to either copy the error to the {cause} property, or at least to copy the message.
> I.e. change this in {org.jboss.forge.arquillian.ForgeTestMethodExecutor}
> {code}
> if (e.getCause() != null && e.getCause() instanceof Exception)
> throw (Exception) e.getCause();
> else
> throw e;
> {code}
> into something like
> {code}
> if (e.getCause() != null) {
> if( e.getCause() instanceof Exception)
> throw (Exception) e.getCause();
> else{
> e = new InvocationTargetException( target, target.getMessage);
> // And some reflection to set the cause.
> throw e;
> }
> }
> {code}
> I would make a PR, but I didn't find where the repo for arq-forge-core is.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1970) Copy cause's message to InvocationTargetException
by Ondrej Zizka (JIRA)
Ondrej Zizka created FORGE-1970:
-----------------------------------
Summary: Copy cause's message to InvocationTargetException
Key: FORGE-1970
URL: https://issues.jboss.org/browse/FORGE-1970
Project: Forge
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Reporter: Ondrej Zizka
InvocationTargetException
in arquillian-forge-core appears without any message and with null cause. The cause is in {target} property.
Then the logging frameworks do not show the additional information.
I suggest to either copy the error to the {cause} property, or at least to copy the message.
I.e. change this
{code}
if (e.getCause() != null && e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else
throw e;
{code}
into something like
{code}
if (e.getCause() != null) {
if( e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else{
e = new InvocationTargetException( target, target.getMessage);
// And some reflection to set the cause.
throw e;
}
}
{code}
I would make a PR, but I didn't find where the repo for arq-forge-core is.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1969) Exception wrapping hides information
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1969?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-1969:
--------------------------------
Description:
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]
was:
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 issue:
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]
> Exception wrapping hides information
> ------------------------------------
>
> Key: FORGE-1969
> URL: https://issues.jboss.org/browse/FORGE-1969
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Ondrej Zizka
>
> 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.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1969) Exception wrapping looses information
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1969?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-1969:
--------------------------------
Summary: Exception wrapping looses information (was: Exception wrapping hides information)
> Exception wrapping looses information
> -------------------------------------
>
> Key: FORGE-1969
> URL: https://issues.jboss.org/browse/FORGE-1969
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Ondrej Zizka
>
> 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.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1969) Exception wrapping hides information
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1969?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-1969:
--------------------------------
Description:
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 issue:
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]
was:
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]]
> Exception wrapping hides information
> ------------------------------------
>
> Key: FORGE-1969
> URL: https://issues.jboss.org/browse/FORGE-1969
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Ondrej Zizka
>
> 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 issue:
> 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.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1969) Exception wrapping hides information
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1969?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-1969:
--------------------------------
Description:
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]]
was:
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 details of the exception are not treated correctly - message usually disappears, and the underlying exceptions (Exception's cause, InvocationException's target, JAXB's linkedException, ...) are not reported in log, only being accessible through debugging.
One example:
Shown exception:
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]]
> Exception wrapping hides information
> ------------------------------------
>
> Key: FORGE-1969
> URL: https://issues.jboss.org/browse/FORGE-1969
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Ondrej Zizka
>
> 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]]
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1969) Exception wrapping hides information
by Ondrej Zizka (JIRA)
Ondrej Zizka created FORGE-1969:
-----------------------------------
Summary: Exception wrapping hides information
Key: FORGE-1969
URL: https://issues.jboss.org/browse/FORGE-1969
Project: Forge
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Ondrej Zizka
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 details of the exception are not treated correctly - message usually disappears, and the underlying exceptions (Exception's cause, InvocationException's target, JAXB's linkedException, ...) are not reported in log, only being accessible through debugging.
One example:
Shown exception:
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]]
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months