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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Java SDK: ERROR java.util.concurrent.TimeoutException APIRequestMessage


Java SDK: ERROR java.util.concurrent.TimeoutException APIRequestMessage

Hello community,

good to be here, my question:

Use-Case: I have a DataTable with orders. A service (receiveNewOrder) is looking for new free orders for my machines. The machines are simulated with the Java Edge SDK.


Issue: Every time I run my Application which ist providing all machines in state 'IDLE' with new orders I get the following ERROR when trying to set machine (thing) property (CurrentOrder) to new order (String):
2020-08-11 12:57:00.346+0200 [L: ERROR] [O: S.c.t.d.e.DSLScript] [I: ] [U: Administrator] [S: ] [T: TWEventProcessor-4] Asset_M_011001.receiveNewOrder - Error [Line: 16]: JavaException: java.util.concurrent.TimeoutException: Timed out APIRequestMessage [requestId: 13, endpointId: -1, sessionId: -1, method: PUT, entityName: *xxxx_010719, characteristic: Properties, target: CurrentOrder]



logger.debug( + ".receiveNewOrder started.");
try {
	var orderStatus = "FREI";
    var sortColumn = "Erdat";
	// result: INFOTABLE dataShape: "sapOrders"
    // FYI: getOrder is calling QueryDataTableEntries with query containing Status and Capability
	var fittingOrders = Things["orders"].getOrder({Status: orderStatus,	Capability: me.Capability});
    if (fittingOrders !== undefined && fittingOrders.length !== 0) {
    	var sort = new Object(); = sortColumn;
    	sort.ascending = true;
    	var sortedOrders = fittingOrders;
        me.TargetQuantity = sortedOrders.getRow(0).Gamng;
        me.CurrentQuantity = sortedOrders.getRow(0).Prodmng;
        logger.warn( + ".receiveNewOrder - found Order (" + sortedOrders.getRow(0).Aufnr + ") for machine: " + + " - CurrentOrder: " + me.CurrentOrder);
    	me.CurrentOrder = sortedOrders.getRow(0).Aufnr; // <--- ERROR
    } else { + ".receiveNewOrder - found NO fitting Order for machine: " +;
} catch (err) {
	logger.error( + ".receiveNewOrder - Error [Line: " + err.lineNumber + "]: " + err);
} + ".receiveNewOrder finished.");



Maybe I am locking the property? I am grateful for any help, thanks for your time in advance.

Additional Info: The error occurs every time when the orders are processed by the edge device which is simulating the machines. The error has as a consequence that one order gets the target quantity from the order which was the last to be produced. As it looks my service want to set the CurrentOrder Property but can't and then runs in the timeout above. But this is not always the case only from time to time.

Hardware: I am using the Manufacturing Apps Trail Edition on a Windows Server with:

  • 6 CPU vCores
  • 8 GB RAM (about 7 GB are in use)
  • 500 GB SSD/HDD


  • Edge Device consisting of two java classes.
  • The log messages from service.log.