sivanthiinfowave / jodconverter

Automatically exported from code.google.com/p/jodconverter
0 stars 0 forks source link

Prevent OOo from leaving lock files #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
OOo 3.0 seems to leave ~.lock.*# files all over the place after conversions.

See if there's a way to prevent OOo from creating them in the first place,
since we're using the -nolockcheck switch anyway.

If that's not possible, then at least delete them?

Original issue reported on code.google.com by mirko.na...@gmail.com on 21 Sep 2008 at 9:48

GoogleCodeExporter commented 8 years ago
The ~.lock.*# files are indeed a new feature in OOo 3.0, meant to provide a
platform-independent locking mechanism to overcome issues with the system 
locking
used by OOo 2.x.

But the lock file should be automatically deleted when a document is closed. 
Still
not clear why this doesn't happen with automated conversions.

Incidentally this raises another point: for conversions the input document 
should
probably be opened read-only so that no lock file is needed.

Original comment by mirko.na...@gmail.com on 26 Oct 2008 at 6:09

GoogleCodeExporter commented 8 years ago
When connecting to an external OOo process (with ExternalProcessOfficeManager) 
lock
files are correctly deleted.

Seems like the problem only occurs when starting OOo from Java (with
ManagedProcessOfficeManager).

Original comment by mirko.na...@gmail.com on 26 Oct 2008 at 8:25

GoogleCodeExporter commented 8 years ago
Turns out that the problem was caused by special characters in the profile dir 
name
used when starting OOo from Java. I guess special characters confuse OOo when 
reading
the string in the lock file so that it doesn't recognise it as being the same 
as the
current OOo process.

Fixed in r39 by replacing ',' and '=' chars. So rather than e.g.

  -env:UserInstallation=file:///tmp/.jodconverter_socket,host=127.0.0.1,port=8100

JODConverter will now use

  -env:UserInstallation=file:///tmp/.jodconverter_socket_host-127.0.0.1_port-8100

Original comment by mirko.na...@gmail.com on 2 Nov 2008 at 6:42

GoogleCodeExporter commented 8 years ago

Original comment by mirko.na...@gmail.com on 27 Mar 2011 at 1:21