I am trying to run a simple mapdb example, but get the error:
Exception in thread \"main\" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
Either kotlin-runtime
has to be in classpath
and verify with $ echo $CLASSPATH
.
Or you have to add kotlin-runtime
to maven and then assemble inside the jar itself with mvn compile assembly:single
,
org.jetbrains.kotlin
kotlin-runtime
1.1.3
compile
org.jetbrains.kotlin
kotlin-stdlib
1.1.3
compile
which need to be attached to artifact as well and can be done with assembly-plugin
.
maven-assembly-plugin
event.handlers.InventoryEventHandler
jar-with-dependencies
you can verify the kotlin-runtime is added to jar by
$ jar -tf target/amz-wavelength-1.0-SNAPSHOT-jar-with-dependencies.jar | grep kotlin-runtime
META-INF/kotlin-runtime.kotlin_module
or
$ jar -tf target/amz-wavelength-1.0-SNAPSHOT-jar-with-dependencies.jar | grep "kotlin/jvm/internal/*"