Skip to main content
5-Regular Member
March 3, 2017
Solved

Getting Exception while trying to connect ThingWorx through Java SDK

  • March 3, 2017
  • 2 replies
  • 2233 views

I have downloaded TW_Download_Java SDK.zip and trying to execute SimpleClient.java with my ThingWorx, but got below exception:

Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;

  at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:115)

  at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:439)

  at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:395)

  at ch.qos.logback.classic.Logger.info(Logger.java:599)

  at com.thingworx.communications.client.processor.ClientMessageProcessor.<init>(ClientMessageProcessor.java:62)

  at com.thingworx.communications.client.BaseClient.initializeMessageProcessor(BaseClient.java:197)

  at com.thingworx.communications.client.BaseClient.initialize(BaseClient.java:180)

  at com.thingworx.communications.client.BaseClient.<init>(BaseClient.java:119)

  at com.thingworx.communications.client.ConnectedThingClient.<init>(ConnectedThingClient.java:97)

  at com.thingworx.communications.client.ConnectedThingClient.<init>(ConnectedThingClient.java:84)

  at com.thingworx.sdk.simple.SimpleClient.<init>(SimpleClient.java:25)

  at com.thingworx.sdk.simple.SimpleClient.main(SimpleClient.java:49)

please help me

Best answer by ankigupta

Ramaraju Sagiraju​, Seems that org.slf4j.helpers.MessageFormatter.arrayFormat is missing in your references.

Delete the old references. Readd the ThingWorx Jar files. Refresh your Project and it should work.

Or simply replace the jar files in the folder where it originally exist and refresh your project.

Do let me know if you face any issue.

2 replies

5-Regular Member
March 3, 2017

Hi Ramaraju Sagiraju​,

Which JDK version do you have?

And also share the steps you followed to setup the Java SDK? I hope you are using eclipse for this.

Thanks,

Ankit Gupta

ankigupta5-Regular MemberAnswer
5-Regular Member
March 3, 2017

Ramaraju Sagiraju​, Seems that org.slf4j.helpers.MessageFormatter.arrayFormat is missing in your references.

Delete the old references. Readd the ThingWorx Jar files. Refresh your Project and it should work.

Or simply replace the jar files in the folder where it originally exist and refresh your project.

Do let me know if you face any issue.

rsagiraj5-Regular MemberAuthor
5-Regular Member
March 3, 2017

Thanks Ankit Gupta​, with the references provided by you the issue is resolved.