Puneet Sharma created SOLR-17721: ------------------------------------ Summary: RouteException with the message Cannot invoke "java.util.Collection.size()" because "original" is null in solrj while doing atomic update using add-distinct from java based application Key: SOLR-17721 URL: https://issues.apache.org/jira/browse/SOLR-17721 Project: Solr Issue Type: Bug Reporter: Puneet Sharma
I am Getting RouteException with the message Cannot invoke "java.util.Collection.size()" because "original" is null in solrj This issue is happening in my production environment when my java application was trying to update it with document {{{}[SolrInputDocument(fields: [id=10001, activePromos=\\{add-distinct=WHOLESALE}, lastUpdatedTime=\\{set=1711433462524}])]{}}}, where I am using solr 9.6.1 in the production environment, I am not able to reproduce this in my local, it's working as expected Can someone help here what can be the possible reason for this Error? Definition of this field "activePromos" in my managed-schema \{ "name":"activePromos", "type":"string", "docValues":true, "multiValued":true, "indexed":false, "stored":true } Also, the document was present with id: 10001 I tried replicating my local with the same SOLR version 8.11.2, but it was updating properly, in a few instances, it was failing in production Environment difference between local and production, in production, we have millions of data and it multi sharded whereas, my local has limited data and single sharded application Solr Version: 9.6.1 Solrj maven dependency Version: 8.11.3 *Complete Stack Trace* org.apache.solr.client.solrj.impl.CloudSolrClient$RouteException: Error from server at http://x-search-solr9-user-rc-s2-t1.gdn-sg.cld:8983/solr/l5RecommendationCollectionProdSkuBased_shard2_replica_t17: Cannot invoke "java.util.Collection.size()" because "original" is null at org.apache.solr.client.solrj.impl.CloudSolrClient.getRouteException(CloudSolrClient.java:125) at org.apache.solr.client.solrj.impl.CloudSolrClient.getRouteException(CloudSolrClient.java:46) at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.directUpdate(BaseCloudSolrClient.java:579) at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.sendRequest(BaseCloudSolrClient.java:1076) at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.requestWithRetryOnStaleState(BaseCloudSolrClient.java:934) at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.request(BaseCloudSolrClient.java:866) at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:225) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:106) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:71) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:85) at com.gdn.x.search.service.impl.SolrDataServiceV2Impl.updateRequestToSolr(SolrDataServiceV2Impl.java:654) at com.gdn.x.search.service.impl.SolrDataServiceV2Impl.redirectUpdateRequest(SolrDataServiceV2Impl.java:681) at com.gdn.x.search.service.impl.SolrDataServiceV2Impl.updateAndHandleException(SolrDataServiceV2Impl.java:776) at com.gdn.x.search.service.impl.SolrDataServiceV2Impl.updateThrottler(SolrDataServiceV2Impl.java:727) at com.gdn.x.search.service.impl.SolrDataServiceV2Impl.update(SolrDataServiceV2Impl.java:850) at com.gdn.x.search.service.impl.SolrDataServiceV2Impl.lambda$atomicUpdateList$61(SolrDataServiceV2Impl.java:1937) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at com.gdn.x.search.other.service.helper.wrapper.ContextAwarePoolExecutor.lambda$wrap$0(ContextAwarePoolExecutor.java:35) at datadog.trace.bootstrap.instrumentation.java.concurrent.Wrapper.run(Wrapper.java:46) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://x-search-solr9-user-rc-s2-t1.gdn-sg.cld:8983/solr/l5RecommendationCollectionProdSkuBased_shard2_replica_t17: Cannot invoke "java.util.Collection.size()" because "original" is null at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:681) at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:266) at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:248) at org.apache.solr.client.solrj.impl.LBSolrClient.doRequest(LBSolrClient.java:369) at org.apache.solr.client.solrj.impl.LBSolrClient.request(LBSolrClient.java:297) at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.lambda$directUpdate$0(BaseCloudSolrClient.java:555) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:218) ... 4 common frames omitted -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org