if (session.itemExists(path)) {
Node node = session.getNode(path);
// check type
- if (type != null && !node.isNodeType(type))
+ if (type != null && !node.isNodeType(type)
+ && !node.getPath().equals("/"))
throw new ArgeoException("Node " + node
+ " exists but is of type "
+ node.getPrimaryNodeType().getName()