AnsweredAssumed Answered

Import whole repository

Question asked by rludvig on Feb 21, 2006
Latest reply on Mar 21, 2006 by assamese
I am using Alfresco 1.1.2 (latest stable release) and have attempted to import an ACP file which contains an entire repository (the equivalent of a backup, created using the "repository root" option from the export menu of the web interface) but have failed. These are the steps that I performed:

1. Export and save the ACP file using the web client (selected "repository root" option).

2. Remove the alf_data folder.

3. Remove the existing database and create a new one (using the remove and setup scripts).

4. Run the importer on the ACP file with admin/admin credentials.

This is the output of the import tool:

14:14:41,796 INFO  [service.descriptor.DescriptorService] Alfresco started (Open
Source) - v1.1.2; repository v1.1.2
The following error has occurred:
Bad credentials presented
org.alfresco.repo.security.authentication.AuthenticationException: Bad credentia
ls presented
        at org.alfresco.repo.security.authentication.AuthenticationComponentImpl
.authenticate(AuthenticationComponentImpl.java:69)
        at org.alfresco.repo.security.authentication.AuthenticationServiceImpl.a
uthenticate(AuthenticationServiceImpl.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
on(AopUtils.java:287)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:155)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:122)
        at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:57)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:144)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:174)
        at $Proxy19.authenticate(Unknown Source)
        at org.alfresco.tools.Tool.login(Tool.java:182)
        at org.alfresco.tools.Tool.start(Tool.java:147)
        at org.alfresco.tools.Import.main(Import.java:54)
Caused by: net.sf.acegisecurity.BadCredentialsException: Bad credentials present
ed
        at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.getUserF
romBackend(DaoAuthenticationProvider.java:393)
        at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenti
cate(DaoAuthenticationProvider.java:225)
        at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(Provi
derManager.java:159)
        at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(Abstr
actAuthenticationManager.java:49)
        at org.alfresco.repo.security.authentication.AuthenticationComponentImpl
.authenticate(AuthenticationComponentImpl.java:63)
        … 15 more

After peeking in the Import and the ContextListener class, I conclude that the normal way to bootstrap a repository is to create it first and then create the admin user and assign him the permissions on that repository. This of course presents a problem with the import of an entire repository.

I also tried to start Alfresco in order to bootstrap the repository, but a subsequent import of a repository root, although successful, would then generate a duplicate company home problem.

Do you have a solution for this particular scenario ??

As a side note, importing also failed when documents were categorised. The categories were not found, although they were declared in the xml file inside the ACP archive, before the files that would reference them.

Outcomes