"Could not initialize proxy" when loading saved cohort

We have a Platform 1.9.7 installation using the latest version of Reporting compatibility module (version 1.5.8) on a production server. We experience the following issue, which appears to be a configuration hitch specific to the implementation, because the same does not occur when tested on other servers.

On the cohort builder drop down for choosing a cohort to display members, there are two categories: ‘SAVED SEARCHES’ and ‘SAVED COHORTS’. It is not possible to load any cohort under ‘SAVED COHORTS’. Any attempt fails with the following error:

Error marshalling org.openmrs.User_$$_javassist_1: could not initialize proxy - no Session. See the logs for more details.

The stacktrace retrieved from tomcat logs can be found here

Has anyone experienced this before? Could anyone assist to figure out the issue? Thanks!

Can you describe the steps to reproduce this issue?

Thanks Willa,

I have attempted to run the cohort builder on other servers yet could not encounter the error. The server on which this happens is running the latest cohort buider (reporting compatibility module). So I can’t really tell how to reproduce.

It could be a memory related issue

And if it works on other servers, are you sure you have the same datasets?

Thanks Wyclif,

No, the servers that work fine do not have exactly similar database. One of the servers it works fine is a test server, which has de-identified version of data in production database, with no records in report_object table.

But, we have replicated production database on another server, and we experience the same issue. So, what you mean is that the problem is in the database? Could it be with cohort* / report_object tables?


Then this could be because of invalid data, possibly there is a cohort member id that doesn’t exist in the DB, can you confirm that they all exist?