cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Azure IoT Hub Connector 4.2 failed to start

FA_9884259
1-Newbie

Azure IoT Hub Connector 4.2 failed to start

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.

5 REPLIES 5

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?

VladimirN
23-Emerald IV
(To:FA_9884259)

 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-comm... 

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.

VladimirN
23-Emerald IV
(To:FA_9884259)

Several articles with a similar error:

slangley
23-Emerald II
(To:FA_9884259)

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

Announcements