Skip to main content
7-Bedrock
December 6, 2018
Question

Can not run sample Thingworx java sdk code

  • December 6, 2018
  • 1 reply
  • 4659 views

I am trying to run code provide from https://developer.thingworx.com/en/resources/guides/thingworx-java-sdk-tutorial

 

put threads are executing repeatedly, no error occures.

I have not provided  Thingworx username and password in my code. I had only set appKey , which i created from Thingworx composer Application key.

 

 

After executing i get Logs as shown in file.

1 reply

20-Turquoise
December 6, 2018

Have you checked the connection from the composer/platform side? It seems like it's connecting with no issues. You may look in your application log too to see if there is anything unusual in there (from the monitoring tab in your Composer).

1-Visitor
December 7, 2018

Thank you  posipova,

 

Yes I looked into the application log , I found their a warning as:

 

Server WebSocket closed unexpectedly, unregistering from Server Endpoint [ws session id: 8, endpoint id: 9, endpoint name: null] An existing connection was forcibly closed by the remote host

 

******************Also, 

Do I need to provide my Thingworx username and  Password in code or some other file for authentication?

 

20-Turquoise
December 14, 2018

Based on the logs you provided, it actually seems like it's working. Have you checked the connection whether it's set to true? Your sdk log shows pong being received which means it's connected.