Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2.9.1
-
None
Description
When I try to edit an existing space using the Remote API, I get the following AlreadyExistsException.
com.atlassian.confluence.rpc.AlreadyExistsException: A space already exists with key 18
Java Code used to perform task:
String spaceKey = getSpaceKey(newTitle); RemoteSpace space = null; try{ space = confluenceWSDLService.getSpace(token, spaceKey); } catch(Exception e){ LOGGER.info("Unable to locate space... creating it now."); } if(space == null){ space = new RemoteSpace(); } space.setKey(spaceKey); space.setName(buildSpaceName(newTitle)); space = confluenceWSDLService.storeSpace(token, space);