cancel
Showing results for 
Search instead for 
Did you mean: 

Importing a Tenant ...

darkmstr
Champ in-the-making
Champ in-the-making
Hey guys, I'm having troubles trying to do this on my company.

1. Install Alfresco 4.0.e (OK).
2. Export a tenant from my working repository Alfresco 4.0.d (OK)
3. Enable MT in Alfresco 4.0.e (OK)
4. Restart Alfresco 4.0.e (OK)
5. Access to the MT Admin Console in the 4.0.e repository (OK)
6. Import tenant using (import test.com /path/to/the/exported/tenant /path/to/the/new/contentstore), FAILED.

The error in the admin console is

Last command: help
Duration: 2ms
—–
org.alfresco.error.AlfrescoRuntimeException: 08240011 Bootstrap failed
   at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:361)
   at org.alfresco.repo.tenant.MultiTAdminServiceImpl.bootstrapVersionTenantStore(MultiTAdminServiceImpl.java:872)
   at org.alfresco.repo.tenant.MultiTAdminServiceImpl.importBootstrapVersionTenantStore(MultiTAdminServiceImpl.java:862)
   at org.alfresco.repo.tenant.MultiTAdminServiceImpl.importTenant(MultiTAdminServiceImpl.java:448)
   at org.alfresco.repo.tenant.TenantInterpreter.executeCommand(TenantInterpreter.java:307)
   at org.alfresco.repo.tenant.TenantInterpreter$1$1.execute(TenantInterpreter.java:142)
   at org.alfresco.repo.tenant.TenantInterpreter$1$1.execute(TenantInterpreter.java:139)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:259)
   at org.alfresco.repo.tenant.TenantInterpreter$1.doWork(TenantInterpreter.java:145)
   at org.alfresco.repo.tenant.TenantInterpreter$1.doWork(TenantInterpreter.java:135)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.repo.tenant.TenantInterpreter.interpretCommand(TenantInterpreter.java:148)
   at org.alfresco.web.bean.repository.tenant.TenantAdminConsoleBean.interpretCommand(TenantAdminConsoleBean.java:184)
   at org.alfresco.web.bean.repository.tenant.TenantAdminConsoleBean.submitCommand(TenantAdminConsoleBean.java:160)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
   at javax.faces.component.UICommand.broadcast(UICommand.java:151)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:115)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:191)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
   at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:105)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:80)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:143)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.repo.web.filter.beans.SessionSynchronizedFilter.doFilter(SessionSynchronizedFilter.java:67)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.AdminAuthenticationFilter.doFilter(AdminAuthenticationFilter.java:76)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy240.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:68)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy240.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:662)
Caused by: org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 108; column 28 due to error: Invalid store: workspace://@imocom.com.co@version2Store
   at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:194)
   at org.alfresco.repo.importer.ImporterComponent.parserImport(ImporterComponent.java:414)
   at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:263)
   at org.alfresco.repo.importer.ImporterBootstrap.doImport(ImporterBootstrap.java:479)
   at org.alfresco.repo.importer.ImporterBootstrap.access$000(ImporterBootstrap.java:70)
   at org.alfresco.repo.importer.ImporterBootstrap$1$1.execute(ImporterBootstrap.java:350)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.importer.ImporterBootstrap$1.doWork(ImporterBootstrap.java:354)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:357)
   … 73 more
Caused by: org.alfresco.service.cmr.repository.InvalidStoreRefException: Invalid store: workspace://@imocom.com.co@version2Store
   at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.getRootNode(AbstractNodeDAOImpl.java:696)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.getRootNode(DbNodeServiceImpl.java:277)
   at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:137)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy8.getRootNode(Unknown Source)
   at org.alfresco.repo.version.VersionServiceImpl.getRootNode(VersionServiceImpl.java:733)
   at org.alfresco.repo.version.Version2ServiceImpl.getVersionHistoryNodeRef(Version2ServiceImpl.java:897)
   at org.alfresco.repo.version.Version2ServiceImpl.getVersionHistory(Version2ServiceImpl.java:421)
   at org.alfresco.repo.importer.ImporterComponent$NodeImporter.generateVersioningForVersionableNode(ImporterComponent.java:668)
   at org.alfresco.repo.importer.ImporterComponent$NodeImporter.importNode(ImporterComponent.java:651)
   at org.alfresco.repo.importer.view.ViewParser.importNode(ViewParser.java:919)
   at org.alfresco.repo.importer.view.ViewParser.processEndType(ViewParser.java:883)
   at org.alfresco.repo.importer.view.ViewParser.processEndElement(ViewParser.java:863)
   at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:182)
   … 82 more

and in Catalina.out

2012-09-24 10:36:28,411  WARN  [repo.dictionary.DictionaryRepositoryBootstrap] [http-8080-1] StoreRef 'workspace://SpacesStore' does not exist

any idea ?
2 REPLIES 2

eureka
Champ in-the-making
Champ in-the-making
I have the exact same issue (same alfresco version). Did you maaged to solve this?

eureka
Champ in-the-making
Champ in-the-making
I have made some step ahead but got stuck again.

First I have to say I faced another issue before getting this one: missing model (dynamically deployed in tenant Data Dictionary). I "solved" that one by loading the model from the classpath (just for the import to succeed).

Than I got the post error "Invalid storeRef" and, after a little debugging, I found that the storef being created in
<blockcode>
MultiTAdminServiceImpl.bootstrapVersionTenantStore(ImporterBootstrap userImporterBootstrap, String tenantDomain, char[] tenantAdminRawPassword)
</blockcode>
was the lightVersionStore while in the "tenant"_version2.acp I have only references to version2Store, so I changed the line
<blockcode>
bootstrapStoreRef = new StoreRef(bootstrapStoreRef.getProtocol(), tenantService.getName(bootstrapStoreRef.getIdentifier(), tenantDomain));
</blockcode>
with
<blockcode>
bootstrapStoreRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, tenantService.getName(STORE_BASE_ID_VERSION2, tenantDomain));
</blockcode>

And I managed to go ahead this issue. Now I'm stuck at the next acp (the spacesStore one, which weights 21G) where the import fails at this line

<blockcode>
zipFile = new ZipFile(file, "UTF-8");
</blockcode>
in
<blockcode>
ACPImportPackageHandler.startImport()
</blockcode>
with the following exception
<blockcode>
"central directory is empty, can't expand corrupt archive."
</blockcode>

Does anyone have any idea how to get over this one?

Thanks,
Angelo