Search code examples
javaruntime-errorspring-cloud-gatewaynetflix-zuul

Build failed: java: java.lang.RuntimeException: java.io.IOException: Invalid CEN header (invalid zip64 extra data field size)


I am trying to implement the Zuul gateway however, after adding this dependency I'm getting a build error for SpringBoot 2.2.6.

Here's the dependency I added.

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>

Error Message:

java: java.lang.RuntimeException: java.io.IOException: Error reading file C:\Users\farheen.saif.shaikh\.m2\repository\org\aspectj\aspectjweaver\1.8.6\aspectjweaver-1.8.6.jar: Invalid CEN header (invalid zip64 extra data field size)

For some reason, I checked other solutions but no help. I tried deleting and adding dependency back. However it didn't work, please advise.


Solution

  • The trick is to download the latest aspectj from https://github.com/eclipse-aspectj/aspectj/releases/tag/V1_9_22_1 and then place the jar in the existing .m2\repository\org\aspectj\aspectjweaver\1.8.6 location, replacing aspectjweaver-1.8.9.jar but KEEPING IT'S NAME. This'll run the latest aspectjweaver but think it's still 1.8.9.

    Until the parent dependencies that download 1.8.9 get updated to use a newer aspectj, you're stuck working around it :(