pigsie Posted June 22, 2009 Share Posted June 22, 2009 One of our projects uses Jasper reports and uses the Jasper reports ant task to compile the reports. On one machine in particular we get the attached error:However I am hesitant to change any code as this correctly builds on every other machine. This is using JR 3.1.3. This would perhaps indicate that it is a problem with the environment, so I just wanted some suggestions on possible causes for this error or how to go about getting to the bottom of this. Many thanksCode: [jrc] net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: [jrc] 1. Incompatible operand types Integer and int [jrc] value = (java.lang.Boolean)(!((((java.lang.String)parameter_ExportType.getValue()) == "CSV" || ((java.lang.String)parameter_ExportType.getValue()) == "XLS") && ((java.lang.Integer)variable_PAGE_NUMBER.getValue()) != 1)); //$JR_EXPR_ID=10$ [jrc] <-------------------------------------------------------> [jrc] 2. Cannot cast from boolean to Boolean [jrc] value = (java.lang.Boolean)(((java.lang.String)parameter_ExportType.getValue()) != "CSV" && ((java.lang.String)parameter_ExportType.getValue()) != "XLS"); //$JR_EXPR_ID=21$ [jrc] <-----------------------------------------------------------------------------------------------------------------------------------------------> [jrc] 3. Incompatible operand types Integer and int [jrc] value = (java.lang.Boolean)(!((((java.lang.String)parameter_ExportType.getValue()) == "CSV" || ((java.lang.String)parameter_ExportType.getValue()) == "XLS") && ((java.lang.Integer)variable_PAGE_NUMBER.getOldValue()) != 1)); //$JR_EXPR_ID=10$ [jrc] <----------------------------------------------------------> [jrc] 4. Cannot cast from boolean to Boolean [jrc] value = (java.lang.Boolean)(((java.lang.String)parameter_ExportType.getValue()) != "CSV" && ((java.lang.String)parameter_ExportType.getValue()) != "XLS"); //$JR_EXPR_ID=21$ [jrc] <-----------------------------------------------------------------------------------------------------------------------------------------------> [jrc] 5. Incompatible operand types Integer and int [jrc] value = (java.lang.Boolean)(!((((java.lang.String)parameter_ExportType.getValue()) == "CSV" || ((java.lang.String)parameter_ExportType.getValue()) == "XLS") && ((java.lang.Integer)variable_PAGE_NUMBER.getEstimatedValue()) != 1)); //$JR_EXPR_ID=10$ [jrc] <----------------------------------------------------------------> [jrc] 6. Cannot cast from boolean to Boolean [jrc] value = (java.lang.Boolean)(((java.lang.String)parameter_ExportType.getValue()) != "CSV" && ((java.lang.String)parameter_ExportType.getValue()) != "XLS"); //$JR_EXPR_ID=21$ [jrc] <-----------------------------------------------------------------------------------------------------------------------------------------------> Link to comment Share on other sites More sharing options...
lucianc Posted June 25, 2009 Share Posted June 25, 2009 Which report compiler are you using? See the FAQs on report compilation.Regards,Lucian Link to comment Share on other sites More sharing options...
pigsie Posted July 26, 2009 Author Share Posted July 26, 2009 I believe it is using the JDT compiler - I am compiling the project using the ant task from inside Eclipse. I had a read through the FAQ and a book but am still no closer to solving this. As it works on other machines ... I'm guessing it has something to do with my environment..? Link to comment Share on other sites More sharing options...
lucianc Posted August 14, 2009 Share Posted August 14, 2009 Also see this other FAQ on compiling Java 5 expressions.Note that even if you are compiling reports by launching Ant in Eclipse, you still need to explicitly include a JDT jar on the classpath in order to use the JDT compiler.Regards,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now