Issue 109740 - Using writer for a Mail Merge with data stored in an ODB-File produces a file lock on the ODB-File, which persists until *every* OpenOffice window has been closed, although the *.lck file of the ODB gets removed as supposed.
Summary: Using writer for a Mail Merge with data stored in an ODB-File produces a file...
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 3.2
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2010-03-02 14:17 UTC by ajensen
Modified: 2017-05-20 11:35 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

Screenshots & OpenOffice Test-Documents (59.23 KB, application/x-compressed)
2010-03-02 14:19 UTC, ajensen
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description ajensen 2010-03-02 14:17:34 UTC
(This issue is not regarding concurrent ODB-File Access.)

OOO Versions: I've seen that issue in various OpenOffice Versions since one of
the first releases of v2 and this behaviour still exists in v3.2. With the
current version OOO320m12 (Build 9483) I am able to reproduce this behaviour
with every Mail Merge. (In other words: I can't remember one Versions since v2
which did not behave like that.)

OS (32bit): Windows XP SP3 (up-to-date patches), Windows 2000 (up-to-date patches)

JRE (32bit): I'm currently using 1.6.0_18, but older versions of JRE 1.6 doesn't
seem to have any influence on the issue.

File Location: Doesn't seem to matter. Issue occures on local NTFS volume and
samba shared volume (mapped withe a drive letter).

What you need for testing (you can use attached openoffice documents instead,
but you have to register the attached test.odb!):
 1.Create a new OpenOffice DataBase "test.odb"
 2.Register Database in OpenOffice
 3.Open Database, create a table, insert a few fields, generate some random
datasets, close the Database
 4.Create new writer document "test.odt"
 5.Insert the Database Fields into the writer document, save the document and
close it
 6.Create another OpenOffice Document – for example: Generate a calc Document
without content and save it as "xyz.ods"

How to reproduce the issue?
User A:
 1.Open at least one existing writer or calc document (the content doesn't
matter as described in step 6 above); for this testing lets take an empty calc
document and we save it as "xyz.ods" <-- without that step, the error is
sometimes not reproducable! -->
 2.Open "test.odt"
 3.Press printing and answer the question regarding Mail Merge with "yes" one (or all) dataset of the test.odb database
 5.print the mail merge
 6.close the "test.odt", but keep the other openoffice document ("xyz.ods") opened!
 7.try to rename the "test.odb" – it will fail, because there's still a lock on
the file although there doesn't exist any *.lck file anymore!
User B:
Now, if another user tries to access the ODB-File (let's say User B tries to
access the file over a network share), he will get an Java Error Message (->
look at the attached Screenshots) and will not 
be able to read (view) or write anything in the ODB-File. The ODB File is still
locked, although there currently doesn't work anybody with it.
User A is the only one who can remove the file lock (and who is still able to
open and edit the ODB-File at this time): At least he needs to close every
remaining OpenOffice window (in this example: the remaining xyz.ods). Do that
and retry renaming the test.odb - in some cases User A needs to stop the
quickstart utility, too!

Due to this behaviour normal users often lock a ODB file on a network share for
a few hours, although they actually worked with the file only a few minutes.
I've seen users regularly locking ODB files for the whole day because of this
behaviour. This issue is clearly not regarding concurrent ODB access.

While reproducing this issue I realised, that the above described steps 4 and 5
aren't necessary to generate the persitent file lock. It is enough to open the
mail merge window (= start printing and answer yes to mail merge).
Comment 1 ajensen 2010-03-02 14:19:03 UTC
Created attachment 68109 [details]
Screenshots & OpenOffice Test-Documents
Comment 2 drewjensen.inbox 2010-03-03 01:32:00 UTC
This looks kind of like
which is still open.

and a lot like which is
closed back in 2.3

Either way, changing component

@ajensen - Is the mapped directory on a windows server or samba? Thanks
Comment 3 ajensen 2010-03-03 02:11:08 UTC
I've tested the following locations
- samba server
- windows server (win 2003)
- windows client (winxp) using shared folder to grant other users access
=> On all locations I could reproduce the issue.

You are right,
looks similar.
Comment 4 michael.ruess 2010-03-05 10:55:30 UTC
MRU->OS: this sounds like dup of issue 70812 or issue 85133. Can you confirm this?
Comment 5 eric.savary 2010-04-13 23:48:08 UTC
@OS: PLease have a look.
Comment 6 Marcus 2017-05-20 11:35:11 UTC
Reset assigne to the default "".