0

getting error while deploying bot api.

Suppressed: java.lang.RuntimeException: Error scanning entry com/amazonaws/services/s3/transfer/internal/TransferStateChangeListener.class from jar file:///C:/Users/Admin/.m2/repository/com/amazonaws/aws-java-sdk-s3/1.11.125/aws-java-sdk-s3-1.11.125.jar at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891) ... 6 more Caused by: java.util.zip.ZipException: invalid LOC header (bad signature) at java.util.zip.ZipFile.read(Native Method) at java.util.zip.ZipFile.access$1400(ZipFile.java:60) at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717) at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158) at java.io.FilterInputStream.read(FilterInputStream.java:133) at java.io.FilterInputStream.read(FilterInputStream.java:133) at org.objectweb.asm.ClassReader.a(Unknown Source) at org.objectweb.asm.ClassReader.(Unknown Source) at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959) at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940) at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887) ... 6 more Suppressed: java.lang.RuntimeException: Error scanning entry com/amazonaws/services/s3/transfer/internal/CopyMonitor.class from jar file:///C:/Users/Admin/.m2/repository/com/amazonaws/aws-java-sdk-s3/1.11.125/aws-java-sdk-s3-1.11.125.jar at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891) ... 6 more Caused by: java.util.zip.ZipException: invalid LOC header (bad signature) at java.util.zip.ZipFile.read(Native Method) at java.util.zip.ZipFile.access$1400(ZipFile.java:60) at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717) at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158) at java.io.FilterInputStream.read(FilterInputStream.java:133) at java.io.FilterInputStream.read(FilterInputStream.java:133) at org.objectweb.asm.ClassReader.a(Unknown Source) at org.objectweb.asm.ClassReader.(Unknown Source) at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959) at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940) at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887) ... 6 more Suppressed: java.lang.RuntimeException: Error scanning entry com/amazonaws/services/s3/transfer/internal/MultipleFileTransferMonitor$1.class from jar file:///C:/Users/Admin/.m2/repository/com/amazonaws/aws-java-sdk-s3/1.11.125/aws-java-sdk-s3-1.11.125.jar at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891) ... 6 more Caused by: java.util.zip.ZipException: invalid LOC header (bad signature) at java.util.zip.ZipFile.read(Native Method) at java.util.zip.ZipFile.access$1400(ZipFile.java:60) at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717) at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158) at java.io.FilterInputStream.read(FilterInputStream.java:133) at java.io.FilterInputStream.read(FilterInputStream.java:133) at org.objectweb.asm.ClassReader.a(Unknown Source) at org.objectweb.asm.ClassReader.(Unknown Source) at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959) at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940) at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887) ... 6 more

Odin Thunder
  • 3,284
  • 2
  • 28
  • 47

1 Answers1

0

Here are few clarifications:

  1. These logs are not related to Bot. Bot logs can be seen in the console while running the bot locally (no log file is created, you can ask for the feature here) and in the logs tab for the bot on Gupshup after deployment.
  2. The exception you are seeing in the console is the Runtime Exception. As not mentioned specifically I assume you are running the bot's deploy goal as mvn gsbot:deploy.
  3. The invalid LOC header (bad signature) exception may occur when there are any corrupted jar files in the local maven repository. You can find all the corrupted jars using following:

find ${USER_HOME}/.m2/repository/ -name "*jar" | xargs -L 1 zip -T | grep error | grep invalid

Then remove all the corrupted jars and update or forcefully update the maven project.