Invalid CEN header

382 views
Skip to first unread message

Osama Abuhamdan

unread,
Oct 1, 2023, 9:22:19 PM10/1/23
to ONOS Developers
Greetings,

I am facing this issue now too with ONOS 2.5.0 and 2.7.0
org.osgi.framework.BundleException: Unable to cache bundle: mvn:org.onosproject/onos-core-dist/2.5.0
with
Caused by: java.util.zip.ZipException: Invalid CEN header (invalid extra data field size for tag: 0xbfef at 5847)

any thoughts?

Osama Abu Hamdan

unread,
Oct 1, 2023, 9:28:19 PM10/1/23
to ONOS Developers, Osama Abuhamdan
Full Error is:

org.osgi.framework.BundleException: Unable to cache bundle: mvn:org.onosproject/onos-core-dist/2.5.0
        at org.apache.felix.framework.Felix.installBundle(Felix.java:3013)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
        at org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundle0(BundleIdBasedRegion.java:117)
        at org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundleAtLocation(BundleIdBasedRegion.java:97)
        at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.installBundle(BundleInstallSupportImpl.java:135)
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.installBundle(FeaturesServiceImpl.java:1138)
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:900)
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: java.util.zip.ZipException: Invalid CEN header (invalid extra data field size for tag: 0xbfef at 5847)
        at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1769)
        at java.base/java.util.zip.ZipFile$Source.checkExtraFields(ZipFile.java:1274)
        at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1734)
        at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1463)
        at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1426)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:742)
        at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:859)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:257)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:186)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:200)
        at org.apache.felix.framework.util.SecureAction.openZipFile(SecureAction.java:650)
        at org.apache.felix.framework.util.WeakZipFileFactory$WeakZipFile.<init>(WeakZipFileFactory.java:187)
        at org.apache.felix.framework.util.WeakZipFileFactory$WeakZipFile.<init>(WeakZipFileFactory.java:169)
        at org.apache.felix.framework.util.WeakZipFileFactory.create(WeakZipFileFactory.java:72)
        at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:84)
        at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:872)
        at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
        at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)
        at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:3009)
        ... 12 more

Raphael

unread,
Oct 30, 2023, 11:06:06 AM10/30/23
to ONOS Developers, Osama Abu Hamdan, Osama Abuhamdan
Greetings,

I found out this issue is linked to the updated version of OpenJDK-11 (11.0.20+) which requires an additional environment variable (JAVA_TOOL_OPTIONS=" -Djdk.util.zip.disableZip64ExtraFieldValidation=true").
I solved it by setting this environment variable.
If the issue persists, the problem can be solved by editing the "options" file in the ONOS installation directory and the following lines: "export JAVA_TOOL_OPTIONS=-Djdk.util.zip.disableZip64ExtraFieldValidation=true"

Alessio Giorgetti

unread,
Jan 15, 2024, 11:59:56 AM1/15/24
to ONOS Developers, Raphael, Osama Abu Hamdan, Osama Abuhamdan
I have the same problem compiling ONOS applications with maven. It appeared because I did update the openjdk-11...

Using the suggested solution removes some errors, but still the application build fails:

[ERROR] /home/alessio/onos-apps/quantum-app/src/main/java/org/quantum/app/QkdLink.java:[1,1] cannot access org.quantum.app
[ERROR]   Invalid CEN header (invalid extra data field size for tag: 0xbfef size: 61373)

Where org.quantum.app is the name of the application and this error is generated by the line

Have you suggestions...? is it possible to downgrade to openjdk 11.0.14... ?

alessio

Raphael

unread,
Jan 17, 2024, 5:41:28 PM1/17/24
to Alessio Giorgetti, ONOS Developers, Osama Abu Hamdan, Osama Abuhamdan
You might succeed by downgrading the JDK, although since the newer versions are often requirements of other packages, it might get updated whenever a system upgrade is performed.
I'd advice to start your JVM with the flag mentioned before (-Djdk.util.zip.disableZip64ExtraFieldValidation=true) above

Czarson

unread,
Nov 11, 2025, 8:37:32 AM11/11/25
to ONOS Developers, Raphael, ONOS Developers, Osama Abu Hamdan, Osama Abuhamdan, Alessio Giorgetti
Hi! I wrote a simple MPLS Segment Routing application for my engineering thesis and I have this problem despite setting export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Djdk.util.zip.disableZip64ExtraFieldValidation=true".

I have 11.0.27 Java version openjdk and official Mininet VM from release - Ubuntu 20.04.1 LTS.

The error I encountered :
[INFO] 5 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.633 s
[INFO] Finished at: 2025-11-11T05:24:51-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project sr-mpls: Compilation failure: Com   pilation failure:
[ERROR] /opt/onos/apps/sr-mpls/src/main/java/org/sr/mpls/SrMplsRoutingManager.java:[16,1] cannot access org.sr.mpls

[ERROR]   Invalid CEN header (invalid extra data field size for tag: 0xbfef size: 61373)
[ERROR] /opt/onos/apps/sr-mpls/src/main/java/org/sr/mpls/SrMplsSetContextCommand.java:[25,8] cannot access org.sr

[ERROR]   Invalid CEN header (invalid extra data field size for tag: 0xbfef size: 61373)
[ERROR] /opt/onos/apps/sr-mpls/src/main/java/org/sr/mpls/SrMplsSetContextCommand.java:[25,46] cannot find symbol
[ERROR]   symbol: class AbstractShellCommand
[ERROR] /opt/onos/apps/sr-mpls/src/main/java/org/sr/mpls/SrMplsSetContextCommand.java:[23,2] cannot find symbol
[ERROR]   symbol: class Service
[ERROR] /opt/onos/apps/sr-mpls/src/main/java/org/sr/mpls/SrMplsSetContextCommand.java:[24,2] cannot find symbol
[ERROR]   symbol: class Command

I will be incredibly grateful for your help :)

Thiago Cavali

unread,
Nov 11, 2025, 8:59:40 AM11/11/25
to Czarson, ONOS Developers, Raphael, Osama Abu Hamdan, Osama Abuhamdan, Alessio Giorgetti
I solved this problem by downgrading the JDK version.

Best,

Thiago.

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@opennetworking.org.
To view this discussion visit https://groups.google.com/a/opennetworking.org/d/msgid/onos-dev/5a3f8531-21ad-4b74-9fbc-b8c072da33a2n%40opennetworking.org.
For more options, visit https://groups.google.com/a/opennetworking.org/d/optout.


--
Thiago dos Santos Cavali

Engenheiro em Eletrônica.
Mestre em Engenharia Elétrica pelo Programa de Pós-Graduação em Engenharia Elétrica (PPGEE) da Universidade Tecnológica Federal do Paraná - Campus Cornélio Procópio (UTFPR - CP).
Doutorando pelo Programa de Pós-Graduação em Engenharia Elétrica e Informática Industrial (CPGEI) da Universidade Tecnológica Federal do Paraná - Campus Curitiba (UTFPR - CT).

Currículo Lattes: http://lattes.cnpq.br/2076890753379327

Czarson

unread,
Nov 11, 2025, 9:39:06 AM11/11/25
to ONOS Developers, Thiago Cavali, ONOS Developers, Raphael, Osama Abu Hamdan, Osama Abuhamdan, Alessio Giorgetti, Czarson
OK, so I will download a slightly older version of the machine (Ubuntu 18.04.5) with JDK 11.0.7, probably but definitely less than 11.0.20, and let you know after completing the entire configuration :))
Reply all
Reply to author
Forward
Message has been deleted
0 new messages