mendix / CommunityCommons

This module adds a number reusable Java methods to your project, which can be called from Microflows or custom Java actions.
Apache License 2.0
13 stars 57 forks source link

Compiling Java actions sometimes fail #116

Closed Robinfr closed 1 year ago

Robinfr commented 2 years ago

It seems that in the latest version of Mx9, compiling the Java actions sometimes fails:

javac] Y:\MxProjects\Project\javasource\communitycommons\Misc.java:687: error: unreported exception COSVisitorException; must be caught or declared to be thrown

This is because the overlayPdf has defined that an IOException can be thrown. But it can also throw a COSVisitorException. I'm not sure if this is something that has changed, but it seems to be not compile anymore for some people, and is fixed after specifying this exception can also be thrown.

grootjans commented 1 year ago

COSVisitorException is a checked exception, and thus causes the compilation to fail. We checked the related library (pdfbox) and this exception was present in the 1.8 of the library, and not the 2.0.x version, which we are using in the current version of Community Commons. We don’t expect this issue to re-occur.