chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Struberg (JIRA)" <>
Subject [jira] [Commented] (CMIS-1075) Allow exclusion of Woodstox dependency
Date Tue, 14 May 2019 09:15:00 GMT


Mark Struberg commented on CMIS-1075:

If the class in question (XMLUtils) has any imports oruse of another class which is not on
the ClassPath, then the JVM will blow up witha {{NoClassDefFoundError}}. The check used to
be less strict in the very past, but since Java-1.6 did introduce stack frame validation it
will now even bomb up if you reference this unavailable class from somewhere within the middle
of your code. Even if you don't import it but use FQCN.

This is exactly what we got here. The solution is to move the code in question to a static
inner class. Thus it will technically become a new class file and the JVM will be fine if
the NCDFE is catched. Attention: NCDFE is an Error, not an Exception. Thus {{catch Exception}}
didn't work neither.

> Allow exclusion of Woodstox dependency
> --------------------------------------
>                 Key: CMIS-1075
>                 URL:
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-commons
>    Affects Versions: OpenCMIS 1.1.0
>            Reporter: Manfred Huber
>            Priority: Critical
>              Labels: build, easyfix, patch, usability
>         Attachments: opencmis_xmlutils.patch
>   Original Estimate: 3h
>  Remaining Estimate: 3h
> We need to exlcude the Woodstox dependency from opencmis in our project, which is currently
not possible.
> If you exclude Woodstox you'll get an {{NoClassDefFoundError}} at runtime.
> The reason is that the class {{XMLUtils}} imports Woodstox classes. The attached patch
resolves this logic in a static inner class.
> Please note that we created this patch based on the {{chemistry-opencmis-1.1.0}} tag.
> I pushed this change to my fork of opencmis on [Github|]
but was not able to create a PR since there's no maintenance branch for 1.1.0.
> Edit: the above link to Github is wrong, the correct one is [this|]

This message was sent by Atlassian JIRA

View raw message