org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
Caused by: java.lang.NullPointerException
I would need the full stack trace to understand why this NPE was thrown, could you paste the entirety of it in a paste bin?
Also, does this failed fetching happen only on the patient dashboard? What happens for instance when you access the visit documents page for the same patient, do you observe the same problem?
It would also be helpful to know the exact steps that you took to end up uncovering this bug.
At first sight it looks as if VDUI was trying to render obs from the Visit Note encounter (instead of fetching only those from the Upload Document encounter).
Also, what version of the Ref App distro are you using, and in particular which version of the Core Apps module?
Regarding adding documents to past visits, this has already been implemented but is still currently being tested. It will be part of VDUI 1.2 that should be released within two weeks or so.
I setup OpenMRS again with core modules and VDUI. The error is not generated again. I feel it was due to HTML Entry forms i used to upload the files. If i face the same issue again, i will post the complete stack trace of the error.
Besides, I used the dev copy of VDUI 1.2 but i can not open/download the excel or zip files.
Regarding the Excel or zip files, could you attach somewhere a failing file so that I can test it on my end. That’d be really helpful.
Keep in mind that our dev branch represents an alpha version of the module. You can play around with it as much as you want of course. Anyway, as I said earlier, version 1.2 will be released very soon.
Well actually VDUI should not be on qa-refapp, I suspect that something is not quite right with the way extensions configurations are intertwined on that one.
You should install VDUI on a clean release of the Ref App distro (2.3, 2.4 or 2.5) and it should be ok.
here the module : Visit Documents UI 1.1
when you attach a file in a visit using this module. then try to expand and see the visit notes then you will see the error which is already reported in my post.
During testing, i found that when i removed the XForms module. Everything was working good as normal without error. Therefore, XForms has overlap with VDUI module.
It would be great if you could keep investigating as I really can’t look into that now. Moreover this collision only happens with XForms which is really weird as I believe that XForms doesn’t touch all this at all (cc: @dkayiwa).
Another remark, whatever filtering you would wish to happen based on the encounter type must be made based on its UUID and not its name (such as ‘Visit Document Upload’). This is simply because those names can always be changed later on.
First time the “defaultEncounterTemplate” template is set for that encouter type
second time the “complexObsEncounterTemplate” template is set which is VDUI template
Finally, for all encounters “complexObsEncounterTemplate” template is rendered with causes this issue.
Here is the example:
encounterTemplates.setParameter(‘e22e39fd-7db2-45e7-80f1-60fa0d5a4378’, ‘icon’, ‘icon-signin’);
encounterTemplates.setParameter(‘e22e39fd-7db2-45e7-80f1-60fa0d5a4378’, ‘editable’, ‘true’);
@dkayiwa,I think I have found the culprit in XForms: AppFrameworkServiceAdvisor.
This AOP advisor was added fairly recently and seems to interfere with Core Apps’s PatientDashboardPageController when it invokes getExtensionsForCurrentUser(..)here.
@mksd that advisor just makes custom encounter types editable by setting the editable property to true, hence exposing a bug in the visitdocumentsui module.
I thought you would just fix the NPE in the visitdocumentsui module.