Cohort Query - NullPointerException thrown

0 views
Skip to first unread message

Justin Dilts

unread,
Apr 2, 2014, 4:25:35 PM4/2/14
to d...@openmrs.org
We have come across a NullPointerException when attempting to preview a cohort query from it's creation page (prior to being saved).  After the query is saved, it previews and runs with no problems.  What I believe may be the case is that somewhere in the OpenMRS code for cohort queries it specifies that a query must be saved before it can be run or previewed.  Though I am not positive that this is the case, the queries can only be previewed after they are saved.  If anyone has any information regarding this, please do not hesitate to respond. 

I have attached screenshots depicting this error that is thrown on the creation page and not the saved page.  As you can see in the one image (screenshot 1) behind the error, the cohort query has yet to be saved and in the completed query image (screenshot 2) the query has been saved and the background page is on the Cohort Query manager page.

Thanks, 
Justin & the Moravian community
Screen Shot 2014-04-02 at 4.17.11 PM (2).png
Screen Shot 2014-04-02 at 4.22.37 PM (2).png

Justin Dilts

unread,
Apr 2, 2014, 4:31:39 PM4/2/14
to d...@openmrs.org
To specify, this error is occurring within the Reporting Module, Cohort Query section.

Darius Jazayeri

unread,
Apr 2, 2014, 6:22:36 PM4/2/14
to dev
Hi Justin,

Your guess is correct. The preview page does require you to have saved your definition changes beforehand, because it actually loads the definition from the database.

This is true for all the reporting definitions, not just cohort queries.

-Darius


--
OpenMRS Developers: http://go.openmrs.org/dev
Post: d...@openmrs.org | Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/

Reply all
Reply to author
Forward
0 new messages