Win7 OpenOffice could not connect

I have recently installed OpenVPMS on a Win 7 machine that I was given. When I tried to create or print a patient letter, I got the error "Failed to start OpenOffice service: failed to connect after 10 attempts". Initially, this was a path problem - I had not added the "C:\Program Files (x86)\OpenOffice 4\program" to the path. I remedied this and checked that I could start soffice from the command prompt.

However, this did not fix the problem. Looking at Control Panel|Administrative Tools|Services, I could see that Tomcat was running under the Local System account.  I changed this to run under my account, restarted Tomcat and tried again - patient letters now work.

I reset Tomcat to run under the Local System account - no joy - patient letters now don't work.

To investigate the Local System problem, I used the psexec tool (see http://stackoverflow.com/questions/77528/how-do-you-run-cmd-exe-under-th... ) to start cmd.exe under the system account and started soffice.  This gave me its welcome screen where I had to enter my name and initials, so I did this.

I then restarted Tomcat (still set to run under the Local System account) - bingo - patient letters now work.

HOWEVER, in an effort to understand what had happened (and to check that it was necessary to invoke soffice from the command prompt and answer the welcome screen), I created a new account Test and changed the Tomcat service to run under that.  I started Tomcat and patient letters still work.  Note that I have never logged on as user Test.

So my theory that 'you have to start soffice manually to go through its welcome screen' is wrong.

I have absolutely no idea what the cause of my problem running Tomcat under the Local System account was.

My recovery action of using psexec to run a cmd.exe under the Local System account is probably a little complex.

If you experience this problem, I would suggest running Tomcat under a normal user account, as it is very easy to check whether soffice will run.

Regards, Tim G

Syndicate content