Skip to content

Troubles running default config #55

@yghern

Description

@yghern
  1. Clone repository: git clone https://github.com/everwatchsolutions/json-data-generator.git (1.4.1)
  2. Compile using mvn clean package from command line (success), maven 3.3.9, Oracle Java 1.8.0_152, Linux Mint 18.2
  3. Copy bin.tar and .jar files to separate directory
  4. Modify classes/defaultSimConfig.json by removing nats producer section (only default logger is left)
  5. Copy classes/defaultSimConfig.json and classes/normalUser1Workflow.json to above directory
  6. Enter above directory and start program using command java -jar json-data-generator-1.4.1-SNAPSHOT.jar defaultSimConfig.json

Expected:
Demo project is run

Actual:
achamier@deathstar ~/git/json-data-generator/run $ java -jar json-data-generator-1.4.1-SNAPSHOT.jar defaultSimConfig.json
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/paho/client/mqttv3/MqttException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.eclipse.paho.client.mqttv3.MqttException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more

When generator is run from target directory it runs without an issue.
I googled some solution, there are several threads which ends in "oh it looks like you forgot about dependencies" but withour real solution, and as far as I can see mqttv3 is declared both in pom.xml and json-data-generator.iml. Any help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions