Couldn't delete Temp dirs after running Creating Artifact
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2012 05:17 AM
Hi there,
While debugging the create artifact function, I noticed that two of these lines appeared in DeploymentMenu version 5.9:
These two lines are not in 5.8 - as it is used as the base for our work on customizing the RCP.
I added that two lines above below the "deployment.refreshLocal". It causes a ResourceException error like:
I remembered reading a past post that the two lines added above was based on a suggestion to clean off temp folders. In Windows presently we can't remove those. Could it be due to different resource handling or it might be an unexpected bug?
Did I miss out something in the designer code related to this func or do I have to turn off some setting at the machine / OS level?
While debugging the create artifact function, I noticed that two of these lines appeared in DeploymentMenu version 5.9:
tempbarFolder.delete(true, null);tempclassesFolder.delete(true, null);
These two lines are not in 5.8 - as it is used as the base for our work on customizing the RCP.
I added that two lines above below the "deployment.refreshLocal". It causes a ResourceException error like:
org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources. at org.eclipse.core.internal.resources.Resource.delete(Resource.java:793) at org.eclipse.core.internal.resources.Resource.delete(Resource.java:746) at workfloweditor.common.DeploymentMenu$1.run(DeploymentMenu.java:139) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)Contains: Could not delete '/test34/tempbar'.org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources. at org.eclipse.core.internal.localstore.FileSystemResourceManager.delete(FileSystemResourceManager.java:352) at org.eclipse.core.internal.resources.ResourceTree.internalDeleteFolder(ResourceTree.java:352) at org.eclipse.core.internal.resources.ResourceTree.standardDeleteFolder(ResourceTree.java:798) at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1941) at org.eclipse.core.internal.resources.Resource.delete(Resource.java:780) at org.eclipse.core.internal.resources.Resource.delete(Resource.java:746) at workfloweditor.common.DeploymentMenu$1.run(DeploymentMenu.java:139) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)Contains: Problems encountered while deleting files.Contains: Could not delete: C:\runtime-workfloweditor.product\test34\tempbar\workflow1.bpmn20.xml.Contains: Could not delete: C:\runtime-workfloweditor.product\test34\tempbar.
Interestingly, this problem doesn't occur when running in the Apple OS platform.I remembered reading a past post that the two lines added above was based on a suggestion to clean off temp folders. In Windows presently we can't remove those. Could it be due to different resource handling or it might be an unexpected bug?
Did I miss out something in the designer code related to this func or do I have to turn off some setting at the machine / OS level?
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2012 02:33 AM
It looks like there's a bug inside the zipDirectory function. The FileInputStream and the ZipOutputStream instance was not closed. This gives error in Windows platform.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2012 10:20 AM
The ZipOutputStream is closed in the finally statement. The FileInputStream wasn't closed, I committed a fix for that.
If it still doesn't work with version 5.9.3 (which I'll release tomorrow), please create a JIRA.
Best regards,
If it still doesn't work with version 5.9.3 (which I'll release tomorrow), please create a JIRA.
Best regards,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2012 10:06 PM
Hi Tijs,
The code works fine. From my side, I have also added the out.close() after the out.closeEntry() as an extra measure in case. It would be better to add that one line in there.
The code works fine. From my side, I have also added the out.close() after the out.closeEntry() as an extra measure in case. It would be better to add that one line in there.
