Reporting REST throws 500 when getting Evaluated Report Definition

Hi all, I encountered and 500 server error when using the reporting-rest API to get a evaluated report definition. The endpoint I used is GET http://localhost:9000/openmrs/ws/rest/v1/reportingrest/reportdata/b12bd37f-328f-4ebb-b0fe-10b915ebb8cd?startDate=2020-01-01&endDate=2020-12-31&location=2131aff8-2e2a-480a-b7ab-4ac53250262b&v=custom:(dataSets)

It throws a 500 error due to a ConversionException

You can reproduce the issue from here too


I tried to reproduce the error using but the endpoint works fine there. Maybe it’s an error with the new SNAPSHOT.

  • The version i used: Reporting REST 1.12.0-SNAPSHOT
  • The version in demo server: Reporting REST 1.11.0

So i’ll try installing the version 1.11.0

It didn’t work either. I replaced all the modules in my local instance with the module versions which are used in the But still it throws an internal server error when accessing the endpoint.

Hi @k.joseph , Could you please have a look and give me any clue on this issue. I’m not sure why it works in demo server, but not in the local instance. The DHIS Connector module Run reports function doesn’t work due to this error.

Thank you

cc: @dkayiwa

Try reproducing it here:

@dkayiwa Thanks for the response. :hugs:

The error occurs in here too.

Steps to reproduce:

  1. Logged in
  2. Created a cohort query using reporting module (I created an All patients Query)
  3. Created a new period indicator report
  4. Added a indicator using the cohort query created earlier
  5. Used the endpoint with the uuid of period indicator report

Preview: Login to and go to the link below:

How do you get the reportdata uuid?

I got it from the path parameter

. .

. .

PS: Also i rechecked it from endpoint.


cc: @dkayiwa @k.joseph

This looks to be a bug somewhere in the reporting feature, cc @mseaton.

You need to do some investigation to work on a fix for this

1 Like

Nothing obvious jumps to mind. The underlying error appears to be:

java.lang.NoSuchMethodException: Unknown property ‘class’ on class ‘class org.openmrs.module.reporting.dataset.definition.CohortIndicatorDataSetDefinition’ org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty( org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty( org.apache.commons.beanutils.PropertyUtilsBean.getProperty( org.apache.commons.beanutils.PropertyUtils.getProperty($Property.evaluate($Property.evaluate($Property.evaluate( org.openmrs.module.reportingrest.web.resource.EvaluatedReportDefinitionResource.retrieve( sun.reflect.GeneratedMethodAccessor3222.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(

Someone probably needs to run this through the debugger and see what is going on within the web services module or reporting rest module.


1 Like

Version 1.9.4 of Apache Commons BeanUtils was released primarily as a security bug fix for CVE-2014-0114 to disallow accessing the ‘class’ property. They have an option to opt out of this new default behaviour as demonstrated in this test.

But instead of making OpenMRS less secure by allowing access to the class property, i would rather that we just get rid of this feature.

cc @isears @jnsereko


Thank you @dkayiwa for helping. I tested this by updating the reporting rest module locally and it works!!! I just removed the class property.

Shall I create an issue on JIRA and send a pull request to fix this?

Yes please!

Sure @dkayiwa . I created the issue. Could you please review it and mark it as ‘Ready for work’


Just done that.

Thanks @dkayiwa I Sent the Pull Request and it’s ready for review

Please review and merge

Thanks for merging the Pull Request