compilation error on upgrading the project to 6.10.7 from 5.19

0
hi,  i am getting this java compilation error on upgrading my project locally from 5.19 to 6.10.7.  How do i resolve this ? i did re-imported the community commons module again  [javac] Compiling 477 source files to C:\Users\rachana.bp\Documents\Mendix\Marine-main\deployment\run\bin     [javac] C:\Users\rachana.bp\Documents\Mendix\ Marine-main\javasource\communitycommons\Misc.java:660: error: unreported exception COSVisitorException; must be caught or declared to be thrown     [javac]         overlay.overlay(new HashMap<Integer, String>()).save(baos);     [javac]                                                             ^     [javac] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] Note: C:\Users\rachana.bp\Documents\Mendix\ Marine-main\javasource\com\mendix\core\Core.java uses unchecked or unsafe operations.     [javac] Note: Recompile with -Xlint:unchecked for details.     [javac] 1 error  
asked
3 answers
3

Hi Rachana,

It is indeed caused by an old pdf box library.

If you just want to resolve the compilation error, you can add import org.apache.pdfbox.exceptions.COSVisitorException; to Misc.java in the javasource communitycommons directory.

The cleaner solution is what Andrej decribes,

answered
2

Probably you still have an old pdfbox library in your userlibs.

answered
1

Hi Rachana,

 

In this situation I would try the following:

 

Remove all java actions from community commons, delete all files in 

javasource\communitycommons\actions\

2. Delete any java libraries used by community commons. In order to check which libraries are being used try to reimport community commons and then see the "conflicted" libraries, then delete them in 

userlib\

3. Reimport community commons.

 

I hope this solves your problem.

Andrej

answered