Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7694237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:16:25+00:00 2026-05-31T21:16:25+00:00

I recently made an update to JasperReports library version 4.1.3. Previously, I had a

  • 0

I recently made an update to JasperReports library version 4.1.3. Previously, I had a report created with JasperReports 4.0.2, with the language being groovy. Running it with JasperReports 4.1.3 generates an exception (ClassCastException – cannot cast java.lang.String to java.lang.Boolean).

The exception is somewhat correctly generated, as I have set a string (e.g.: “abc”) for the PrintWhen Expression of a text field. The problem is that before updating to this library, the report worked, even with an expression like that.

An expression like: “any_string” was evaluated as true and an empty string was evaluated as false.

Is there a property that can be set in order to have the same behavior as before without changing the report? (I know that a solution would be to change the conditions to be proper boolean ones, but it’s not a viable solution for me, as there are lots of reports involved and lots of complex conditions).

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:16:27+00:00Added an answer on May 31, 2026 at 9:16 pm

    After analyzing the change logs and the SVN logs for the Jasperreports library, I discovered that a change was made in the release 4.1.1, and the cast to the class is not done anymore. This is part of the refactoring regarding the deprecation of value class in expressions.

    From the change log:
    – value class property is now deprecated in expression objects; the type of
    expression no longer needs to be specified;

    The solution is to modify the print when expresion to be a correct boolean expression or to add a cast for each print when expression.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently made my own Javascript library and I initially used the following pattern:
I released an update to one of my apps recently. This update made some
I recently installed the EF4.1-Update. When I made a new MVC3 Project and tried
I recently made this wordpress blog, where you can sign up a team for
I've recently made another question about connecting to MS-ACCESS database with .NET in C#
I'm working on a site that is using Facebook Connect and recently made some
Let me set the stage here. I'm a very junior developer who's recently made
I'm using boost for several C++ projects. I recently made a upgrade (1.33.1 to
Recently I made a bunch of changes to my local svn config file. Mainly
Recently I made the WPF application and want to publish it for many users

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.