Community Tip - You can change your system assigned username to something more personal in your community settings. X
I'm trying to run Azure IoT Hub Connector via windows cmd and got this error in step 10 from the guide in ptc support. I am using java version 1.8.0_161 and ThingWorx 9.2.
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/inject/Module
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: com.google.inject.Module
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
Thanks in advance.
I got it working by reinstalling the connector, but now I got error on cxserver.log:
ERROR c.t.s.i.transport.MuxingBytesChannel - Error refilling connections on [channel: null, endpoint ws://localhost:8080/Thingworx/WS, uri: ws://localhost:8080/Thingworx/WS] failed : java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
searching shows because of the java version, but I try jdk 8 (1.8u161), 11.0 and 15.0.1 still the same error. Any suggestions?
Hi,
Take a look at this discussion - "Getting java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory exception": https://stackoverflow.com/questions/1551697/getting-java-lang-classnotfoundexception-org-apache-commons-logging-logfactory
thanks for the reply
I got it working by reinstalling, but now I got error on cxserver.log:
ERROR c.t.s.i.transport.MuxingBytesChannel - Error refilling connections on [channel: null, endpoint ws://localhost:8080/Thingworx/WS, uri: ws://localhost:8080/Thingworx/WS] failed : java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
the IoT Hub Connector still runs in cmd despite the error, but IoT_Hub.Thing on ThingWorx is still disconnected.
Several articles with a similar error:
Hi @FA_9884259.
If you're still experiencing issues, I recommend we open a support case. I will be happy to open it on your behalf if one is needed.
Regards.
--Sharon