]> git.argeo.org Git - gpl/argeo-suite.git/blobdiff - org.argeo.app.jcr/src/org/argeo/app/jcr/CustomMaintenanceService.java
Prepare next development cycle
[gpl/argeo-suite.git] / org.argeo.app.jcr / src / org / argeo / app / jcr / CustomMaintenanceService.java
index 9bb72de2e4dcd2a8cf605510e50510c763e103bc..2882be00e169ef2bbb9dfa4e3a560777bcacb2a7 100644 (file)
@@ -11,8 +11,8 @@ import javax.jcr.ItemExistsException;
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 
+import org.argeo.api.app.EntityType;
 import org.argeo.api.cms.CmsLog;
-import org.argeo.app.api.EntityType;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.maintenance.AbstractMaintenanceService;
 
@@ -56,7 +56,8 @@ public abstract class CustomMaintenanceService extends AbstractMaintenanceServic
                                                ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
                        } catch (ItemExistsException e) {
                                log.warn("Terms " + name + " exists with another UUID, removing it...");
-                               termsBase.getNode(name).remove();
+                               if (termsBase.hasNode(name))
+                                       termsBase.getNode(name).remove();
                                try (InputStream in = termsUrl.openStream()) {
                                        termsBase.getSession().importXML(termsBase.getPath(), in,
                                                        ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);