[ https://issues.apache.org/jira/browse/SOLR-13921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16972315#comment-16972315 ]
Lucene/Solr QA commented on SOLR-13921: --------------------------------------- | (/) *{color:green}+1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 0s{color} | {color:green} The patch appears to include 1 new or modified test files. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 18s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 17s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 17s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Release audit (RAT) {color} | {color:green} 1m 5s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Check forbidden APIs {color} | {color:green} 1m 2s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Validate source patterns {color} | {color:green} 1m 2s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} unit {color} | {color:green} 45m 8s{color} | {color:green} core in the patch passed. {color} | | {color:green}+1{color} | {color:green} unit {color} | {color:green} 5m 33s{color} | {color:green} solrj in the patch passed. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 55m 5s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | SOLR-13921 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12985560/SOLR-13921.patch | | Optional Tests | compile javac unit ratsources checkforbiddenapis validatesourcepatterns | | uname | Linux lucene1-us-west 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | ant | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-SOLR-Build/sourcedir/dev-tools/test-patch/lucene-solr-yetus-personality.sh | | git revision | master / 88477112128 | | ant | version: Apache Ant(TM) version 1.10.5 compiled on March 28 2019 | | Default Java | LTS | | Test Results | https://builds.apache.org/job/PreCommit-SOLR-Build/594/testReport/ | | modules | C: solr/core solr/solrj U: solr | | Console output | https://builds.apache.org/job/PreCommit-SOLR-Build/594/console | | Powered by | Apache Yetus 0.7.0 http://yetus.apache.org | This message was automatically generated. > Processing UpdateRequest with delegation token throws NullPointerException > -------------------------------------------------------------------------- > > Key: SOLR-13921 > URL: https://issues.apache.org/jira/browse/SOLR-13921 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: SolrJ > Affects Versions: 7.4, 8.3 > Reporter: Istvan Farkas > Priority: Minor > Attachments: SOLR-13921.patch > > > When sending UpdateRequests with delegation tokens to Solr using SolrJ, the > createMethod of DelegationTokenHttpSolrClient will throw a > NullPointerException: > > {code:java} > [junit4] ERROR 3.41s | > TestSolrCloudWithDelegationTokens.testDelegationTokenSolrClientWithUpdateRequests > <<< > [junit4] > Throwable #1: java.lang.NullPointerException > [junit4] > at > __randomizedtesting.SeedInfo.seed([B9AE8E4E0CDF1B3D:DBA0B722C813061D]:0) > [junit4] > at > org.apache.solr.client.solrj.impl.DelegationTokenHttpSolrClient.createMethod(DelegationTokenHttpSolrClient.java:93) > [junit4] > at > org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:258) > [junit4] > at > org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:249) > [junit4] > at > org.apache.solr.cloud.TestSolrCloudWithDelegationTokens.doSolrRequest(TestSolrCloudWithDelegationTokens.java:246) > [junit4] > at > org.apache.solr.cloud.TestSolrCloudWithDelegationTokens.testDelegationTokenSolrClientWithUpdateRequests(TestSolrCloudWithDelegationTokens.java:477) > [junit4] > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [junit4] > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > [junit4] > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > [junit4] > at > java.base/java.lang.reflect.Method.invoke(Method.java:566) > [junit4] > at java.base/java.lang.Thread.run(Thread.java:834) > {code} > This happens to all SolrJ clients including the Spark Crunch indexer which > use Delegation Tokens and do not specify commit / optimize commands. > The cause seems to be a missing null check before dereferencing 'params'. The > intention of the code seems to be verifying if the delegation token is passed > a parameter of the SolrRequest (which is not supported), however the check > fails with NPE if the request has no params at all. For update requests which > do commit or optimize, the setCommand method initializes the params so no > NPE is thrown. > {code} > @Override > protected HttpRequestBase createMethod(final SolrRequest request, String > collection) throws IOException, SolrServerException { > SolrParams params = request.getParams(); > if (params.getParams(DELEGATION_TOKEN_PARAM) != null) { > throw new IllegalArgumentException(DELEGATION_TOKEN_PARAM + " parameter > not supported"); > } > return super.createMethod(request, collection); > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org