getgauge / gauge-java

Java runner for Gauge
https://gauge.org
Apache License 2.0
91 stars 47 forks source link

Java Runner remains in Infinite Execution Mode #687

Open jbalooka opened 2 years ago

jbalooka commented 2 years ago

Describe the bug

  1. First it Complains about Reflections for non JAVA Files 03-05-2022 17:59:37.715 [java] [ERROR] [ForkJoinPool.commonPool-worker-4] WARN org.reflections.Reflections - could not create Dir using com.thoughtworks.gauge.scan.ClasspathScanner$1@2fadf5f1 from url file:/D:/git/iec-aw/tc-soa-client/soa_libs/README.MD. skipping. 03-05-2022 17:59:37.715 [java] [ERROR] java.util.zip.ZipException: error in opening zip file 03-05-2022 17:59:37.715 [java] [ERROR] at java.util.zip.ZipFile.open(Native Method) 03-05-2022 17:59:37.715 [java] [ERROR] at java.util.zip.ZipFile.(ZipFile.java:230) 03-05-2022 17:59:37.715 [java] [ERROR] at java.util.zip.ZipFile.(ZipFile.java:160) 03-05-2022 17:59:37.715 [java] [ERROR] at java.util.jar.JarFile.(JarFile.java:166) 03-05-2022 17:59:37.715 [java] [ERROR] at java.util.jar.JarFile.(JarFile.java:130) 03-05-2022 17:59:37.715 [java] [ERROR] at com.thoughtworks.gauge.scan.ClasspathScanner$1.createDir(ClasspathScanner.java:48) 03-05-2022 17:59:37.715 [java] [ERROR] at org.reflections.vfs.Vfs.fromURL(Vfs.java:103) 03-05-2022 17:59:37.715 [java] [ERROR] at org.reflections.vfs.Vfs.fromURL(Vfs.java:95) 03-05-2022 17:59:37.715 [java] [ERROR] at org.reflections.Reflections.lambda$scan$2(Reflections.java:176) 03-05-2022 17:59:37.716 [java] [ERROR] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) 03-05-2022 17:59:37.716 [java] [ERROR] at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1556) 03-05-2022 17:59:37.718 [java] [ERROR] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) 03-05-2022 17:59:37.718 [java] [ERROR] at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) 03-05-2022 17:59:37.718 [java] [ERROR] at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) 03-05-2022 17:59:37.718 [java] [ERROR] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) 03-05-2022 17:59:37.718 [java] [ERROR] at java.util.concurrent.ForkJoinPool$WorkQueue.execLocalTasks(ForkJoinPool.java:1040) 03-05-2022 17:59:37.718 [java] [ERROR] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1058) 03-05-2022 17:59:37.718 [java] [ERROR] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) 03-05-2022 17:59:37.718 [java] [ERROR] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) 03-05-2022 17:59:37.718 [java] [ERROR] [ForkJoinPool.commonPool-worker-4] WARN org.reflections.Reflections - could not create Vfs.Dir from url. ignoring the exception and continuing 03-05-2022 17:59:37.718 [java] [ERROR] org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [file:/D:/git/iec-aw/tc-soa-client/soa_libs/README.MD] 03-05-2022 17:59:37.718 [java] [ERROR] either use fromURL(final URL url, final List urlTypes) or use the static setDefaultURLTypes(final List urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType.

  2. afterwards remain Blocked at the Scanning Packages:

03-05-2022 17:59:38.539 [java] [DEBUG] gauge-java took 1928milliseconds to load and scan. This should be less than 'runner_connection_timeout' config value. 03-05-2022 17:59:38.539 [java] [DEBUG] run 'gauge config runner_connection_timeout' and verify that it is < 1928 03-05-2022 17:59:38.539 [java] [DEBUG] starting gRPC server... 03-05-2022 17:59:38.578 [java] [ERROR] [pool-1-thread-1] INFO org.reflections.Reflections - Reflections took 1563 ms to scan 360 urls, producing 10428 keys and 53158 values 03-05-2022 17:59:39.360 [java] [DEBUG] started gRPC server on port 52408 03-05-2022 17:59:39.361 [Gauge] [DEBUG] Attempting to connect to grpc server at port: 52408 03-05-2022 17:59:39.477 [Gauge] [DEBUG] Successfully made the connection with runner with port: 52408 03-05-2022 17:59:39.477 [Gauge] [DEBUG] Validation started. 03-05-2022 17:59:39.798 [java] [DEBUG] Scanning packages for steps

jbalooka commented 2 years ago

It was caused by some dependencies having a Higher Java Bytecode Version than the JRE used by Gauge-Java. A better error message when such classes are encountered would help a long way