Error searching with created definition key

I’m trying to make a search based on program enrollments in the cohort builder. I’ve had to import demo data from the large demo data sql file found here.

I’ve created a definition key in the builtIn cohort definitions for cohorts You can view that here. Look for the START NEW DEFINITION KEY commennt at the bottom.

I built the reporting module and add it to my standalone distribution.

I then attempt to query the backend at http://localhost:8081/openmrs-standalone/ws/rest/v1/reportingrest/adhocquery?v=full

using the following query as json

  "type": "org.openmrs.module.reporting.dataset.definition.PatientDataSetDefinition",
  "columns": [
      "type": "",
      "name": "Given Name",
      "key": "reporting.library.patientDataDefinition.builtIn.preferredName.givenName"
      "type": "",
      "name": "Family Name",
      "key": "reporting.library.patientDataDefinition.builtIn.preferredName.familyName"
  "customRowFilterCombination": "1",
  "rowFilters": [
      "type": "org.openmrs.module.reporting.cohort.definition.CohortDefinition",
      "key": "reporting.library.cohortDefinition.builtIn.enrolledInProgram",
      "parameterValues": {
        "enrolledOnOrBefore": "2000-01-01"

It returns an error which you can find here.

I’d appreciate any help understanding this error and the error returned generally and any possible fixes thanks.

@mseaton @burke @darius @dkayiwa

@reddberckley, the error you posted is pointing to this line:

profiler.logBefore(“EVALUATION_STARTED”, Context.getAuthenticatedUser().getDisplayString());

This indicates to me that it is likely that there is no Authenticated User in the Context. Have you successfully authenticated before making this call?


I think you are on to something. Logging in via the default admin user and password doesn’t seem to work either. It did before I imported the large demo data into the db. Could this be this issue? and how can I reset or change the password?

Perhaps importing demo data changed your admin password to “test” or to “Admin123”.