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

Java SDK Questions

SOLVED
Level 7

Java SDK Questions

Hi All:

 

I used Java SDK to connect to ThingWorx.

But I always got a error message.

java.util.concurrent.TimeoutException: Timed out APIRequestMessage [requestId: 5, endpointId: 0, sessionId: 20, method: PUT, entityName: anomalytest02, characteristic: Properties, target: *]
	at com.thingworx.communications.common.endpoints.CommunicationEndpoint.sendRequest(CommunicationEndpoint.java:533)
	at com.thingworx.communications.common.endpoints.CommunicationEndpoint.sendRequest(CommunicationEndpoint.java:496)
	at com.thingworx.communications.client.BaseClient.sendRequest(BaseClient.java:1076)
	at com.thingworx.communications.client.BaseClient.writeProperties(BaseClient.java:533)
	at com.thingworx.communications.client.BaseClient.writeProperty(BaseClient.java:474)
	at com.thingworx.communications.client.BaseClient.writeProperty(BaseClient.java:446)
	at org.lsa.TwxSimulator.SimpleThingClient.main(SimpleThingClient.java:110)

I used PTC's simple code.

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Java SDK Questions

Hello. Thanks for posting in the Community.

 

That timeout error may indicate: 

  • There may be some hardware or software issues which may cause the edge devices response time bigger than the allowed time in ThingWorx
  • ThingWorx will throws timeout error although edge devices are trying to response in a longer time

What you might try doing is:

 

  • Go to Subsystems > WSCommunicationsSubsystem > Configuration
  • Set Amount of time a request will wait for the response message before timing out (secs) (30 secs by default) to be a larger value

Let us know if changing the timeout value makes any difference.

 

Thank you,

 

-- Craig A.

4 REPLIES 4

Re: Java SDK Questions

Hello. Thanks for posting in the Community.

 

That timeout error may indicate: 

  • There may be some hardware or software issues which may cause the edge devices response time bigger than the allowed time in ThingWorx
  • ThingWorx will throws timeout error although edge devices are trying to response in a longer time

What you might try doing is:

 

  • Go to Subsystems > WSCommunicationsSubsystem > Configuration
  • Set Amount of time a request will wait for the response message before timing out (secs) (30 secs by default) to be a larger value

Let us know if changing the timeout value makes any difference.

 

Thank you,

 

-- Craig A.

Re: Java SDK Questions

Thank you.

 

I added more resource for hardware and I thought it solved the problems.

 

But I have a question.

I usually use the http to send or get data for ThingWorx.

Sometime 1 second has 1 ~ 3 requests into ThingWorx

The ThingWorx work well.

 

Now, I try to build a remote thing to do that.

It's sometime failed. 

Does remote thing need more recourse?

Re: Java SDK Questions

Hi,

Is the ThingWorx hosting Operating System following the Minimum HW System Requirements at the moment?

 

Highlighted

Re: Java SDK Questions

Oops, It's not follow the server requirements before.

But now, I change it.

 

Thanks,