Reports serialization

Hi all,

I have a set of report definitions that have been running very well, until recently some of them have started failing to load on the UI. The error is always saying that there is no report definition available with the specified uuid, yet when you check in the serialized_object table, such definitions exists. Anyone with a clue on what is going on? @mseaton @dkayiwa @mogoodrich, here is a link to the error https://pastebin.com/ujEdvuHm

Did you change any module or Java version?

Daniel,

Yes, on the main server, a normal OS update was done. Taking the server backup and trying to run the same on my local instance which has the following:

openjdk version "1.8.0_222" OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10) OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode) Reporting module 1.17.0 Serialization Xstream 0.2.14 Platform Version: 2.1.4 Build 2cb839 RefApp 2.9.0

And still get into the same problem.

Is there anything I need to change?

Are you running the same version of tomcat as before?

@ningosi we ran into a similar issue after the automated update to Java 8 “222”.

We fixed it and released version 1.18.0 of the reporting module:

Can you try upgrading to Reporting 1.18.0 and see if that fixes the issue?

You error message looks slightly different than the one we were seeing so it’s possible this is something related but will require further debugging to fix.

Take care, Mark

Thanks Mark, I tried updating my reporting module to that version but still the error persisted.

Ugh… can you create a ticket in the Reporting module JIRA and flag @mseaton and myself?

@ningosi do you think you can export and share at least one offending row in that table?

Yes, let me share the entire serialized_object table.

Find the link here, am running refApp 2.0.6 and the offending reports are of uuid fed89032-0017-11e8-9580-f731617cc228 and 713f9b56-0271-11e8-8377-3fa4a39ea76a

Can you also share this module? aihdreports

Here is the git repo https://github.com/IntelliSOFT-Consulting/aihd-reports and the compiled module is here

Is this the screen where you get the error from? http://localhost:8080/openmrs/module/reporting/reports/manageReports.form

I have 12 entries loaded on that page.

When I come on this page http://localhost:8080/openmrs/module/reporting/dashboard/index.form and try to click on Daily Register for example I get that error. That is well displayed when I try to access it via the reporting UI module http://localhost:8080/openmrs/aihdreports/reports.page

All these links load for me without any errors.

Java version: 1.8.0_152, vendor: Oracle Corporation

Default locale: en_UG, platform encoding: UTF-8

OS name: “mac os x”, version: “10.13.6”, arch: “x86_64”, family: “mac”

Then, what is different for me is the java version

openjdk version “1.8.0_222” OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10) OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

Maybe that would be the issue. Let me see if I can have the same java version as you and test again

If possible try this version of java 1.8.0_222 and try again, I will try downgrading mine to your version and see what hapens

I would bet that it’s due to the version of Java… see my post and link above about the issue we needed to fix for that version.

Where is this Daily Register report defined? If it’s defined in code we might be able to take a look and figure it out.

Thanks Mark. The report is defined here https://github.com/IntelliSOFT-Consulting/aihd-reports/blob/master/api/src/main/java/org/openmrs/module/aihdreports/reports/DailyRegisterReport.java

Given the issues that @mogoodrich highlighted above, the issue is with changes that occurred in new versions of Java that prevents certain serialization from working. If you look at the tickets within the reporting 1.18.0 release, we ended up putting 2 fixes in place:

  • Added no-args constructors to DataConverter classes
  • Ensured any inner classes implemented Serializable

Since you appear to have custom DataConverter classes within your module, one thing you could try would be to ensure all of these have no-arg constructors. Your stack trace does indicate that your “org.openmrs.module.aihdreports.reporting.converter.GenderConverter” class might be one that needs addressing.

Mike

Mike,

Thank you very much, I just removed that column with gender and one of the report worked! I highly appreciate for your help