error: unable to get field value

Hi everybody,

I've just encountered this problem: while trying to compile a report I'm getting this error

javax.servlet.ServletException: net.sf.jasperreports.engine.JRException: Unable to get value for field 'data_ultima_revisione' of class 'java.sql.Date'

The strange thing is that nowhere in my report there is a field named "data_ultima_revisione", nor is it present in a query.

Could the problem happen if I have a "SELECT *" in a query, and the field data_ultima_revisione is declared as "date" on the database but has an invalid value? Even if the field is not list in the report fields list?

 

Thanks in advance for your help.

mtassinari's picture
Joined: May 13 2009 - 3:31am
Last seen: 10 years 4 months ago

3 Answers:

I'm having the same problem, with a date field in a MySQL database.  I filtered out the null values to determine if that was the problem but am still getting the error.  In MySQLWorkbench an example of a value in the problem field is '1962-06-03'.  Why would that be a problem for JasperReports?

drummer54's picture
437
Joined: Mar 17 2014 - 7:34am
Last seen: 8 years 4 months ago

mtassinari,

Seems like you answered your own question. The field, data_ultima_revisione, you mentioned does not match a Jasper namespace. Try select the particular fields you need and not "select * " and see if the error goes away.

mmatassa,

You don't have the same problem and should probably post your own question. Riders like this usually don't get good response.

Good Luck to both of you.

djohnson53's picture
166400
Joined: May 25 2012 - 11:10am
Last seen: 1 year 7 months ago
dev_34's picture
228
Joined: Feb 25 2019 - 6:20am
Last seen: 1 year 5 months ago
Feedback
randomness