Jump to content
Changes to the Jaspersoft community edition download ×

Compile error after upgrade (Groovy, JS6.3)


Recommended Posts

I have a report that has an issue with evaluating a few fields with an expression like this one after upgrading from 6.0 to 6.3.  In 6.0 there was no issue with this statement.  I get confused on how Groovy and Java are intermingled when creating expressions.  There are a few google results that talk about how after groovy 2.4 they began checking overloaded methods more closely but I can't make any sense of what it means.  This is a pretty straightforward shorthand expression for an if-then situation.  Any suggestions on how to write this expression so that it doesn't have an issue being resolved?

($F{dental1}!=null || $F{dental2}!=null || $F{dental3}!=null)? ($F{dental1}+$F{dental2}+$F{dental3})/3:null
Caused by: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Long#plus.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.Character]
[class java.lang.String]
[class java.lang.Number]
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...