Access Control Exception when Emulate cloud security is turned on

0
I have a Java action which works fine as long as cloud security is turned off. But when I turn on emulate cloud security, it raises this exception: Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.pdfbox.forceParsing read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374) at java.security.AccessController.checkPermission(AccessController.java:546) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285) at java.lang.System.getProperty(System.java:650) at java.lang.Boolean.getBoolean(Boolean.java:221) at org.apache.pdfbox.pdfparser.BaseParser.<clinit>(BaseParser.java:126) at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1070) at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1038) The invoked method is: pddDocument = PDDocument.load(pdfInputStream); Anyone an idea on how to fix this?
asked
1 answers
3

This library is attempting to get a property value which it is not allowed to do by default in the cloud. When you turn on emulate cloud security it will give you this exception. If you want to deploy this to the cloud you will have to request an exception to this rule. You can add an exception locally too in a similar way as explained in https://forum.mendix.com/questions/3953/Cloud-security-when-using-retrieveURL. Or check https://world.mendix.com/display/refguide4/Java+in+the+Cloud

answered