Article - CS302119
ThingWorx snippet service SearchThingsByTemplatefails of resource SearchFunctions fails with error"Unable to query implementing things : null" when parameters maxItems above 2500 and query is specified
Modified: 30-Jul-2021
Applies To
- ThingWorx Platform 8.2 to 8.4
Description
- Cannot execute ThingWorx snippet service SearchThingsByTemplatefails of Resource SearchFunctions
- SearchThingsByTemplate service returns error when parameters maxItems is above 2500 and query is specified
- SearchThingsByTemplate service fails with the following errors
- in the UI
- Unable to query implementing things : null] java.lang.Exception: Unable to query implementing things : null
- Following is observed in the ErrorLog.log:
- [DATE_TIME] [L: ERROR] [O: E.c.t.w.BaseService] [I: ] [U: [USERNAME]] [S: ] [T: https-jsse-nio-443-exec-126] [context: com.thingworx.webservices.context.HttpExecutionContext@5009757e][message: Unable to Invoke Service SearchThingsByTemplate on SearchFunctions : Unable to query implementing things : null] java.lang.Exception: Unable to query implementing things : null
at com.thingworx.entities.utils.ThingTemplateUtilities.rawQueryImplementingThings(ThingTemplateUtilities.java:202)
at com.thingworx.thingtemplates.ThingTemplate.QueryImplementingThingsWithData(ThingTemplate.java:2806)
at com.thingworx.resources.queries.Searcher.SearchThingsByTemplate(Searcher.java:2398)
at sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.thingworx.common.processors.ReflectionProcessor.processService(ReflectionProcessor.java:261)
at com.thingworx.handlers.ReflectionServiceHandler.processService(ReflectionServiceHandler.java:50)
at com.thingworx.entities.helpers.InternalServiceHelper.processServiceRequestDirect(InternalServiceHelper.java:117)
at com.thingworx.entities.helpers.InternalServiceHelper.processAPIServiceRequest(InternalServiceHelper.java:88)
at com.thingworx.entities.ServiceProviderEntity.processAPIServiceRequest(ServiceProviderEntity.java:61)
at com.thingworx.webservices.BaseService.handleInvoke(BaseService.java:3031)
... 49 common frames omitted
Wrapped by: com.thingworx.common.exceptions.InvalidRequestException: Unable to Invoke Service SearchThingsByTemplate on SearchFunctions : Unable to query implementing things : null
at com.thingworx.webservices.BaseService.handleInvoke(BaseService.java:3082)
at com.thingworx.webservices.BaseService.service(BaseService.java:354)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at com.thingworx.security.contenttype.ContentTypeFilter.doFilter(ContentTypeFilter.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at com.thingworx.security.filter.ValidationFilter.doFilter(ValidationFilter.java:22)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at com.thingworx.security.authentication.AuthenticationFilter.propagateRequest(AuthenticationFilter.java:506)
...
- [DATE_TIME] [L: ERROR] [O: E.c.t.w.BaseService] [I: ] [U: [USERNAME]] [S: ] [T: https-jsse-nio-443-exec-126] [context: com.thingworx.webservices.context.HttpExecutionContext@5009757e][message: Unable to Invoke Service SearchThingsByTemplate on SearchFunctions : Unable to query implementing things : null] java.lang.Exception: Unable to query implementing things : null
- in the UI
This is a printer-friendly version of Article 302119 and may be out of date. For the latest version click CS302119