Troubleshooting
This page documents issues that may be encountered using OpenVPMS.
The logs
When things go wrong, it may be helpful to look in the logs. There are two of these: openvpms.log and openvpms-full.log, and they are located in the <TOMCAT-HOME>/logs directory. A given event is written to both, with more detail in the full log. You can also control what is logged by editing the file <TOMCAT-HOME>/webapps/openvpms/WEB-INF/classes/log4j.properties and then using the 'Re-load Log4j configuration' button on the Administration|System screen.
The openvpms.log will contain just the error or warning - for example:
07 Jul 2016 09:28:16,243 WARN LookupMacros,http-bio-8080-exec-4:250 - admin - org.openvpms.macro.MacroException: Failed to evaluate expression='date:format(date:add(java.util.Date.new(),'-30d),'yyyy-MM-dd HH:mm:ss')' for macro=@tt
The openvpms-full.log will contain the above followed by a large amount of trace information - for example:
The trace information is is little use to most of us, but this will be normally followed by as 'Caused by' entry such as:
With luck, you should be able to look at the 'caused by' information and work out what went wrong. [In the above, the problem is that the date:add()'s second argument should be '-30d' - ie its closing quote character is missing.]
Error Message Meanings
Failed to save <object>. It may have been changed by another user
This error occurs when two users edit the same object at the same time. When the second user saves their changes, OpenVPMS rejects them, to avoid the first user's changes being lost.
Failed to create document
This error typically indicates an issue connecting to the OpenOffice service.
On Windows, try terminating the soffice.bin and soffice.exe processes.
On Unix, try terminating the soffice.bin and soffice processes.
Failed to start OpenOffice service: Cannot run program "soffice.exe"
This error occurs when OpenOffice cannot be found in the path. The OpenOffice program directory must be in the PATH environment variable of the user that launches Tomcat.
See the Windows Installation for instructions on how to configure this for Windows.
Failed to start OpenOffice service: failed to connect after 10 attempts
This error occurs when OpenOffice can be launched by OpenVPMS, but does not respond to requests.
This can occur if:
- there is an existing OpenOffice process that is not responding
On Windows, try terminating the soffice.bin and soffice.exe processes.On Unix, try terminating the soffice.bin and soffice processes.
- OpenOffice doesn't have permissions to save the user profile
On Unix installations, OpenOffice tries to save the user profile in the home directory of the user running Tomcat, typically in a sub-directory named .openoffice.org.If the home directory is not writeable, OpenOffice will not respond to requests.
To get the home directory of the Tomcat user:
> grep tomcat7 /etc/passwd | cut -d ":" -f6 /usr/share/tomcat7
To check the ownership and permissions:
> ls -ld /usr/share/tomcat7 drwxr-xr-x 9 root root 4096 Apr 3 03:12 /usr/share/tomcat7
Rather than change group/other permissions, it may be more secure to simply grant ownership to the Tomcat user, whilst keeping the existing group. E.g.:
> chown tomcat7 /usr/share/tomcat7
Synchronisation errors
The message 'A synchronization error has occurred. Click "Ok" to re-synchronize.' will be displayed if you manage to open two OpenVPMS sessions with the same app number. ie normally the URL will be http://localhost:8080/openvpme/app/1
If you click the "Open new browser window" icon at the top right of the screen, this will create a new window with a unique URL, eg http://localhost:8080/openvpms/app/2 and this will work happily. However, if you open a second browser window or tab with same URL, then the synchronization error will occur.
Note that you can also get a synchronisation error if you have multiple windows open and you log out and in before all windows have expired. Fior example if you do the following:
- log in to window 1: URL = http://localhost:8080/openvpms/app/1
- open new window 2: URL = http://localhost:8080/openvpms/app/2
- log out of window 2
- log in to window 2: URL = http://localhost:8080/openvpms/app/1
- switch to window 1, and click something. You should get a synchronization error, if the window hasn't expired with a "Your session has been inactive for too long" message.
If you do get the error, just close one of the duplicate windows.