This page documents issues that may be encountered using OpenVPMS and how to resolve them.

Error Messages

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
Failed to export document

These errors typically indicate 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:

  1. 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.

  2. 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

    If the home directory is not writeable, OpenOffice will not respond to requests.

To get the home directory of the Tomcat user:

> grep tomcat /etc/passwd | cut -d ":" -f6

To check the ownership and permissions:

> ls -ld /usr/share/tomcat8
drwxr-xr-x 9 root root 4096 Apr  3 03:12 /usr/share/tomcat8

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 tomcat8 /usr/share/tomcat8

A synchronization error has occurred

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:

  1. log in to window 1: URL = http://localhost:8080/openvpms/app/1
  2. open new window 2: URL = http://localhost:8080/openvpms/app/2
  3. log out of window 2
  4. log in to window 2: URL = http://localhost:8080/openvpms/app/1
  5. 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.

Unable to connect / This site can't be reached

If messages like these are displayed by the browser when trying to log in to OpenVPMS, verify that that Tomcat is running.


Tomcat no longer starts on Windows

If Tomcat no longer starts on Windows, a Java update may have uninstalled the Java Virtual Machine it was using.
If this is the case:

  • Windows Event Viewer will display:
The Apache Tomcat 8.0 Tomcat8 service terminated with the following service-specific error:
Incorrect function.
  • The Apache Tomcat log file, commons-daemon.<date>.log will display:
[2020-09-02 17:23:32] [info]  [23444] Commons Daemon procrun ( 64-bit) started
[2020-09-02 17:23:32] [info]  [23444] Running 'Tomcat8' Service...
[2020-09-02 17:23:32] [info]  [51384] Starting service...
[2020-09-02 17:23:32] [error] [51384] Failed creating Java C:\Program Files\Java\jre1.8.0_260\bin\server\jvm.dll
[2020-09-02 17:23:32] [error] [51384] The system cannot find the path specified.
[2020-09-02 17:23:32] [error] [51384] ServiceStart returned 1
[2020-09-02 17:23:32] [error] [51384] The system cannot find the path specified.
[2020-09-02 17:23:32] [info]  [23444] Run service finished.
[2020-09-02 17:23:32] [info]  [23444] Commons Daemon procrun finished

To correct the problem:

  1. Go to C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin directory
  2. Run Tomcat8w.exe
  3. On the Java tab, change the path to the new location of the Java Virtual Machine
  4. On the General tab, click Start to start the service

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/ 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(,'-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 of 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.]

Syndicate content