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

Can not run sample Thingworx java sdk code

Regular Member

Can not run sample Thingworx java sdk code

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.

6 REPLIES 6
Highlighted

Re: Can not run sample Thingworx java sdk code

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

Re: Can not run sample Thingworx java sdk code

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?

 

Re: Can not run sample Thingworx java sdk code

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.

Re: Can not run sample Thingworx java sdk code

Hi @shindemayur.

 

If the previous post by @posipova helped you to solve your issue, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Re: Can not run sample Thingworx java sdk code

Thanks for the reminder @slangley ,

but I am able to find Accept solution option on the page.

Re: Can not run sample Thingworx java sdk code

Hi @shindemayur.

 

You are most likely not logged in:

 

PreLogin.PNG

 

Following login you should see the option to select the appropriate solution.  Just remember to scroll to the appropriate response before clicking the Accept as Solution button:

 

PostLogin.PNGRegards.

 

--Sharon