You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Guillaume Belrose <ka...@gmail.com> on 2012/05/02 16:24:04 UTC

Exception when importing XML data previously exported from a repository.

Hi all,

I am trying to implement a backup / restore procedure for my
Jackrabbit repository based on the import/export methods provided by
the Session class.

I've written very basic test classes to recursively export and then
import the content of the root node, so that things such as users and
groups are also imported. The export works fine, however, the import
fails and Jackrabbit complains that the password for the anonymous
user is missing from the xml export file.

Exception in thread "main"
javax.jcr.nodetype.ConstraintViolationException:
/rep:security/rep:authorizables/rep:users/a/an/anonymous: mandatory
property {internal}password does not exist
	at org.apache.jackrabbit.core.ItemSaveOperation.validateTransientItems(ItemSaveOperation.java:537)
	at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:216)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)
	at org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:42)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
	at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:355)
	at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:758)
	at com.quantel.jackrabbit.Import.main(Import.java:27)

My Jackrabbit configuration uses the DefaultLoginModule which AFAIK
uses the values provided as configuration parameter as passwords.

Please see the attachments for more information.

Thanks for your help.

Guillaume Belrose.