btrapp / jklarfreader

Java API for reading Klarf Files
MIT License
3 stars 8 forks source link

Error when creating JSON output file #5

Closed reshdesu closed 3 years ago

reshdesu commented 3 years ago

I am getting the following error when creating a JSON output file,

I have built the project using, mvn install -Dgpg.skip=true

The command I am using is, java -jar jklarfreader-0.9.13-SNAPSHOT.jar raw_KLARF.KLF C:\data\JSON_KLARF.json

Klarf file read successfully
Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper
        at com.btrapp.jklarfreader.impl.KlarfQuickTest.main(KlarfQuickTest.java:39)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:636)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
        ... 1 more
btrapp commented 3 years ago

Thanks for your feedback. I've added fat-jar support in the latest version, so you can use "mvn clean package" to generate target/jklarfreader-#.#.##-SNAPSHOT-jar-with-dependencies.jar

This will include the jackson jars required to run it directly like "java -jar target/jklarfreader-#.#.##-SjNAPSHOT-jar-with-dependencies.jar /input/KlarfFile /output/JsonFile"

btrapp commented 3 years ago

Tested on latest branch, please re-open if you have any other issues.

reshdesu commented 3 years ago

Works now! Thanks!