NoSuchMethodError while trying to validate custom schema using lint

I am trying to validate my custom schema using ./igluctl lint schemas/vendor.here/pageview_event/jsonschema/1-0-0 but getting the following error:

java.lang.NoSuchMethodError: java.nio.file.Path.of(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
at com.snowplowanalytics.iglu.ctl.File$.splitPath(File.scala:359)
at com.snowplowanalytics.iglu.ctl.File$.splitPath(File.scala:362)
at com.snowplowanalytics.iglu.ctl.Utils$.getPath(Utils.scala:37)
at com.snowplowanalytics.iglu.ctl.Utils$.equalPath(Utils.scala:48)
at com.snowplowanalytics.iglu.ctl.File.$anonfun$asSchema$3(File.scala:72)
at com.snowplowanalytics.iglu.ctl.File.$anonfun$asSchema$3$adapted(File.scala:72)
at cats.syntax.EitherOps$.ensureOr$extension(either.scala:101)
at com.snowplowanalytics.iglu.ctl.File.asSchema(File.scala:72)
at com.snowplowanalytics.iglu.ctl.File.asSchema$(File.scala:66)
at com.snowplowanalytics.iglu.ctl.File$$anon$2.asSchema(File.scala:90)
at com.snowplowanalytics.iglu.ctl.File.$anonfun$asJsonSchema$1(File.scala:78)
at scala.util.Either.flatMap(Either.scala:341)
at com.snowplowanalytics.iglu.ctl.File.asJsonSchema(File.scala:78)
at com.snowplowanalytics.iglu.ctl.File.asJsonSchema$(File.scala:77)
at com.snowplowanalytics.iglu.ctl.File$$anon$3.asJsonSchema(File.scala:112)
at com.snowplowanalytics.iglu.ctl.File$.$anonfun$readSchemas$2(File.scala:157)
at scala.util.Either.flatMap(Either.scala:341)
at com.snowplowanalytics.iglu.ctl.File$.$anonfun$parseStream$1(File.scala:147)
at fs2.Chunk$Singleton.map(Chunk.scala:534)
at fs2.internal.FreeC$Output.$anonfun$mapOutput$2(Algebra.scala:288)
at fs2.internal.FreeC$$anon$7.cont(Algebra.scala:200)
at fs2.internal.FreeC$ViewL$$anon$9$$anon$10.(Algebra.scala:240)
at fs2.internal.FreeC$ViewL$$anon$9.cont(Algebra.scala:240)
at fs2.internal.FreeC$ViewL$.mk(Algebra.scala:231)
at fs2.internal.FreeC$ViewL$.apply(Algebra.scala:220)
at fs2.internal.FreeC.viewL(Algebra.scala:106)
at fs2.internal.FreeC$.go$1(Algebra.scala:421)
at fs2.internal.FreeC$.resume$1(Algebra.scala:433)
at fs2.internal.FreeC$.$anonfun$compile$11(Algebra.scala:504)
at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:187)
at cats.effect.internals.IORunLoop$.restartCancelable(IORunLoop.scala:51)
at cats.effect.internals.IOBracket$BracketStart.run(IOBracket.scala:100)
at cats.effect.internals.Trampoline.cats$effect$internals$Trampoline$$immediateLoop(Trampoline.scala:67)
at cats.effect.internals.Trampoline.startLoop(Trampoline.scala:35)
at cats.effect.internals.TrampolineEC$JVMTrampoline.super$startLoop(TrampolineEC.scala:90)
at cats.effect.internals.TrampolineEC$JVMTrampoline.$anonfun$startLoop$1(TrampolineEC.scala:90)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
at cats.effect.internals.TrampolineEC$JVMTrampoline.startLoop(TrampolineEC.scala:90)
at cats.effect.internals.Trampoline.execute(Trampoline.scala:43)
at cats.effect.internals.TrampolineEC.execute(TrampolineEC.scala:42)
at cats.effect.internals.IOBracket$BracketStart.apply(IOBracket.scala:80)
at cats.effect.internals.IOBracket$BracketStart.apply(IOBracket.scala:58)
at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:183)
at cats.effect.internals.IORunLoop$.restart(IORunLoop.scala:41)
at cats.effect.internals.IOBracket$.$anonfun$apply$1(IOBracket.scala:48)
at cats.effect.internals.IOBracket$.$anonfun$apply$1$adapted(IOBracket.scala:34)
at cats.effect.internals.IOAsync$.$anonfun$apply$1(IOAsync.scala:37)
at cats.effect.internals.IOAsync$.$anonfun$apply$1$adapted(IOAsync.scala:37)
at cats.effect.internals.IORunLoop$RestartCallback.start(IORunLoop.scala:447)
at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:156)
at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:463)
at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:484)
at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:422)
at cats.effect.internals.IOShift$Tick.run(IOShift.scala:36)
at cats.effect.internals.PoolUtils$$anon$2$$anon$3.run(PoolUtils.scala:52)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

I just downloaded igluctl from Release Version 0.8.0 · snowplow/igluctl · GitHub and I have no clue what’s going on.
Does anyone have any ideas?

Is your schema in that folder structure?

i.e. /schemas/com.vendor/pageview_event/jsonschema/ and then the file should be called 1-0-0 with no extension?

Hi @lfib I think it’s because you are not using java version 11 (or higher). Try running this to see what version you are on:

java --version

In igluctl 0.8.0 we broke support for java 8 and lower.

1 Like

I just opened this issue in github to add back support for Java 8, because you are not the first person to be caught out by this!!

1 Like

Thanks! I just downloaded 0.7.2 and using it with java --jar instead of doing chmod +x, then it worked.

Hi @lfib, version 0.8.1 of Igluctl has been recently released. You can take look at this announcement. New version restores compatibility with Java 8, so you can try it out and verify whether problem still occurs.

1 Like