Bug 1277883 - FileAlreadyExistsException - Designer tries to create new "globals" file when a project is copied
FileAlreadyExistsException - Designer tries to create new "globals" file when...
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Designer (Show other bugs)
Unspecified Unspecified
high Severity high
: ER2
: 6.3.0
Assigned To: Tihomir Surdilovic
Jan Hrcek
: Regression
Depends On:
Blocks: 1263594
  Show dependency treegraph
Reported: 2015-11-04 05:04 EST by Jan Hrcek
Modified: 2016-03-30 06:14 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Hrcek 2015-11-04 05:04:12 EST
Description of problem:
When copying existing project, Designer tries to create new globals file in VFS. This fails with Error modal dialog "File "/DEF/global" already exists." 

Version-Release number of selected component (if applicable):
BRMS ER5 / BPM Suite 6.2.0 ER5

How reproducible:

Steps to Reproduce:
1. Go to project authoring and create new project "ABC"
2. In the project editor that is opened click 'rename' and select new name for the project "DEF"

Actual results:
Modal dialog "ERROR: File "/DEF/global" already exists."

Expected results:
No error when copying the project.

Additional info:
Comment from Michael Anstis:
Tiho will need to ensure Designer's org.jbpm.designer.repository.vfs.VFSRepository.createGlobalDirOnNewProject() method checks whether files already exist.

Please see the log. Looks like you'll need to check if files already exist in the "global" workspace before creating them.
11:03:42,504 ERROR [org.guvnor.common.services.backend.exceptions.ExceptionUtilities] (http-/ Exception thrown: null: org.uberfire.java.nio.file.FileAlreadyExistsException
	at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.createDirectory(JGitFileSystemProvider.java:1012) [uberfire-nio2-jgit-0.7.4.Final-redhat-2.jar:0.7.4.Final-redhat-2]
	at org.uberfire.java.nio.file.Files.createDirectory(Files.java:259) [uberfire-nio2-api-0.7.4.Final-redhat-2.jar:0.7.4.Final-redhat-2]
	at org.uberfire.io.impl.IOServiceDotFileImpl.internalCreateDirectory(IOServiceDotFileImpl.java:327) [uberfire-io-0.7.4.Final-redhat-2.jar:0.7.4.Final-redhat-2]
	at org.uberfire.io.impl.IOServiceDotFileImpl.createDirectory(IOServiceDotFileImpl.java:128) [uberfire-io-0.7.4.Final-redhat-2.jar:0.7.4.Final-redhat-2]
	at org.jbpm.designer.repository.vfs.VFSRepository.createGlobalDirOnNewProject(VFSRepository.java:583) [jbpm-designer-backend-6.3.0.Final-redhat-3.jar:6.3.0.Final-redhat-3]
Comment 1 manstis 2015-11-04 06:07:23 EST
I suspect it won't just be when a project is copied, but also if you try to create two or more projects in the same repository.
Comment 2 Jan Hrcek 2015-11-04 06:13:12 EST
@Michael, actually no, creating multiple projects works without error modal.
But copying / renaming project throws the exception.
Comment 4 Lukáš Petrovický 2015-11-11 10:47:34 EST
This is a confirmed regression from 6.1.
Comment 5 Jan Hrcek 2015-11-18 02:24:42 EST
This fix didn't end up in 6.3.x branch despite being flagged as jboss-bpms-6.2.0+. Please cherry pick to 6.3.x
Comment 6 Kris Verlaenen 2016-03-15 11:00:01 EDT
This already seems fixed in master / 6.4.x branch
Comment 7 Jan Hrcek 2016-03-30 06:14:18 EDT
Verified with BPM Suite 6.3.0 ER2

Note You need to log in before you can comment on or make changes to this bug.