0 Replies Latest reply on Jun 6, 2018 8:18 AM by Mayank Gupta

    Jasper jrxml compilation fails in Wildfly-11.0.0.Final if it has scriptlets

    Mayank Gupta Newbie

      My application was working correctly in Wildfly-10.1.0.Final but when I try to deploy it on Wildfly-11.0.0, jasper report stopped working. My compile the jrxml at runtime using JasperAdjusting compiler, however on wildfly11 it seems that jasper compiler is not able to inherit the classpath to find the scriptlet class used in jrxml and fails witht he following error:

       

      Caused by: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:

      1. Only a type can be imported. com.company.component.instruction.Constants resolves to a package

      import com.company.component.instruction.Constants;

             <----------------------------------------------------------------->

      2. com.company.component.helper.ReportHelper cannot be resolved to a type

                      value = ((com.company.component.helper.ReportHelper)parameter_REPORT_SCRIPTLET.getValue()).getData(((java.util.List)parameter_param1.getValue()), ((java.util.List)parameter_param2.getValue())); //$JR_EXPR_ID=1$

       

      These scriptlet classes are available in a jar in ear/lib folder and hence should be available with jasper compiler engine but it looks something has been changed in Wildfly 11.0.0 which has broken the jasper report compilation.

       

      What changes are required in Wildfly 11 so that Jasper compiler get access to ear/lib classpath to compile jasper jrxml template?