Showing posts with label jasper server. Show all posts
Showing posts with label jasper server. Show all posts

Wednesday, June 20, 2018

could not initialize lazy properties error in Jasper Server

Sometimes after uploading or importing a modified version of a report Jasper server returns an error like this:

could not initialize lazy properties: [com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.RepoFileResource#9370]
org.hibernate.exception.GenericJDBCException : could not initialize lazy properties: [ com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.RepoFileResource #9370] at ...

This is most likely due to caching of internal server references and could be resolved by restarting the server:

$ jasperreports-server-cp-6.1.0/ctlscript.sh restart

Wednesday, May 22, 2013

org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter

I was getting this error from Jasper server when leaving datetime input control blank:


Error Message

org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $3

Error Trace

org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $3 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at 

Where clause in the query for java.sql.Timestamp column was like this:
and (time_col > $P{inputStartCreatedDate} or $P{inputStartCreatedDate} is null)

The solution is to add explicit type conversion like this:
and (time_col > $P{inputStartCreatedDate} or $P{inputStartCreatedDate}::timestamp is null)