Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32023

Fix Invalid CEN header when importing Nuxeo zip files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2023.3, 2021.44
    • Component/s: Core IO
    • Release Notes Summary:
      The extra field setting when doing a Nuxeo IO ZIP export has been completely removed.
    • Tags:
    • Sprint:
      nxplatform #96
    • Story Points:
      3

      Description

      When importing Nuxeo zip files we may encounter the following error:

      java.util.zip.ZipException: Invalid CEN header (invalid zip64 extra data field size)
      	at java.util.zip.ZipFile$Source.zerror(ZipFile.java:1728) ~[?:?]
      	at java.util.zip.ZipFile$Source.checkExtraFields(ZipFile.java:1261) ~[?:?]
      	at java.util.zip.ZipFile$Source.checkAndAddEntry(ZipFile.java:1212) ~[?:?]
      	at java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1667) ~[?:?]
      	at java.util.zip.ZipFile$Source.<init>(ZipFile.java:1445) ~[?:?]
      	at java.util.zip.ZipFile$Source.get(ZipFile.java:1407) ~[?:?]
      	at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:716) ~[?:?]
      	at java.util.zip.ZipFile.<init>(ZipFile.java:250) ~[?:?]
      	at java.util.zip.ZipFile.<init>(ZipFile.java:179) ~[?:?]
      	at java.util.zip.ZipFile.<init>(ZipFile.java:193) ~[?:?]
      	at org.nuxeo.ecm.platform.filemanager.service.extension.ExportedZipImporter.getArchiveFileIfValid(ExportedZipImporter.java:69) ~[nuxeo-platform-filemanager-2023.1.20.jar:?]
      	at org.nuxeo.ecm.showcase.content.ShowcaseContentImporter.create(ShowcaseContentImporter.java:95) ~[nuxeo-showcase-content-importer-2023.0.0.jar:?]
      	at org.nuxeo.ecm.showcase.content.ShowcaseContentImporter.create(ShowcaseContentImporter.java:86) ~[nuxeo-showcase-content-importer-2023.0.0.jar:?]
      	at org.nuxeo.ecm.showcase.content.ShowcaseContentImporter.run(ShowcaseContentImporter.java:77) ~[nuxeo-showcase-content-importer-2023.0.0.jar:?]
      	at org.nuxeo.ecm.showcase.content.service.ShowcaseContentServiceImpl.lambda$triggerImporters$0(ShowcaseContentServiceImpl.java:78) ~[nuxeo-showcase-content-importer-2023.0.0.jar:?]
      	at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
      	at org.nuxeo.ecm.showcase.content.service.ShowcaseContentServiceImpl.triggerImporters(ShowcaseContentServiceImpl.java:74) ~[nuxeo-showcase-content-importer-2023.0.0.jar:?]
      	at org.nuxeo.ecm.showcase.content.InitListener.execute(InitListener.java:48) ~[nuxeo-showcase-content-importer-2023.0.0.jar:?]
      	at org.nuxeo.ecm.platform.content.template.service.ContentTemplateServiceImpl.executePostContentCreationHandlers(ContentTemplateServiceImpl.java:167) ~[nuxeo-platform-content-template-manager-2023.1.20.jar:?]
      	at org.nuxeo.ecm.platform.content.template.listener.RepositoryInitializationListener.doInitializeRepository(RepositoryInitializationListener.java:42) ~[nuxeo-platform-content-template-manager-2023.1.20.jar:?]
      	at org.nuxeo.ecm.core.repository.RepositoryInitializationHandler.initializeRepository(RepositoryInitializationHandler.java:92) ~[nuxeo-core-2023.1.20.jar:?]
      	at org.nuxeo.ecm.core.repository.RepositoryInitializationHandler.initializeRepository(RepositoryInitializationHandler.java:90) ~[nuxeo-core-2023.1.20.jar:?]
      	at org.nuxeo.ecm.core.repository.RepositoryInitializationHandler.initializeRepository(RepositoryInitializationHandler.java:90) ~[nuxeo-core-2023.1.20.jar:?]
      	at org.nuxeo.ecm.core.repository.RepositoryService$2.run(RepositoryService.java:236) ~[nuxeo-core-2023.1.20.jar:?]
      	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:123) ~[nuxeo-core-api-2023.1.20.jar:?]
      	at org.nuxeo.ecm.core.repository.RepositoryService.initializeRepository(RepositoryService.java:238) ~[nuxeo-core-2023.1.20.jar:?]
      	at org.nuxeo.ecm.core.repository.RepositoryService.doInitRepositories(RepositoryService.java:220) ~[nuxeo-core-2023.1.20.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.lambda$runInTransaction$4(TransactionHelper.java:642) ~[nuxeo-runtime-jtajca-2023.1.20.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:675) ~[nuxeo-runtime-jtajca-2023.1.20.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:642) ~[nuxeo-runtime-jtajca-2023.1.20.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:630) ~[nuxeo-runtime-jtajca-2023.1.20.jar:?]
      	at org.nuxeo.ecm.core.repository.RepositoryService.initRepositories(RepositoryService.java:170) ~[nuxeo-core-2023.1.20.jar:?]
      	at org.nuxeo.ecm.core.repository.RepositoryService$1.afterStart(RepositoryService.java:106) ~[nuxeo-core-2023.1.20.jar:?]
      	at org.nuxeo.runtime.model.impl.ComponentManagerImpl$Listeners.lambda$afterStart$5(ComponentManagerImpl.java:1160) ~[nuxeo-runtime-2023.1.20.jar:?]
      	at org.nuxeo.runtime.model.impl.ComponentManagerImpl$Listeners.safeLoop(ComponentManagerImpl.java:1174) [nuxeo-runtime-2023.1.20.jar:?]
      	at org.nuxeo.runtime.model.impl.ComponentManagerImpl$Listeners.afterStart(ComponentManagerImpl.java:1160) [nuxeo-runtime-2023.1.20.jar:?]
      	at org.nuxeo.runtime.model.impl.ComponentManagerImpl.startComponents(ComponentManagerImpl.java:728) [nuxeo-runtime-2023.1.20.jar:?]
      	at org.nuxeo.runtime.model.impl.ComponentManagerImpl.start(ComponentManagerImpl.java:825) [nuxeo-runtime-2023.1.20.jar:?]
      	at org.nuxeo.runtime.osgi.OSGiRuntimeService.startComponents(OSGiRuntimeService.java:470) [nuxeo-runtime-2023.1.20.jar:?]
      	at org.nuxeo.runtime.osgi.OSGiRuntimeService.frameworkEvent(OSGiRuntimeService.java:485) [nuxeo-runtime-2023.1.20.jar:?]
      	at org.nuxeo.osgi.OSGiAdapter.fireFrameworkEvent(OSGiAdapter.java:222) [nuxeo-runtime-osgi-2023.1.20.jar:?]
      	at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:232) [nuxeo-runtime-osgi-2023.1.20.jar:?]
      	at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:138) [nuxeo-runtime-osgi-2023.1.20.jar:?]
      	at org.nuxeo.runtime.deployment.NuxeoStarter.start(NuxeoStarter.java:124) [nuxeo-runtime-deploy-2023.1.20.jar:?]
      	at org.nuxeo.runtime.deployment.NuxeoStarter.contextInitialized(NuxeoStarter.java:93) [nuxeo-runtime-deploy-2023.1.20.jar:?]
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4494) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4946) [catalina.jar:9.0.78]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662) [catalina.jar:9.0.78]
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:689) [catalina.jar:9.0.78]
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1888) [catalina.jar:9.0.78]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
      	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util-9.0.78.jar:9.0.78]
      	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123) [?:?]
      	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:582) [catalina.jar:9.0.78]
      	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472) [catalina.jar:9.0.78]
      	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1617) [catalina.jar:9.0.78]
      	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318) [catalina.jar:9.0.78]
      	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) [catalina.jar:9.0.78]
      	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) [catalina.jar:9.0.78]
      	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:893) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:795) [catalina.jar:9.0.78]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1328) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1318) [catalina.jar:9.0.78]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
      	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util-9.0.78.jar:9.0.78]
      	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) [?:?]
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:249) [catalina.jar:9.0.78]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:428) [catalina.jar:9.0.78]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.78]
      	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:922) [catalina.jar:9.0.78]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.78]
      	at org.apache.catalina.startup.Catalina.start(Catalina.java:772) [catalina.jar:9.0.78]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347) [bootstrap.jar:9.0.78]
      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478) [bootstrap.jar:9.0.78]
      

      The issue is caused by a recent change in the JDK starting from 11.0.20 and 17.0.8.

      This is mainly due to zip files generation with extra attributes done by our exporter. Without this extra attributes, we do not meet the issue above when importing the zip.
      We can disable this behavior thanks to NXP-30713.

      But we need a solution to fix the issue when importing zip files with this extra attribute.
      Currently, one can start its Nuxeo server with the JAVA_OPTS=$JAVA_OPTS -Djdk.util.zip.disableZip64ExtraFieldValidation=true option.

      We would like a solution that doesn't require user to configure something to make this behavior works.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: