Compile Java error on PDFMergerUtility

0
Hi, when I try to run my project, I get an compile error on teh PDFmergeUtility. (See below) I have updated every module (CommunityCommons/ApplCloudServices/MxModelreflextion/RestServvices)in my project, the error remains :-( Does anybody have an idea how I can fix this ?   Thanks! Onco   ERROR: ---------------------- Buildfile: C:\Users\XXXX\Documents\Mendix\Plop\deployment\build_core.xml compile:     [javac] Compiling 549 source files to C:\Users\XXXX\Documents\Mendix\Plop\deployment\run\bin     [javac] C:\Users\XXXX\Documents\Mendix\Plop\javasource\restservices\publish\RestServiceHandler.java:250: warning: '_' used as an identifier     [javac]             String _) {     [javac]                    ^     [javac]   (use of '_' as an identifier might not be supported in releases after Java SE 8)     [javac] C:\Users\XXXX\Documents\Mendix\Plop\javasource\apportaal\actions\JA_MergePDF.java:15: error: cannot find symbol     [javac] import org.apache.pdfbox.util.PDFMergerUtility;     [javac]                              ^     [javac]   symbol:   class PDFMergerUtility     [javac]   location: package org.apache.pdfbox.util     [javac] C:\Users\XXXX\Documents\Mendix\Plop\javasource\apportaal\actions\JA_MergePDF.java:45: error: cannot find symbol     [javac]         PDFMergerUtility  mergePdf = new  PDFMergerUtility();     [javac]         ^     [javac]   symbol:   class PDFMergerUtility     [javac]   location: class JA_MergePDF     [javac] C:\Users\XXXX\Documents\Mendix\Plop\javasource\apportaal\actions\JA_MergePDF.java:45: error: cannot find symbol     [javac]         PDFMergerUtility  mergePdf = new  PDFMergerUtility();     [javac]                                           ^     [javac]   symbol:   class PDFMergerUtility     [javac]   location: class JA_MergePDF     [javac] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] Note: C:\Users\XXXX\Documents\Mendix\Plop\javasource\com\mendix\core\Core.java uses unchecked or unsafe operations.     [javac] Note: Recompile with -Xlint:unchecked for details.     [javac] 3 errors     [javac] 1 warning BUILD FAILED C:\Users\XXXX\Documents\Mendix\Plop\deployment\build_core.xml:27: Compile failed; see the compiler error output for details. Total time: 5 seconds -------------------
asked
2 answers
2

Onco,

For the error with the identifier please have a look at this forum question: https://forum.mendix.com/link/questions/20022

The other issue has to do with the import of the pdfmergerutility class. In the latest version for Mendix 6 the import should read:

import org.apache.pdfbox.multipdf.PDFMergerUtility

Hope this helps in fixing your issue.

answered
1

Hi Erwin,

thanks for youre help !

Problem fixed.  (reading the release notes :-o of the CommunityCommons module and deleting some old files in the Userlib folder)

Onco

answered