Skip to content

Fix sporadic "Could not validate Info.xml" build error - #9575

Draft
mbien wants to merge 1 commit into
apache:masterfrom
mbien:fix-buildnbm-zip-error
Draft

Fix sporadic "Could not validate Info.xml" build error#9575
mbien wants to merge 1 commit into
apache:masterfrom
mbien:fix-buildnbm-zip-error

Conversation

@mbien

@mbien mbien commented Aug 26, 2026

Copy link
Copy Markdown
Member

as observed in https://github.com/apache/netbeans/actions/runs/32883200508?pr=9573 (and others, e.g https://github.com/apache/netbeans/actions/runs/31745293654/attempts/1), CI fails sometimes in platform/autoupdate.services with

netbeans/nbbuild/templates/common.xml:487: Could not validate Info.xml before writing: java.util.zip.ZipException: ZipFile invalid LOC header (bad signature)
	at java.base/java.util.zip.ZipFile$ZipFileInputStream.initDataOffset(ZipFile.java:935)
	at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:946)
	at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:970)
	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:71)
	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:71)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.readAndBuffer(XMLEntityManager.java:3027)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:706)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1398)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1364)
	at ... more xerces
	at org.netbeans.nbbuild.XMLUtil.parse(XMLUtil.java:106)
	at org.netbeans.nbbuild.MakeNBM.validateAgainstAUDTDs(MakeNBM.java:1103)
	at org.netbeans.nbbuild.MakeNBM.createInfoXml(MakeNBM.java:1045)
	at org.netbeans.nbbuild.MakeNBM.lambda$execute$1(MakeNBM.java:625)
	at org.netbeans.nbbuild.MakeNBM.execute(MakeNBM.java:646)

Looking at the performance metrics of the workflow, the job has currently a 29% failure rate.

This was also locally reproducible after downloading the CI artifact. First 'ant build-nbms' would fail, second invocation would always succeed.

It can't be a coincidence that the module which provides the updater.jar (but none of the other modules) fails while reading a xml file from the very same jar. Unfortunately I couldn't find the cause, but eagerly loading the resource with ant's project CL appears to resolve the issue.

CI fails sometimes in platform/autoupdate.services with
netbeans/nbbuild/templates/common.xml:487: Could not validate Info.xml before writing: java.util.zip.ZipException: ZipFile invalid LOC header (bad signature)
	at java.base/java.util.zip.ZipFile$ZipFileInputStream.initDataOffset(ZipFile.java:935)
	at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:946)
	at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:970)
	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:71)
	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:71)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.readAndBuffer(XMLEntityManager.java:3027)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:706)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1398)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1364)
	at ... more xerces
	at org.netbeans.nbbuild.XMLUtil.parse(XMLUtil.java:106)
	at org.netbeans.nbbuild.MakeNBM.validateAgainstAUDTDs(MakeNBM.java:1103)
	at org.netbeans.nbbuild.MakeNBM.createInfoXml(MakeNBM.java:1045)
	at org.netbeans.nbbuild.MakeNBM.lambda$execute$1(MakeNBM.java:625)
	at org.netbeans.nbbuild.MakeNBM.execute(MakeNBM.java:646)

This was also locally reproducible after downloading the CI artifact.
First 'ant build-nbms' would fail, second invocation would always succeed.

It can't be a coincidence that the module which provides the updater.jar
fails while reading a xml file from the very same jar. Unfortunately
I couldn't find the cause, but eagerly loading the resource with ant's
project CL appears to resolve the issue.
@mbien mbien added CI continuous integration changes build labels Aug 26, 2026
@mbien mbien added this to the NB32 milestone Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build CI continuous integration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant