jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Puchkovskiy <roman.puchkovs...@blandware.com>
Subject Import of whole workspace
Date Fri, 04 Apr 2008 09:37:16 GMT

Hi.

I'm trying to do the following: export whole workspace, then import it to
another repository to blank workspace.
Exporting using

session.exportSystemView("/", out, false, false);

Importing using

workspace.importXML("/", in,
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING);

In both cases I login to repository using SimpleCredentials with non-empty
username/password, so it seems my code is allowed to read/write everything.
And I get following:


Caused by: javax.jcr.nodetype.ConstraintViolationException:
/jcr:root/jcr:system/jcr:nodeTypes: cannot add a child to a protected node
	at
org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:779)
	at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1546)
	at
org.apache.jackrabbit.core.xml.SessionImporter.createNode(SessionImporter.java:93)
	at
org.apache.jackrabbit.core.xml.SessionImporter.startNode(SessionImporter.java:215)
	at
org.apache.jackrabbit.core.xml.SysViewImportHandler.processNode(SysViewImportHandler.java:86)
	at
org.apache.jackrabbit.core.xml.SysViewImportHandler.startElement(SysViewImportHandler.java:127)
	at
org.apache.jackrabbit.core.xml.ImportHandler.startElement(ImportHandler.java:192)
	at
org.apache.jackrabbit.commons.DefaultContentHandler.startElement(DefaultContentHandler.java:214)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
	at
org.apache.jackrabbit.commons.DefaultContentHandler.parse(DefaultContentHandler.java:82)
	at
org.apache.jackrabbit.commons.AbstractSession.importXML(AbstractSession.java:125)

Could someone help? Am I wrong trying to import at root? Or it's possible
but I missed something?
-- 
View this message in context: http://www.nabble.com/Import-of-whole-workspace-tp16490211p16490211.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message