Issue 50885

Summary: Need long paths on Windows: Error installing extension's own configuration schema on Windows
Product: udk Reporter: paolomantovani <p_manto>
Component: codeAssignee: thorsten.martens
Status: CLOSED FIXED QA Contact: issues@udk <issues>
Severity: Trivial    
Priority: P2 CC: arielch, bart.aimar, cno, issues, joachim.lingner, joerg.skottke, kai.sommerfeld, maison.godard, Mathias_Bauer, robbin.knapp, stephan.bergmann.secondary
Version: current   
Target Milestone: OOo 3.3   
Hardware: PC   
OS: Windows, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
xcu file to install
none
A basic script that stores and loads a document to the URL, that needs long path support. Please adjust the URL in the test before using. none

Description paolomantovani 2005-06-17 11:06:25 UTC
an Italian user has reported problems trying to install the UNO package 
TextToColumns on 1.9.m104 in Windows XP using the package manager available 
from the menu. 
 
The package is available here: 
http://prdownloads.sourceforge.net/ooomacros/TextToColumns.uno2005-04-19.zip 
 
Here the results of some test done: 
Win XP: 
M91 -  does not work (my test)  
M104 -  does not work (an italian user test) 
 
Linux : 
M100 - works fine 
Other - I'm sure to have installed the package without problems in several 
previous OOo 1.9.mXX builds 
 
As a further info, the same package installs without any problems in any 
OOo1.1.x (with pkgchk) in both Linux and Windows 
 
Here the output of the unopkg call: 
----------- 
Microsoft Windows XP [Versione 5.1.2600] 
(C) Copyright 1985-2001 Microsoft Corp. 
 
C:\Documents and Settings\paolo.PAGANINI\Desktop>"c:\Programmi\OpenOffice.org  
1.9.91\program\unopkg" add TextToColumns.uno2005-04-19.zip 
WARNING: An error occurred while enabling the package: AddonConfiguration.xcs,  
Cause: (com.sun.star.ucb.InteractiveAugmentedIOException) { { { { Message =  
"general error during transfer", Context = (com.sun.star.uno.XInterface)  
0xe7cd8c (ImplementationName = "com.sun.star.comp.ucb.FileContent") },  
Classification = (com.sun.star.task.InteractionClassification) ERROR }, Code  
= (com.sun.star.ucb.IOErrorCode) INVALID_PARAMETER }, Arguments = ([]any)  
{ { (com.sun.star.beans.PropertyValue) { Name = "Uri", Handle = (long) -1,  
Value = (any)  
{ "file:///C:/Documents%20and%20Settings/paolo.PAGANINI/Dati%20applicazioni/OpenOffice.org1.9.91/user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/registry/schema/org/openoffice/Office/Addons/TextToColumns" },  
State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } },  
{ (com.sun.star.beans.PropertyValue) { Name = "ResourceName", Handle = (long)  
-1, Value = (any) { "C:\\Documents and Settings\\paolo.PAGANINI\\Dati  
applicazioni\\OpenOffice.org1.9.91\\user\\uno_packages\\cache\\registry\\com.sun.star.comp.deployment.configuration.PackageRegistryBackend\\registry\\schema\\org\\openoffice\\Office\\Addons\\TextToColumns" },  
State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } },  
{(com.sun.star.beans.PropertyValue) { Name = "ResourceType", Handle = (long)  
-1, Value = (any) { "folder" }, State = (com.sun.star.beans.PropertyState)  
DIRECT_VALUE } } } } 
 
 WARNING: An error occurred while enabling the package:  
AddonConfiguration.xcu,Cause:  
(com.sun.star.configuration.backend.BackendAccessException) { { { Message =  
"Configuration LocalOutputStream - IO Error: Cannot open file  
\"file:///C:/Documents%20and%20Settings/paolo.PAGANINI/Dati%20applicazioni/OpenOffice.org1.9.91/user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/registry/data/org/openoffice/Office/Addons/TextToColumns/AddonConfiguration.xcu_tmp\"  
for writing. Error is the format of the parameters was not valid [21].",  
Context = (com.sun.star.uno.XInterface) 0x0 }, TargetException = (any)  
{ (com.sun.star.io.IOException) { { Message = "Cannot open file  
\"file:///C:/Documents%20and%20Settings/paolo.PAGANINI/Dati%20applicazioni/OpenOffice.org1.9.91/user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/registry/data/org/openoffice/Office/Addons/TextToColumns/AddonConfiguration.xcu_tmp\"  
for writing. Error is the format of the parameters was not valid [21].",  
Context = (com.sun.star.uno.XInterface) 0x0 } } } }
Comment 1 Daniel Boelzle [:dbo] 2005-06-20 12:22:18 UTC
BTW: one issue I have found in the AddonConfiguration.xcu: string "Ins&#233;rer
des colonnes" has the wrong lang locale.
Comment 2 Daniel Boelzle [:dbo] 2005-06-20 13:37:07 UTC
@paolomantovani: sorry, I cannot reproduce this issue. It works for me, i.e. I
can install it (with assertion I mentioned above), and Calc has an addon entry.
=> back to you.
Comment 3 Daniel Boelzle [:dbo] 2005-06-20 13:37:27 UTC
.
Comment 4 paolomantovani 2006-11-29 14:13:13 UTC
please reopen:
the problem seems due to the lenght of the (registry) package-name
Try to install the xcu file in attachment to reproduce the bug 
(should affect both linux and windows)
Comment 5 paolomantovani 2006-11-29 14:15:04 UTC
Created attachment 40991 [details]
xcu file to install
Comment 6 paolomantovani 2006-12-06 10:15:23 UTC
reopen
Comment 7 bart_aimar 2006-12-06 12:36:55 UTC
Confirmed!
Any packages already installed on OOo older versions (w2k eng) are impossible to
install on OOo 2.0.3 and 2.0.4 (same SO)
Comment 8 Ariel Constenla-Haile 2008-02-07 15:15:22 UTC
added myself to cc
Comment 9 Ariel Constenla-Haile 2008-02-07 15:16:43 UTC
changed version to *current*, as it does not depend on any version in particular
Comment 10 cno 2008-02-07 15:29:43 UTC
set to new
Comment 11 Ariel Constenla-Haile 2008-02-07 15:59:08 UTC
As pointed by paolomantovani on Wed Nov 29 14:13:13 +0000 2006, the problem is
with the length of the path generated when deploying an extension containing a
configuration schema.

For example, the following is the path of one of the extensions I couldn't
install (I complete here the whole path, but of course it couldn't be installed):

C:\Documents and Settings\ArielConstenlaHaile\Datos de
programa\OpenOffice.org2\user\uno_packages\cache\registry\com.sun.star.comp.deployment.configuration.PackageRegistryBackend\registry\schema\ar\com\arielconstenlahaile\ooomysqlconnector\ConnectionSettings.xcs

As you can see the path turns out to be 262 chars., over Windows limit (ca. 255).

So I get error messages when trying to install it with the Extension Manager gui:

C:\Documents and Settings\ArielConstenlaHaile\Datos de
programa\OpenOffice.org2\user\uno_packages\cache\registry\com.sun.star.comp.deployment.configuration.PackageRegistryBackend\registry\schema\ar\com\arielconstenlahaile
does not exist

and

Cannot create folder: ...


To reproduce this issue, take any extension with a configuration schema, and add
characters to the schema name until you get the error.
This will of course depend on the full generated path, on the computer of the
one who is testing the issue. 
AFAIK try to generate a path with more than 255 characters, and you will get the
error.
Comment 12 Ariel Constenla-Haile 2008-02-07 16:03:30 UTC
Cahnged the summary to "Error installing extension's own configuration schema on
Windos", because it happens only on Windows if the extension has an own
configuration schema.
Comment 13 paolomantovani 2008-02-07 18:17:07 UTC
Juergen: reassigned to you following your suggestion in dev@extensions ML
Comment 14 Ariel Constenla-Haile 2008-02-07 18:21:30 UTC
corrected summary "Windos" > "Windows"
Comment 15 jsc 2008-03-19 13:49:29 UTC
jsc -> jl: we should try to shorten the path. But it would be only a temporary
solution until somebody put a deep directory hierarchy in his extension package.
Not really satisfying
Comment 16 joachim.lingner 2008-04-18 15:08:36 UTC
Well this should be fixed correctly. Meanwhile extension writers should keep the
"registry paths" as short as possible.

jl->hro: Please change the file API to use long paths on windows.
Comment 17 joachim.lingner 2008-04-18 15:10:33 UTC
changed summary.
Comment 18 joachim.lingner 2008-04-18 15:12:06 UTC
.
Comment 19 hennes.rohling 2008-04-21 13:46:00 UTC
Accepted.
Comment 20 hennes.rohling 2008-07-18 09:15:05 UTC
CCed jl
Comment 21 hennes.rohling 2008-07-24 12:23:20 UTC
Targeted for OOo 3.1

Will be a huge amount of work because path names longer than 260 characters are
only supported by unicode APIs (that's no problem as most of the code (SAL)
already uses unicode APIs) and all system paths have to be prefixed by "\\?\".

The caveat is that those path are handled different by the kernel (f.e. no
relative paths are allowed) and those paths are not suitable for system
integration and/or interaktion with third party programs.
Comment 22 Stephan Bergmann 2008-08-15 12:09:06 UTC
*** Issue 66389 has been marked as a duplicate of this issue. ***
Comment 23 kai.sommerfeld 2008-09-30 12:08:36 UTC
.
Comment 24 hennes.rohling 2009-01-27 10:06:42 UTC
Fixed on longpath3
Comment 25 thorsten.martens 2009-01-29 10:20:23 UTC
checked and verified in cws longpath3 -> OK !
Comment 26 thorsten.martens 2009-01-29 10:47:36 UTC
reassigned for qa
Comment 27 kai.sommerfeld 2009-02-19 08:59:40 UTC
Unfortunately we missed the 3.1 code freeze deadline. Bug is fixed, but
respective CWS is not approved by QA. Really don't like this, but need to 
retarget the task to 3.2. Sorry.
Comment 28 stefan.baltzer 2009-03-26 16:17:18 UTC
*** Issue 95684 has been marked as a duplicate of this issue. ***
Comment 29 mikhail.voytenko 2009-06-23 08:03:59 UTC
*** Issue 102937 has been marked as a duplicate of this issue. ***
Comment 30 joachim.lingner 2009-06-23 14:35:24 UTC
*** Issue 102281 has been marked as a duplicate of this issue. ***
Comment 31 kai.sommerfeld 2009-07-13 13:41:25 UTC
CWS longpath3 does not contain any code changes. Need to reopen issue.
Comment 32 kai.sommerfeld 2009-07-13 13:42:17 UTC
... back to hro (for now).
Comment 33 kai.sommerfeld 2009-07-13 14:38:56 UTC
mav: Please take over. You should talk to hro how to fix this. Basically, this
is a new feature: "Long path names on Windows". The bug can hit us always and
everywhere if long paths are involved. We should try to fix this for 3.2, if
your time allows.
Comment 34 mikhail.voytenko 2009-09-22 11:11:51 UTC
Unfortunately there was not enough resources to get this issue to OOo3.2.
Changing the target to OOo3.3.
Comment 35 mdxonefour 2009-11-04 16:37:00 UTC
MD: Adding myself to cc and raising prio
Comment 36 joerg.skottke 2010-01-04 14:15:16 UTC
Add myself
Comment 37 Stephan Bergmann 2010-01-20 08:40:57 UTC
*** Issue 108461 has been marked as a duplicate of this issue. ***
Comment 38 mikhail.voytenko 2010-02-02 14:25:49 UTC
sal API looks now to support the long paths successfully. There is still a
problem with Berkeley DB, it does not support long paths in any form ( with or
without "\\?\" prefix ). I will submit a standalone issue to workaround the
Berkeley DB problem.
Comment 39 mikhail.voytenko 2010-02-10 07:47:00 UTC
The new issue regarding Berkeley DB problems is issue 109096.
Comment 40 mikhail.voytenko 2010-02-10 07:50:59 UTC
Created attachment 67724 [details]
A basic script that stores and loads a document to the URL, that needs long path support. Please adjust the URL in the test before using.
Comment 41 mikhail.voytenko 2010-02-10 07:53:32 UTC
mav->tm: Please verify the issue. To do so, please try the explained scenario,
now the message from unopkg.exe should refer to the exception from Berkeley DB.
Additionally please use the attached basic script to test storing and loading
per API to the locations, that need long path support.
Comment 42 thorsten.martens 2010-02-17 07:51:25 UTC
.