]
Steven Hawkins updated TEIID-427:
---------------------------------
Component/s: Common
Fix Version/s: 6.0.0
Complexity: Low
There's nothing wrong with the fix so I'll apply it. But was this from a vdb we
created, or had it been manually modified? We typically only add file entries to vdbs.
Access file error exception when RuntimeIndexSelector trying to load
indexes from zip file
------------------------------------------------------------------------------------------
Key: TEIID-427
URL:
https://jira.jboss.org/jira/browse/TEIID-427
Project: Teiid
Issue Type: Bug
Components: Common
Affects Versions: 6.0.0
Environment: Ubuntu 8.10, Eclipse 3.4.2, Java 1.6.0.12
Reporter: Salvatore Incandela
Assignee: Steven Hawkins
Fix For: 6.0.0
loadIndexesFromZipFile() method extract folders as file, during the unzip process, this
cause an access file error, because the directories will included into the array indexes.
[code]
File entryFile = new File(getIndexDirectoryPath(), entry.getName());
FileUtils.write(zipInputStream, entryFile, length);
if (SimpleIndexUtil.indexFileExists(entryFile)) {
tmp.add(new Index(entryFile.getAbsolutePath(), true));
}
[/code]
I tried this solution, it seems to work:
[code]
File entryFile = new File(getIndexDirectoryPath(), entry.getName());
if (entry.isDirectory()) {
entryFile.mkdir();
} else {
FileUtils.write(zipInputStream, entryFile, length);
}
if (SimpleIndexUtil.indexFileExists(entryFile)) {
tmp.add(new Index(entryFile.getAbsolutePath(), true));
}
[/code]
In this case the indexFileExist() excludes all the directories, form the array indexes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: