Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll get you answers.

Click here for Week 8 Materials and Homework.

Follow us on Eventbrite to get notified when new workshops are scheduled!


question

rashokkumartce_193569 avatar image
rashokkumartce_193569 asked ·

Getting Build Failure in my local machine while running week 3 exercise CRUD in Java

When i run the Week-3 CRUD exercise using Gitpod i didn't get any build error while i run the same in my Local machine i got the follewing error - Invalid LOC Header. I'm running Java 8 , Maven 3.6.3 in my machine

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\com\github\jnr\jnr-constants\0.9.12\jnr-constants-0.9.12.jar; ZipFile invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\org\javatuples\javatuples\1.2\javatuples-1.2.jar; ZipFile invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\com\esri\geometry\esri-geometry-api\1.2.1\esri-geometry-api-1.2.1.jar; ZipFile invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\org\apache\tinkerpop\gremlin-core\3.4.5\gremlin-core-3.4.5.jar; ZipFile invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\org\apache\tinkerpop\gremlin-shaded\3.4.5\gremlin-shaded-3.4.5.jar; ZipFile invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\org\codehaus\groovy\groovy\2.5.7\groovy-2.5.7-indy.jar; invalid CEN header (bad signature)
[ERROR] /C:/Users/Ashok Kumar/git/cassandra-workshop-series/week3-AppDev-crud/crud-java/src/main/java/com/datastax/workshop/DataModelConstants.java:[1,1] cannot access com.datastax.workshop
invalid distance too far back
[ERROR] /C:/Users/Ashok Kumar/git/cassandra-workshop-series/week3-AppDev-crud/crud-java/src/main/java/com/datastax/workshop/DBConnection.java:[9,8] cannot access java.lang
invalid distance too far back
[ERROR] /C:/Users/Ashok Kumar/git/cassandra-workshop-series/week3-AppDev-crud/crud-java/src/main/java/com/datastax/workshop/JourneyRepository.java:[25,8] cannot access com.datastax
invalid distance too far back
[ERROR] /C:/Users/Ashok Kumar/git/cassandra-workshop-series/week3-AppDev-crud/crud-java/src/main/java/com/datastax/workshop/Journey.java:[6,8] cannot access com
invalid distance too far back
[INFO] 10 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.975 s
[INFO] Finished at: 2020-08-13T00:03:55+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project crud-java: Compilation failure: Compilation failure:
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\com\github\jnr\jnr-constants\0.9.12\jnr-constants-0.9.12.jar; ZipFile invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\org\javatuples\javatuples\1.2\javatuples-1.2.jar; ZipFile invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\com\esri\geometry\esri-geometry-api\1.2.1\esri-geometry-api-1.2.1.jar; ZipFile invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\org\apache\tinkerpop\gremlin-core\3.4.5\gremlin-core-3.4.5.jar; ZipFile invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\org\apache\tinkerpop\gremlin-shaded\3.4.5\gremlin-shaded-3.4.5.jar; ZipFile invalid LOC header (bad signature)
[ERROR] error reading C:\Users\Ashok Kumar\.m2\repository\org\codehaus\groovy\groovy\2.5.7\groovy-2.5.7-indy.jar; invalid CEN header (bad signature)
[ERROR] /C:/Users/Ashok Kumar/git/cassandra-workshop-series/week3-AppDev-crud/crud-java/src/main/java/com/datastax/workshop/DataModelConstants.java:[1,1] cannot access com.datastax.workshop
[ERROR] invalid distance too far back
[ERROR] /C:/Users/Ashok Kumar/git/cassandra-workshop-series/week3-AppDev-crud/crud-java/src/main/java/com/datastax/workshop/DBConnection.java:[9,8] cannot access java.lang
[ERROR] invalid distance too far back
[ERROR] /C:/Users/Ashok Kumar/git/cassandra-workshop-series/week3-AppDev-crud/crud-java/src/main/java/com/datastax/workshop/JourneyRepository.java:[25,8] cannot access com.datastax
[ERROR] invalid distance too far back
[ERROR] /C:/Users/Ashok Kumar/git/cassandra-workshop-series/week3-AppDev-crud/crud-java/src/main/java/com/datastax/workshop/Journey.java:[6,8] cannot access com
[ERROR] invalid distance too far back
[ERROR] -> [Help 1]
workshop
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

bettina.swynnerton avatar image
bettina.swynnerton answered ·

Hi @rashokkumartce_193569,

it looks like you have corrupted jars in your .m2\repository

C:\Users\Ashok Kumar\.m2\repository

Try backing up the repository folder into a safe location, and then delete it from the .m2 folder. Then build again with mvn clean install and see if this resolves the issue.

Please make a backup first, in case you need anything from this repository.

Let us know how this goes.

1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thank you. Working fine now.

0 Likes 0 · ·