I'm using jackrabbit 2.12 as a webapp deployed to tomcat. I created backup xml with

session.exportSystemView(..)

method. When I try to import this backup

InputStream xmlInputStream=new FileInputStream("d://sk.xml");
jcrSession.importXML("/",xmlInputStream,ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);

this exception occured :

javax.jcr.RepositoryException: Internal Server Error
    at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:120)
    at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:51)
    at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:45)
    at org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.isGranted(RepositoryServiceImpl.java:882)
    at org.apache.jackrabbit.jcr2spi.WorkspaceManager.canRead(WorkspaceManager.java:695)
    at org.apache.jackrabbit.jcr2spi.state.ItemStateValidator.checkIsWritable(ItemStateValidator.java:199)
    at org.apache.jackrabbit.jcr2spi.xml.SessionImporter.<init>(SessionImporter.java:130)
    at org.apache.jackrabbit.jcr2spi.SessionImpl.getImportContentHandler(SessionImpl.java:380)
    at org.apache.jackrabbit.jcr2spi.SessionImpl.importXML(SessionImpl.java:390)
...
Caused by: org.apache.jackrabbit.webdav.DavException: Internal Server Error
    at org.apache.jackrabbit.webdav.client.methods.DavMethodBase.getResponseException(DavMethodBase.java:165)
    at org.apache.jackrabbit.webdav.client.methods.DavMethodBase.checkSuccess(DavMethodBase.java:174)
    at org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.isGranted(RepositoryServiceImpl.java:854)
    ... 81 more

and tomcat catalina log:

ERROR [http-nio-8080-exec-1] DavLocatorFactoryImpl.java:64 Unexpected format of resource path.

I found an issue about this problem but no suitable solution. How can I import this xml? (Current files on the repository are insignificant, they can be deleted to import this xml.)

0 Answers