Error Message: librariesElement is null
Submitted by Guest on Mon, 29/06/2015 - 23:05
Hi
When i select a particular patient im getting a scripting error:
Cannot process ServerMessage (Phase 1)
Error Message: librariesElement is null
I have traced the error to the ClientEngine.js file, basically this line in isLibraryLoadComplete:
var librariesElement = EchoServerMessage.messageDocument.getElementsByTagName("libraries").item(0);
is returning null. Can someone point me in the direction from here on what is setting the libraries element and why it might be null?
Re: Error Message: librariesElement is null
I haven't seen this error before. Was the patient entered via the user interface, or loaded in some way?
Typically errors in the client only occur as a result of exceptions being thrown during the rendering phase. If this is the case, you should see an error in the tomcat/logs directory, or on the console.
Re: Error Message: librariesElement is null
I cant see anything in the logs. Which files handle the rendering phase for the patient? Ive followed the patient summary class and it looks like its completing as far as i can tell
Re: Error Message: librariesElement is null
This patient is older it might be from an import process. Others like it are working so far it seems limited to this one only
Re: Error Message: librariesElement is null
You can debug messages between the browser and OpenVPMS using:
http://localhost:8080/openvpms/app/1?debug=true
This should display a Debug popup with the Client Request Message in one pane, and the Server Response Message in the other.
It can be a bit temperamental and not display. If this is the case, change ClientEngine.js in openvpms-web-echo as follows:
You'll need to install openvpms-web-echo for it to be picked up.
Re: Error Message: librariesElement is null
If the error is being triggered by bad data, you may be able to find it using:
This looks for embedded ascii 0 characters in the most likely fields.
If the issue is non-UTF8 data, try
for each of the above.
Re: Error Message: librariesElement is null
awesome found it !!!
that debug screen was handy as, one of the records in the act_details table had a blank space ASCII code in it. All sorted now thanks for that :)