Jump to content
We've recently updated our Privacy Statement, available here ×

Cannot cast from boolean to Boolean


ppareit

Recommended Posts

Hi,

 

I have created a report with ireports 2.0.4 and I want to run it from my webapplication (tomcat6 - jdk1.6)

 

I get the following error, looks like the jasper reports compiler uses a pre jdk1.5 compiler.

 

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

1. Cannot cast from boolean to Boolean

value = (java.lang.Boolean)(false);//$JR_EXPR_ID=8$

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

2. Cannot cast from boolean to Boolean

value = (java.lang.Boolean)(false);//$JR_EXPR_ID=8$

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

3. Cannot cast from boolean to Boolean

value = (java.lang.Boolean)(false);//$JR_EXPR_ID=8$

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

3 errors

 

 

 

Thanks in advance

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Well, I think the autoboxing is not working for you.

 

Check expressions which returns true/false (like print when...) and substitue your primitive boolean types with Boolean object, ie.

 

new Boolean(your-expression)

 

or just

 

Boolean.valueOf(your-expression)

--

hope this helps, zgibek

Link to comment
Share on other sites

  • 11 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...