cancel
Showing results for 
Search instead for 
Did you mean: 

Strange ZipFile problem.

beslan
Champ in-the-making
Champ in-the-making
Hi,

I am using alfresco java api in my jsf + spring + maven project. Alfresco context starts up by my applicationcontext.
Everything is fine in my pc. For a fresh setup I followed these steps.

1. Copy tomcat to a server.
2. Create database, user and grant privileges.
3. Create data folder.
4. Configure alfresco-global.properties for data folder and database parameters. (alfresco-global.properties is in tomcat shared\classes folder)
5. Start tomcat.

Database tables and data folders are fine.

But next I 'm getting this error.


16:06:10,792 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'archiveAuthenticationManager' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.universal.alfresco.api.AuthenticationManagerApiImpl]: Constructor threw exception; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10080013 Bootstrap failed
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
   at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
   at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1603)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.universal.alfresco.api.AuthenticationManagerApiImpl]: Constructor threw exception; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10080013 Bootstrap failed
   at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
   … 27 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: 10080013 Bootstrap failed
   at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:361)
   at org.alfresco.repo.importer.ImporterBootstrap.onBootstrap(ImporterBootstrap.java:718)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
   at org.alfresco.util.BaseApplicationContextHelper.getApplicationContext(BaseApplicationContextHelper.java:67)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:46)
   at com.universal.alfresco.api.AuthenticationManagerApiImpl.<init>(AuthenticationManagerApiImpl.java:61)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
   … 29 more
Caused by: org.alfresco.service.cmr.view.ImporterException: Failed to read zip file due to central directory is empty, can't expand corrupt archive.
   at org.alfresco.repo.importer.ACPImportPackageHandler.startImport(ACPImportPackageHandler.java:77)
   at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:260)
   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)
   … 46 more
Caused by: java.io.IOException: central directory is empty, can't expand corrupt archive.
   at org.apache.commons.compress.archivers.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:353)
   at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:184)
   at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:161)
   at org.alfresco.repo.importer.ACPImportPackageHandler.startImport(ACPImportPackageHandler.java:73)
   … 54 more


Alfresco is creating tmp files like acpImport196782382878997180.tmp in tomcat temp folder and throwing errors when create ZipFile with it in ACPImportPackageHandler(77).

Any idea will be welcomed.

Thanks.
Beslan
3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Hello,

you need to identify which ACP file is actually corrupt. Unforunately, this is not visible from the logs, so try setting the Log4J logger for org.alfresco.repo.importer to DEBUG.

Regards
Axel

beslan
Champ in-the-making
Champ in-the-making
Hello,

Last file in log is alfresco/templates/email_templates.acp. So if this file is corrupted how can I fix this.

Thanks
Beslan.

11:15:49,251 DEBUG [org.alfresco.repo.importer.ImporterBootstrap] Importing alfresco/templates/readme_template.xml
11:15:49,251 DEBUG [org.alfresco.repo.importer.ImporterBootstrap] Import started at Sat Nov 10 11:15:49 EET 2012 (1352538949251)
11:15:49,267 DEBUG [org.alfresco.repo.importer.ImporterBootstrap] Import completed at Sat Nov 10 11:15:49 EET 2012 (1352538949267)
11:15:49,267 DEBUG [org.alfresco.repo.importer.ImporterBootstrap] Import duration: 16 ms (Note: excluding commit time)
11:15:49,267 DEBUG [org.alfresco.repo.importer.ImporterBootstrap]  Nodes created: 1
11:15:49,267 DEBUG [org.alfresco.repo.importer.ImporterBootstrap]  Nodes linked: 0
11:15:49,267 DEBUG [org.alfresco.repo.importer.ImporterBootstrap]  Aspects Added: 0
11:15:49,267 DEBUG [org.alfresco.repo.importer.ImporterBootstrap]  Properties set: 5
11:15:49,267 DEBUG [org.alfresco.repo.importer.ImporterBootstrap]  Content set: 1
11:15:49,267 DEBUG [org.alfresco.repo.importer.ImporterBootstrap]  Permissions set: 0
11:15:49,267 DEBUG [org.alfresco.repo.importer.ImporterBootstrap] Importing alfresco/templates/email_templates.acp
11:15:49,470 INFO  [org.quartz.core.QuartzScheduler] Scheduler DefaultScheduler_$_NON_CLUSTERED shutting down.
11:15:49,470 INFO  [org.quartz.core.QuartzScheduler] Scheduler DefaultScheduler_$_NON_CLUSTERED paused.
11:15:49,642 INFO  [org.quartz.core.QuartzScheduler] Scheduler DefaultScheduler_$_NON_CLUSTERED shutdown complete.
11:15:49,673 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Stopping 'sysAdmin' subsystem, ID: [sysAdmin, default]
11:15:49,673 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Stopped 'sysAdmin' subsystem, ID: [sysAdmin, default]
11:15:49,673 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'archiveAuthenticationManager' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.universal.alfresco.api.AuthenticationManagerApiImpl]: Constructor threw exception; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10100012 Bootstrap failed
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)

beslan
Champ in-the-making
Champ in-the-making
Hello again,

I realized that my WEB-INF/alfresco folder is from 3.4d version. I copied new files form 4.0e and life is beautiful again.

Now I am getting
org.alfresco.service.cmr.repository.InvalidNodeRefException: Parent node does not exist: workspace://SpacesStore/
Smiley Very Happy
Thanks for advice Axel.
Beslan