Jasper Reports in Mendix

0
I am building a module to compile Jasper reports through a java action call. I have imported all the libraries, but get a error at the following line in my custom java code: JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters); Error: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: net.sf.jasperreports.engine.JRException: Error loading expression class : Braai2_1521445390345_197221     at MyFirstModule.BTN_java (JavaAction : 'JA_Braai') ..... Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "createClassLoader")     at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)     at java.security.AccessController.checkPermission(AccessController.java:884)     at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)   Any ideas?    
asked
3 answers
2

You can change your 'java.policy' locally.

But to use that in the cloud V3 (!)  you need to file a support ticket. I don't know if Mendix is willing to grant this specific one.

EDIT: see Ronald's Comment regarding cloud V4 (https://docs.mendix.com/deployment/mendixcloud/mxcloudv4

answered
1

Hi Werner,

I would refer to Schalk's answer on this question. This should fix your issue. 

https://forum.mendix.com/link/questions/81932

And here is another post that has some some good information about cloud security.

https://forum.mendix.com/link/questions/3953

 

Also, if you want a way to test locally, you can just turn of the "emulate cloud security" option in your settings. (this will only make it work when you run locally)

answered
1

The only thing that is missing in these answers is that Java security is no longer an issue in the V4 cloud. So the above is indeed true for local or the V3 cloud but not for V4 because security is not checked there.

Regards,

Ronald

 

answered