Bug building maps with uppercase file extension?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
jvazquez
Posts: 32
Joined: Thu Feb 17, 2011 10:06 pm

Bug building maps with uppercase file extension?

Post by jvazquez »

Hi,

I just tried transforming a ditamap that had its file extension in upper case (EXAMPLE.DITAMAP for example) to PDF. The transform failed. The case of the filetype should not cause this error. When I changed the extension to lower case, the transform worked. This occurred on Author 12.2, build 2011053115.

Julio J. Vazquez
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Bug building maps with uppercase file extension?

Post by sorin_ristache »

Hello,

I looked into it and it seems the error which is first reported by the move-meta-entries task of DITA-OT

Code: Select all

move-meta-entries:
[pipeline] java.io.FileNotFoundException: S:\projects\eXml-trunk\test\EXM-20414\temp\index-separators.DITAMAP (The system cannot find the file specified)
[pipeline] [DOTJ009E][ERROR] Cannot overwrite file 'S:\projects\eXml-trunk\test\EXM-20414\temp\index-separators.DITAMAP' with file 'S:\projects\eXml-trunk\test\EXM-20414\temp\index-separators.DITAMAP.temp.chunk'. The modified result may not be consumed by the following steps. Check to see whether the file is locked by some other application during the transformation process.
is caused by failure to replace the input file of the move-meta-entries task (a copy of the map file in the temp folder of the transformation) by a rename operation. The code is in MoveMetaModule.execute at line 92:

Code: Select all


      	if (!newMap.renameTo(oldMap)) {
Properties p = new Properties();
p.put("%1", oldMap.getPath());
p.put("%2", newMap.getAbsolutePath()+".chunk");
logger.logError(MessageUtils.getMessage("DOTJ009E", p).toString());
}
and I don't know why it can't do the rename because I can rename or delete the old file (the one that must be replaced, the input file of the move-meta-entries task) in Windows Explorer without problems. Maybe the expert users from the dita-users list know more about this problem?


Regards,
Sorin
jvazquez
Posts: 32
Joined: Thu Feb 17, 2011 10:06 pm

Re: Bug building maps with uppercase file extension?

Post by jvazquez »

Hi Sorin,

It appears that the filetype must be lowercase for the OT. I am currently discussing this with the development team to see why it's so (other than the fact that XML is case sensitive) and if there's any valid reason to respect the case of the file for the transform.

Would you like me to report back the response here?

Julio
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Bug building maps with uppercase file extension?

Post by sorin_ristache »

Yes, please let us know what they think and a possible resolution if they give one.

As far as I could see it is only a matter of renaming a file to another file. There are only Java operations on a file in the local filesystem like new File(), File.delete() and File.renameTo() in the area of source code where the error is reported, and these operations do not care if XML is case sensitive or not so they should not fail regardless of the file extension.


Thank you,
Sorin
Post Reply