AnsweredAssumed Answered

Strange ZipFile problem.

Question asked by beslan on Nov 8, 2012
Latest reply on Nov 10, 2012 by beslan
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

Outcomes