Vaadin14.2.1 build issue


I upgraded to 14.2.1 from 14.2.0 and here are my dependencies in my build.gradle.

dependencies {
    // my framework
    compile project(':myMultiProject:services.api')

	// module specific needs
	implementation('com.vaadin:vaadin-spring-boot-starter:14.2.1') {
		// Webjars are only needed when running in Vaadin 13 compatibility mode
		 ].forEach { group -> exclude(group: group) }
    	exclude module: 'spring-boot-starter-tomcat'
	implementation 'org.springframework.boot:spring-boot-starter-jetty:2.2.1.RELEASE'

    compile 'com.atlassian.commonmark:commonmark:0.15.0'
	implementation 'com.vaadin:vaadin-core:14.2.1'
	implementation 'org.vaadin.elmot:vaadin-geo-location-flow-v14:2.0'
	implementation 'com.flowingcode.addons.carousel:carousel-addon:2.0.0'
	implementation 'ch.carnet.kasparscherrer:language-select:1.0.1'
	compile 'com.github.appreciated:card:2.0.0.beta4'
	compile 'com.vaadin.componentfactory:breadcrumb:2.0.0'
	// transitive 
    implementation ''
    implementation 'org.apache.httpcomponents:httpclient'
    implementation 'org.apache.httpcomponents:httpcore'
    implementation 'org.apache.commons:commons-text:1.8'
    implementation 'net.openhft:zero-allocation-hashing:0.9'
	// java 11 impacts
	runtime 'javax.servlet:javax.servlet-api:3.1.0'
	implementation 'javax.activation:javax.activation-api'
	runtime 'javax.xml.bind:jaxb-api'    

They are all resolved in my IDE, so the project shows no errors on compile or build path in IDE. However, when I run gradle build for CI, buildFrontend task fails with the following stacktrace (trimmed to final caused by)…

Caused by: ZipFile invalid LOC header (bad signature)
        at net.bytebuddy.jar.asm.ClassReader.readStream(
        at net.bytebuddy.jar.asm.ClassReader.<init>(
        at com.vaadin.flow.server.frontend.scanner.FrontendDependencies.visitClass(
        at com.vaadin.flow.server.frontend.scanner.FrontendDependencies.visitClass(
        at com.vaadin.flow.server.frontend.scanner.FrontendDependencies.collectEndpoints(
        at com.vaadin.flow.server.frontend.scanner.FrontendDependencies.computeEndpoints(
        at com.vaadin.flow.server.frontend.scanner.FrontendDependencies.<init>(
        ... 101 more

I have already tried deleting build output folder, gradle caches folder, removing vaadin generated files (node_modules/, package.json, webpack.) and always he same result. I always check mvn repository to place the latest version for all addon dependency in the project. I need help to identify the offending jar and what is alternate/workaround…

Thanks in advance nnd appreciate all help I get.


I’m not a gradle user but i think you’ve got this error you have a corrupted jar in your gradle cache. You can probably try to delete yhe gradle cache and rebuild the project.

Hi @Jean,

Yes you are right… I did see this advise else where and I try it. The funny experience for me is this…

When this build error happens, I do wipe out the build content (build/, target/ and vaadin generated content). I also clear gradle cache folder. The gradle build resolves and downloads all dependencies again but with exact same result (same error message and stacktrace). However, after a few hours (I am not able to assert the exact cool-off period) the build error disappears without any change from my side.

So yeah, I am confused and at risk of this unpredictable possibility when it would occur, or how to address it when it does. Its difficult for me to accept this situation, we work on software that is sheer empirical in the sense, there is nothing that happens (or not) without an explanation. I mean I cannot state an excuse ‘Gradle is angry now… lets wait until it cools down’… hahaha…

Thanks :slight_smile:

Perhaps you can ask in the gradle plugin repository:
I think it requires more
investigation to know if the problem comes from vaadin flow or gradle.
Maybe your network connection settings could be a reason ( like proxy).

One thing you can test is to use pnpm instead of npm.

But I can understand that a reproducible build is the most important thing in a project.