Issue 63339 - Build fails in officecfg
Summary: Build fails in officecfg
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: current
Hardware: All Windows, all
: P1 (highest) Trivial (vote)
Target Milestone: OOo 2.0.3
Assignee: ivo.hinkelmann
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-18 15:12 UTC by quetschke
Modified: 2006-04-18 15:50 UTC (History)
4 users (show)

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


Attachments
does this work ? (679 bytes, patch)
2006-03-20 10:42 UTC, caolanm
no flags Details | Diff
4nt build log (179.96 KB, text/plain)
2006-03-20 18:08 UTC, ivo.hinkelmann
no flags Details
After more investigation (992 bytes, patch)
2006-03-21 16:06 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2006-03-18 15:12:02 UTC
The m160 / W32-tcsh build fails in officecfg with:

-------------+ validating and creating a locale independent file
mkdir.pl ../../../../wntmsci10.pro/misc/registry/data/org/openoffice/ 
guw.pl java -classpath
/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/bin/xml-apis.jar:/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/bin/xercesImpl.jar:../../../../wntmsci10.pro/class/cfgimport.jar
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
org.openoffice.configuration.Inspector Inet.xcu
** Start validating:
file:d:/w1/tin_ws/officecfg/registry/data/org/openoffice/Inet.xcu
** Document is valid!
guw.pl java -classpath
/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/bin/xt.jar:/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/bin/xercesImpl.jar:../../../../wntmsci10.pro/class/cfgimport.jar
-Dcom.jclark.xsl.sax.parser=org.apache.xerces.parsers.SAXParser
com.jclark.xsl.sax.Driver Inet.xcu ../../../../util/data_val.xsl
../../../../wntmsci10.pro/misc/registry/data/org/openoffice/Inet.val
xcs=/cygdrive/d/w1/tin_ws/officecfg/registry/data/org/openoffice/../../../../registry/schema/org/openoffice/Inet.xcs
schemaRoot=/cygdrive/d/w1/tin_ws/officecfg/registry/data/org/openoffice/../../../../registry/schema
java.net.UnknownHostException: d
dmake:  Error code 1, while making
'../../../../wntmsci10.pro/misc/registry/data/org/openoffice/Inet.xcu'
---* tg_merge.mk *---

ERROR: Error 65280 occurred while making
/cygdrive/d/w1/tin_ws/officecfg/registry/data/org/openoffice

This smells like this
  <http://lists.xml.org/archives/xml-dev/200504/msg00571.html>
problem as my java stuff is on c:
Comment 1 pavel 2006-03-18 15:19:44 UTC
me too.

I've got "...: f" because I'm building on f: ;-)
Comment 2 quetschke 2006-03-18 15:21:43 UTC
Hmm, moving ant to d:/ didn't help.

Actually this doesn't look right:

   ** Start validating:
   file:d:/w1/tin_ws/officecfg/registry/data/org/openoffice/Inet.xcu
Comment 3 caolanm 2006-03-20 10:42:07 UTC
Created attachment 35064 [details]
does this work ?
Comment 4 caolanm 2006-03-20 10:43:31 UTC
Attached is the fix I suggested when this cropped up during the m160 Hamburg
build. I guess it must have worked for the Hamburg windows build, but didn't get
committed as a HEAD fix.
Comment 5 Martin Hollmichel 2006-03-20 12:15:20 UTC
reassign
Comment 6 jens-heiner.rechtien 2006-03-20 13:23:43 UTC
reassign
Comment 7 rt 2006-03-20 13:30:48 UTC
rt -> cmc: If I am reading right, the patch you suppose has already been applied
by Ivo on your CWS jaxpapi (see rev. 1.2.88.2 of
officecfg/org/openoffice/configuration/FileHelper.java) and is part of the
(failing) code which leads to this issue.
Comment 8 ivo.hinkelmann 2006-03-20 13:40:47 UTC
in m160 we currently have:

try {
      absPath = "file://" + sSource.replace('\\','/');
} catch (Exception e)


caolans patch introduce a getAbs function call:

absPath = "file://" + aFile.getAbsolutePath().replace('\\', '/');

Can some test his please ?
Comment 9 caolanm 2006-03-20 13:53:36 UTC
Either one should be ok I think.

The original code had getAbsoluteFile().toURL().toString() so my patch retained
that getAbsolute... semantic. The one that is in SRC680_m160 is an optimization
of that and should probably also be ok. So it all looks like the
expected-to-work code is in the right place with the right tag :-(

Strangely the error shown in the build log looks exactly like what the error
would be if no fix was in place. Are we sure that this problem exists with
version 1.3 of officecfg/org/openoffice/configuration/FileHelper.java
Comment 10 ivo.hinkelmann 2006-03-20 14:40:21 UTC
Other question is what happend if the build sources are placed in a directory
/mybuild/äöß/src ? The special characters "äöß" need to be uu encoded in a
correct URL. 

Does a getAbsolutePath() function call trigger such problems ?
Comment 11 ivo.hinkelmann 2006-03-20 18:08:27 UTC
Created attachment 35072 [details]
4nt build log
Comment 12 quetschke 2006-03-20 23:22:21 UTC
Hi, I aplied (m160):

+++ org/openoffice/configuration/FileHelper.java        20 Mar 2006 23:16:37 -0000
@@ -62,7 +62,7 @@
                File aFile = new File(sSource);
                
                try {
-            absPath = "file://" + sSource.replace('\\','/');
+            absPath = "file://" + aFile.getAbsolutePath().replace('\\','/');
             
                } catch (Exception e)
         {


removed wntmsci10.pro and started, build again: 

And still get:-------------+ validating and creating a locale independent file
mkdir.pl ../../../../wntmsci10.pro/misc/registry/data/org/openoffice/ 
guw.pl java -classpath
/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/bin/jaxp.jar:/cygdrive/d/w
1/tin_ws/solver/680/wntmsci10.pro/bin/parser.jar:../../../../wntmsci10.pro/class/cfgimport.jar
-
Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl
org.openoffice.confi
guration.Inspector Inet.xcu
** Start validating:
file:d:/w1/tin_ws/officecfg/registry/data/org/openoffice/Inet.xcu
** Document is valid!
guw.pl java -classpath
/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/bin/xt.jar:/cygdrive/d/w1/
tin_ws/solver/680/wntmsci10.pro/bin/parser.jar:../../../../wntmsci10.pro/class/cfgimport.jar
-Dc
om.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver
Inet.xcu ../../../.
./util/data_val.xsl
../../../../wntmsci10.pro/misc/registry/data/org/openoffice/Inet.val xcs=/cy
gdrive/d/w1/tin_ws/officecfg/registry/data/org/openoffice/../../../../registry/schema/org/openof
fice/Inet.xcs
schemaRoot=/cygdrive/d/w1/tin_ws/officecfg/registry/data/org/openoffice/../../../.
./registry/schema
java.net.UnknownHostException: d
dmake:  Error code 1, while making
'../../../../wntmsci10.pro/misc/registry/data/org/openoffice/
Inet.xcu'
---* tg_merge.mk *---

ERROR: Error 65280 occurred while making
/cygdrive/d/w1/tin_ws/officecfg/registry/data/org/openo
ffice
Comment 13 caolanm 2006-03-21 16:06:51 UTC
Created attachment 35105 [details]
After more investigation
Comment 14 caolanm 2006-03-21 16:09:14 UTC
After a hellish morning trying to create enough of a build environment under
windows despite not have a windows compiler I end up with this patch :-)

Windows java toURL and friends are not consistent with unix ones, and put a
trailing slash at the end of directories. 

So does this new patch work for everyone ?
Comment 15 pavel 2006-03-21 16:22:51 UTC
GNU/Linux/x86: OK, Windows/tcsh: OK!

Caolan: thanks!
Comment 16 ivo.hinkelmann 2006-03-21 16:47:21 UTC
looks good on 4nt too. I am going to open a cws to add this fix asap. Thanks 
Comment 17 ivo.hinkelmann 2006-03-21 17:46:41 UTC
fix applied to cws jaxpapifixer
Comment 18 pavel 2006-03-21 21:09:41 UTC
Issue verified on GNU/Linux x86 and Windows with tcsh.
Comment 19 ivo.hinkelmann 2006-04-18 15:50:55 UTC
closed