[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 commented on FORGE-1969:
-------------------------------------
Sure. STR:
{code}
git clone git@github.com:OndraZizka/windup.git
git co ReportCommons
cd
mvn clean install -DskipTests
mvn install reporting/xslt
{code}
> 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-1971) Configuration subset issues
by George Gastaldi (JIRA)
George Gastaldi created FORGE-1971:
--------------------------------------
Summary: Configuration subset issues
Key: FORGE-1971
URL: https://issues.jboss.org/browse/FORGE-1971
Project: Forge
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Configuration
Affects Versions: 2.7.2.Final
Reporter: George Gastaldi
Assignee: George Gastaldi
Fix For: 2.x Future
- Configuration.clearProperty() doesn't work when using a configuration subset
- Configuration.getKeys() returns an empty string as the first value when using a configuration subset
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ROASTER-29) Move Formatter to Roaster API
by George Gastaldi (JIRA)
George Gastaldi created ROASTER-29:
--------------------------------------
Summary: Move Formatter to Roaster API
Key: ROASTER-29
URL: https://issues.jboss.org/browse/ROASTER-29
Project: Roaster
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: API, JDT
Affects Versions: 2.7.0.Final
Reporter: George Gastaldi
Fix For: 2.x Future
We should abstract the Formatter class to an interface and leave the implementation in the JDT project
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1957) Remove "throws FileNotFoundException" declaration from JavaSourceFacet
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1957?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1957:
-----------------------------------
Status: Closed (was: Pull Request Sent)
Fix Version/s: 2.7.3.Final
(was: 2.x Future)
Resolution: Done
> Remove "throws FileNotFoundException" declaration from JavaSourceFacet
> ----------------------------------------------------------------------
>
> Key: FORGE-1957
> URL: https://issues.jboss.org/browse/FORGE-1957
> Project: Forge
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Parsers / File Manipulation
> Affects Versions: 2.7.2.Final
> Reporter: George Gastaldi
> Assignee: George Gastaldi
> Labels: api-change
> Fix For: 2.7.3.Final
>
>
> The methods in JavaSourceFacet shouldn't throw FileNotFoundException because a reference to a JavaResource is always returned on the methods, making it never thrown.
--
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 Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-1970?page=com.atlassian.jira.plugin... ]
Lincoln Baxter III commented on FORGE-1970:
-------------------------------------------
I'm not convinced this is the source of the problems, and I think re-throwing the target exception would probably be a better solution anyway. Could you please provide steps to reproduce?
> 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] (ROASTER-28) Support Javadoc generation/parsing
by George Gastaldi (JIRA)
George Gastaldi created ROASTER-28:
--------------------------------------
Summary: Support Javadoc generation/parsing
Key: ROASTER-28
URL: https://issues.jboss.org/browse/ROASTER-28
Project: Roaster
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: API, JDT
Affects Versions: 2.7.0.Final
Reporter: George Gastaldi
Fix For: 2.x Future
--
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:
----------------------------------------
What "target" is that you refer about? I couldn't find it in ForgeTestMethodExecutor
> 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-1969) Exception wrapping looses information
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-1969?page=com.atlassian.jira.plugin... ]
Lincoln Baxter III commented on FORGE-1969:
-------------------------------------------
Could you please add steps to reproduce this problem? Thanks.
> 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