You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Rakesh Kumar (JIRA)" <ji...@apache.org> on 2019/08/10 11:58:00 UTC
[jira] [Updated] (FELIX-6167)
org.apache.commons.io.FileExistsException when installing bundle from web
console
[ https://issues.apache.org/jira/browse/FELIX-6167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rakesh Kumar updated FELIX-6167:
--------------------------------
Description:
I get a *org.apache.commons.io.FileExistsException* when installing bundle from web console.
it only happens when there is v1.4 of commons-fileupload bundle present, works with v.1.3.3
*DiskFileItem* in v1.4 has code updated for write method which *BundleServlet* uses for writing temp file.
*FileUtils.moveFile(outputFile, file)* call is failing here because it does an exists check on temp file created by *BundleServlet*.
// Code snippet from *DiskFileItem.write*
{code:java}
File outputFile = getStoreLocation();
if (outputFile != null) {
// Save the length of the file
size = outputFile.length();
/*
* The uploaded file is being stored on disk
* in a temporary location so move it to the
* desired file.
*/
FileUtils.moveFile(outputFile, file);
}{code}
was:
I get a *org.apache.commons.io.FileExistsException* when installing bundle from web console.
it only happens when there is v1.4 of commons-fileupload bundle present, works with v.1.3.3
*DiskFileItem* in v1.4 has code updated for writeFile method which *BundleServlet* uses for writing temp file.
*FileUtils.moveFile(outputFile, file)* call is failing here because it does an exists check on temp file created by *BundleServlet*.
// Code snippet from *DiskFileItem.writeFile*
{code:java}
File outputFile = getStoreLocation();
if (outputFile != null) {
// Save the length of the file
size = outputFile.length();
/*
* The uploaded file is being stored on disk
* in a temporary location so move it to the
* desired file.
*/
FileUtils.moveFile(outputFile, file);
}{code}
> org.apache.commons.io.FileExistsException when installing bundle from web console
> ----------------------------------------------------------------------------------
>
> Key: FELIX-6167
> URL: https://issues.apache.org/jira/browse/FELIX-6167
> Project: Felix
> Issue Type: Bug
> Components: Web Console
> Affects Versions: webconsole-4.3.12
> Reporter: Rakesh Kumar
> Priority: Major
>
> I get a *org.apache.commons.io.FileExistsException* when installing bundle from web console.
> it only happens when there is v1.4 of commons-fileupload bundle present, works with v.1.3.3
> *DiskFileItem* in v1.4 has code updated for write method which *BundleServlet* uses for writing temp file.
> *FileUtils.moveFile(outputFile, file)* call is failing here because it does an exists check on temp file created by *BundleServlet*.
> // Code snippet from *DiskFileItem.write*
> {code:java}
> File outputFile = getStoreLocation();
> if (outputFile != null) {
> // Save the length of the file
> size = outputFile.length();
> /*
> * The uploaded file is being stored on disk
> * in a temporary location so move it to the
> * desired file.
> */
> FileUtils.moveFile(outputFile, file);
> }{code}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)