[jira] [Commented] (SOLR-13202) Three NullPointerExceptions in org.apache.solr.search.JoinQuery.hashCode()

2026-10-22 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130373#comment-18130373
 ] 

ASF subversion and git services commented on SOLR-13202:


Commit df068c71f8b25a2e0ded86d722b0eeb1c84c5f5b in solr's branch 
refs/heads/branch_9x from Nick
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=df068c71f8b ]

SOLR-13202: Return 400 instead of 500 for join queries missing from/to 
parameters (#5012)

Adapted for branch_9x: omits the auxIndexJoin and globalOrdinalsJoin parts, 
which
are not on 9.x.

(cherry picked from commit 93e357bcf6bc9b3b6195043529ef5e1fa2001fde)
(cherry picked from commit a9d489d2035d6ee920f2068f025c6217a934603a)


> Three NullPointerExceptions in org.apache.solr.search.JoinQuery.hashCode()
> --
>
> Key: SOLR-13202
> URL: https://issues.apache.org/jira/browse/SOLR-13202
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 9.0
> Environment: h1. Steps to reproduce
> * Use a Linux machine.
> *  Build commit {{ea2c8ba}} of Solr as described in the section below.
> * Build the films collection as described below.
> * Start the server using the command {{./bin/solr start -f -p 8983 -s 
> /tmp/home}}
> * Request the URL given in the bug description.
> h1. Compiling the server
> {noformat}
> git clone https://github.com/apache/lucene-solr
> cd lucene-solr
> git checkout ea2c8ba
> ant compile
> cd solr
> ant server
> {noformat}
> h1. Building the collection
> We followed [Exercise 
> 2|http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html#exercise-2] from 
> the [Solr 
> Tutorial|http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html]. The 
> attached file ({{home.zip}}) gives the contents of folder {{/tmp/home}} that 
> you will obtain by following the steps below:
> {noformat}
> mkdir -p /tmp/home
> echo '' > 
> /tmp/home/solr.xml
> {noformat}
> In one terminal start a Solr instance in foreground:
> {noformat}
> ./bin/solr start -f -p 8983 -s /tmp/home
> {noformat}
> In another terminal, create a collection of movies, with no shards and no 
> replication, and initialize it:
> {noformat}
> bin/solr create -c films
> curl -X POST -H 'Content-type:application/json' --data-binary '{"add-field": 
> {"name":"name", "type":"text_general", "multiValued":false, "stored":true}}' 
> http://localhost:8983/solr/films/schema
> curl -X POST -H 'Content-type:application/json' --data-binary 
> '{"add-copy-field" : {"source":"*","dest":"_text_"}}' 
> http://localhost:8983/solr/films/schema
> ./bin/post -c films example/films/films.json
> {noformat}
>Reporter: Cesar Rodriguez
>Priority: Major
>  Labels: diffblue, newdev, pull-request-available
> Fix For: 10.1
>
> Attachments: SOLR-13202.patch, home.zip
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Requesting any of the following URLs causes Solr to return an HTTP 500 error 
> response:
> {noformat}
> http://localhost:8983/solr/films/select?fq={!join%20from=b%20to=a}
> http://localhost:8983/solr/films/select?fq={!join%20to=a}
> http://localhost:8983/solr/films/select?fq={!join}
> {noformat}
> The error response seems to be caused by the following uncaught exception:
>  {noformat}
> java.lang.NullPointerException
>  at org.apache.solr.search.JoinQuery.hashCode(JoinQParserPlugin.java:578)
>  at org.apache.solr.search.QueryResultKey.(QueryResultKey.java:52)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1328)
>  at 
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:567)
>  at 
> org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1434)
>  at 
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:373)
>  at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:298)
>  at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
>  at org.apache.solr.core.SolrCore.execute(SolrCore.java:2559)
> [...]
> {noformat}
> The problem seems to be related with method {{hasCode}} in the class 
> {{org.apache.solr.search.JoinQuery}}:
> {code:java}
>   @Override
>   public int hashCode() {
> int h = classHash();
> h = h * 31 + fromField.hashCode();
> h = h * 31 + toField.hashCode();
> h = h * 31 + q.hashCode();
> h = h * 31 + Objects.hashCode(fromIndex);
> h = h * 31 + (int) fromCoreOpenTime;
> return h;
>   }
> {code}
> The URLs provided above selectively leave uninitialized the fields 
> {{fromField}}, {{fromIndex}}, {{q}}, and {{toField}}, but all of these fields 
> are accessed by this method.
>  
> We found this issue and ~70 more like this using [Diffblue Microservices 
> 

[jira] [Commented] (SOLR-13202) Three NullPointerExceptions in org.apache.solr.search.JoinQuery.hashCode()

2026-10-08 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18124899#comment-18124899
 ] 

ASF subversion and git services commented on SOLR-13202:


Commit 16c89f928e22c90f18c66edfc5ac8675d600f0e0 in solr's branch 
refs/heads/branch_10_1 from Nick
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=16c89f928e2 ]

SOLR-13202: Return 400 instead of 500 for join queries missing from/to 
parameters (#5012)

(cherry picked from commit 93e357bcf6bc9b3b6195043529ef5e1fa2001fde)
(cherry picked from commit a9d489d2035d6ee920f2068f025c6217a934603a)


> Three NullPointerExceptions in org.apache.solr.search.JoinQuery.hashCode()
> --
>
> Key: SOLR-13202
> URL: https://issues.apache.org/jira/browse/SOLR-13202
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 9.0
> Environment: h1. Steps to reproduce
> * Use a Linux machine.
> *  Build commit {{ea2c8ba}} of Solr as described in the section below.
> * Build the films collection as described below.
> * Start the server using the command {{./bin/solr start -f -p 8983 -s 
> /tmp/home}}
> * Request the URL given in the bug description.
> h1. Compiling the server
> {noformat}
> git clone https://github.com/apache/lucene-solr
> cd lucene-solr
> git checkout ea2c8ba
> ant compile
> cd solr
> ant server
> {noformat}
> h1. Building the collection
> We followed [Exercise 
> 2|http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html#exercise-2] from 
> the [Solr 
> Tutorial|http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html]. The 
> attached file ({{home.zip}}) gives the contents of folder {{/tmp/home}} that 
> you will obtain by following the steps below:
> {noformat}
> mkdir -p /tmp/home
> echo '' > 
> /tmp/home/solr.xml
> {noformat}
> In one terminal start a Solr instance in foreground:
> {noformat}
> ./bin/solr start -f -p 8983 -s /tmp/home
> {noformat}
> In another terminal, create a collection of movies, with no shards and no 
> replication, and initialize it:
> {noformat}
> bin/solr create -c films
> curl -X POST -H 'Content-type:application/json' --data-binary '{"add-field": 
> {"name":"name", "type":"text_general", "multiValued":false, "stored":true}}' 
> http://localhost:8983/solr/films/schema
> curl -X POST -H 'Content-type:application/json' --data-binary 
> '{"add-copy-field" : {"source":"*","dest":"_text_"}}' 
> http://localhost:8983/solr/films/schema
> ./bin/post -c films example/films/films.json
> {noformat}
>Reporter: Cesar Rodriguez
>Priority: Major
>  Labels: diffblue, newdev, pull-request-available
> Fix For: 10.1
>
> Attachments: SOLR-13202.patch, home.zip
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Requesting any of the following URLs causes Solr to return an HTTP 500 error 
> response:
> {noformat}
> http://localhost:8983/solr/films/select?fq={!join%20from=b%20to=a}
> http://localhost:8983/solr/films/select?fq={!join%20to=a}
> http://localhost:8983/solr/films/select?fq={!join}
> {noformat}
> The error response seems to be caused by the following uncaught exception:
>  {noformat}
> java.lang.NullPointerException
>  at org.apache.solr.search.JoinQuery.hashCode(JoinQParserPlugin.java:578)
>  at org.apache.solr.search.QueryResultKey.(QueryResultKey.java:52)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1328)
>  at 
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:567)
>  at 
> org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1434)
>  at 
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:373)
>  at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:298)
>  at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
>  at org.apache.solr.core.SolrCore.execute(SolrCore.java:2559)
> [...]
> {noformat}
> The problem seems to be related with method {{hasCode}} in the class 
> {{org.apache.solr.search.JoinQuery}}:
> {code:java}
>   @Override
>   public int hashCode() {
> int h = classHash();
> h = h * 31 + fromField.hashCode();
> h = h * 31 + toField.hashCode();
> h = h * 31 + q.hashCode();
> h = h * 31 + Objects.hashCode(fromIndex);
> h = h * 31 + (int) fromCoreOpenTime;
> return h;
>   }
> {code}
> The URLs provided above selectively leave uninitialized the fields 
> {{fromField}}, {{fromIndex}}, {{q}}, and {{toField}}, but all of these fields 
> are accessed by this method.
>  
> We found this issue and ~70 more like this using [Diffblue Microservices 
> Testing|https://www.diffblue.com/labs/?utm_source=solr-br]. Find more 
> information on this [fuzz testing 
> 

[jira] [Commented] (SOLR-13202) Three NullPointerExceptions in org.apache.solr.search.JoinQuery.hashCode()

2026-10-07 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18124814#comment-18124814
 ] 

ASF subversion and git services commented on SOLR-13202:


Commit a9d489d2035d6ee920f2068f025c6217a934603a in solr's branch 
refs/heads/branch_10x from Nick
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=a9d489d2035 ]

SOLR-13202: Return 400 instead of 500 for join queries missing from/to 
parameters (#5012)

(cherry picked from commit 93e357bcf6bc9b3b6195043529ef5e1fa2001fde)


> Three NullPointerExceptions in org.apache.solr.search.JoinQuery.hashCode()
> --
>
> Key: SOLR-13202
> URL: https://issues.apache.org/jira/browse/SOLR-13202
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 9.0
> Environment: h1. Steps to reproduce
> * Use a Linux machine.
> *  Build commit {{ea2c8ba}} of Solr as described in the section below.
> * Build the films collection as described below.
> * Start the server using the command {{./bin/solr start -f -p 8983 -s 
> /tmp/home}}
> * Request the URL given in the bug description.
> h1. Compiling the server
> {noformat}
> git clone https://github.com/apache/lucene-solr
> cd lucene-solr
> git checkout ea2c8ba
> ant compile
> cd solr
> ant server
> {noformat}
> h1. Building the collection
> We followed [Exercise 
> 2|http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html#exercise-2] from 
> the [Solr 
> Tutorial|http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html]. The 
> attached file ({{home.zip}}) gives the contents of folder {{/tmp/home}} that 
> you will obtain by following the steps below:
> {noformat}
> mkdir -p /tmp/home
> echo '' > 
> /tmp/home/solr.xml
> {noformat}
> In one terminal start a Solr instance in foreground:
> {noformat}
> ./bin/solr start -f -p 8983 -s /tmp/home
> {noformat}
> In another terminal, create a collection of movies, with no shards and no 
> replication, and initialize it:
> {noformat}
> bin/solr create -c films
> curl -X POST -H 'Content-type:application/json' --data-binary '{"add-field": 
> {"name":"name", "type":"text_general", "multiValued":false, "stored":true}}' 
> http://localhost:8983/solr/films/schema
> curl -X POST -H 'Content-type:application/json' --data-binary 
> '{"add-copy-field" : {"source":"*","dest":"_text_"}}' 
> http://localhost:8983/solr/films/schema
> ./bin/post -c films example/films/films.json
> {noformat}
>Reporter: Cesar Rodriguez
>Priority: Major
>  Labels: diffblue, newdev, pull-request-available
> Fix For: 10.2
>
> Attachments: SOLR-13202.patch, home.zip
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Requesting any of the following URLs causes Solr to return an HTTP 500 error 
> response:
> {noformat}
> http://localhost:8983/solr/films/select?fq={!join%20from=b%20to=a}
> http://localhost:8983/solr/films/select?fq={!join%20to=a}
> http://localhost:8983/solr/films/select?fq={!join}
> {noformat}
> The error response seems to be caused by the following uncaught exception:
>  {noformat}
> java.lang.NullPointerException
>  at org.apache.solr.search.JoinQuery.hashCode(JoinQParserPlugin.java:578)
>  at org.apache.solr.search.QueryResultKey.(QueryResultKey.java:52)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1328)
>  at 
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:567)
>  at 
> org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1434)
>  at 
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:373)
>  at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:298)
>  at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
>  at org.apache.solr.core.SolrCore.execute(SolrCore.java:2559)
> [...]
> {noformat}
> The problem seems to be related with method {{hasCode}} in the class 
> {{org.apache.solr.search.JoinQuery}}:
> {code:java}
>   @Override
>   public int hashCode() {
> int h = classHash();
> h = h * 31 + fromField.hashCode();
> h = h * 31 + toField.hashCode();
> h = h * 31 + q.hashCode();
> h = h * 31 + Objects.hashCode(fromIndex);
> h = h * 31 + (int) fromCoreOpenTime;
> return h;
>   }
> {code}
> The URLs provided above selectively leave uninitialized the fields 
> {{fromField}}, {{fromIndex}}, {{q}}, and {{toField}}, but all of these fields 
> are accessed by this method.
>  
> We found this issue and ~70 more like this using [Diffblue Microservices 
> Testing|https://www.diffblue.com/labs/?utm_source=solr-br]. Find more 
> information on this [fuzz testing 
> 

[jira] [Commented] (SOLR-13202) Three NullPointerExceptions in org.apache.solr.search.JoinQuery.hashCode()

2026-10-07 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18124555#comment-18124555
 ] 

ASF subversion and git services commented on SOLR-13202:


Commit 93e357bcf6bc9b3b6195043529ef5e1fa2001fde in solr's branch 
refs/heads/main from Nick
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=93e357bcf6b ]

SOLR-13202: Return 400 instead of 500 for join queries missing from/to 
parameters (#5012)

> Three NullPointerExceptions in org.apache.solr.search.JoinQuery.hashCode()
> --
>
> Key: SOLR-13202
> URL: https://issues.apache.org/jira/browse/SOLR-13202
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 9.0
> Environment: h1. Steps to reproduce
> * Use a Linux machine.
> *  Build commit {{ea2c8ba}} of Solr as described in the section below.
> * Build the films collection as described below.
> * Start the server using the command {{./bin/solr start -f -p 8983 -s 
> /tmp/home}}
> * Request the URL given in the bug description.
> h1. Compiling the server
> {noformat}
> git clone https://github.com/apache/lucene-solr
> cd lucene-solr
> git checkout ea2c8ba
> ant compile
> cd solr
> ant server
> {noformat}
> h1. Building the collection
> We followed [Exercise 
> 2|http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html#exercise-2] from 
> the [Solr 
> Tutorial|http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html]. The 
> attached file ({{home.zip}}) gives the contents of folder {{/tmp/home}} that 
> you will obtain by following the steps below:
> {noformat}
> mkdir -p /tmp/home
> echo '' > 
> /tmp/home/solr.xml
> {noformat}
> In one terminal start a Solr instance in foreground:
> {noformat}
> ./bin/solr start -f -p 8983 -s /tmp/home
> {noformat}
> In another terminal, create a collection of movies, with no shards and no 
> replication, and initialize it:
> {noformat}
> bin/solr create -c films
> curl -X POST -H 'Content-type:application/json' --data-binary '{"add-field": 
> {"name":"name", "type":"text_general", "multiValued":false, "stored":true}}' 
> http://localhost:8983/solr/films/schema
> curl -X POST -H 'Content-type:application/json' --data-binary 
> '{"add-copy-field" : {"source":"*","dest":"_text_"}}' 
> http://localhost:8983/solr/films/schema
> ./bin/post -c films example/films/films.json
> {noformat}
>Reporter: Cesar Rodriguez
>Priority: Major
>  Labels: diffblue, newdev, pull-request-available
> Attachments: SOLR-13202.patch, home.zip
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Requesting any of the following URLs causes Solr to return an HTTP 500 error 
> response:
> {noformat}
> http://localhost:8983/solr/films/select?fq={!join%20from=b%20to=a}
> http://localhost:8983/solr/films/select?fq={!join%20to=a}
> http://localhost:8983/solr/films/select?fq={!join}
> {noformat}
> The error response seems to be caused by the following uncaught exception:
>  {noformat}
> java.lang.NullPointerException
>  at org.apache.solr.search.JoinQuery.hashCode(JoinQParserPlugin.java:578)
>  at org.apache.solr.search.QueryResultKey.(QueryResultKey.java:52)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1328)
>  at 
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:567)
>  at 
> org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1434)
>  at 
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:373)
>  at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:298)
>  at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
>  at org.apache.solr.core.SolrCore.execute(SolrCore.java:2559)
> [...]
> {noformat}
> The problem seems to be related with method {{hasCode}} in the class 
> {{org.apache.solr.search.JoinQuery}}:
> {code:java}
>   @Override
>   public int hashCode() {
> int h = classHash();
> h = h * 31 + fromField.hashCode();
> h = h * 31 + toField.hashCode();
> h = h * 31 + q.hashCode();
> h = h * 31 + Objects.hashCode(fromIndex);
> h = h * 31 + (int) fromCoreOpenTime;
> return h;
>   }
> {code}
> The URLs provided above selectively leave uninitialized the fields 
> {{fromField}}, {{fromIndex}}, {{q}}, and {{toField}}, but all of these fields 
> are accessed by this method.
>  
> We found this issue and ~70 more like this using [Diffblue Microservices 
> Testing|https://www.diffblue.com/labs/?utm_source=solr-br]. Find more 
> information on this [fuzz testing 
> campaign|https://www.diffblue.com/blog/2018/12/19/diffblue-microservice-testing-a-sneak-peek-at-our-early-product-and-results?utm_source=solr-br].



--
This message was sent by Atlassian Jira

[jira] [Commented] (SOLR-13202) Three NullPointerExceptions in org.apache.solr.search.JoinQuery.hashCode()

2026-10-02 Thread Nick Shanin (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18122103#comment-18122103
 ] 

Nick Shanin commented on SOLR-13202:


🤖 AI text below 🤖 (posted on behalf of Nick Shanin)

I opened a PR for this: https://github.com/apache/solr/pull/5012

JoinQParserPlugin and ScoreJoinQParserPlugin now return a 400 naming the 
missing parameter when a join query omits the required from or to parameter, 
instead of failing with a 500. TestJoin covers missing from and missing to 
across the default, dvWithScore and topLevelDV methods.

> Three NullPointerExceptions in org.apache.solr.search.JoinQuery.hashCode()
> --
>
> Key: SOLR-13202
> URL: https://issues.apache.org/jira/browse/SOLR-13202
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 9.0
> Environment: h1. Steps to reproduce
> * Use a Linux machine.
> *  Build commit {{ea2c8ba}} of Solr as described in the section below.
> * Build the films collection as described below.
> * Start the server using the command {{./bin/solr start -f -p 8983 -s 
> /tmp/home}}
> * Request the URL given in the bug description.
> h1. Compiling the server
> {noformat}
> git clone https://github.com/apache/lucene-solr
> cd lucene-solr
> git checkout ea2c8ba
> ant compile
> cd solr
> ant server
> {noformat}
> h1. Building the collection
> We followed [Exercise 
> 2|http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html#exercise-2] from 
> the [Solr 
> Tutorial|http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html]. The 
> attached file ({{home.zip}}) gives the contents of folder {{/tmp/home}} that 
> you will obtain by following the steps below:
> {noformat}
> mkdir -p /tmp/home
> echo '' > 
> /tmp/home/solr.xml
> {noformat}
> In one terminal start a Solr instance in foreground:
> {noformat}
> ./bin/solr start -f -p 8983 -s /tmp/home
> {noformat}
> In another terminal, create a collection of movies, with no shards and no 
> replication, and initialize it:
> {noformat}
> bin/solr create -c films
> curl -X POST -H 'Content-type:application/json' --data-binary '{"add-field": 
> {"name":"name", "type":"text_general", "multiValued":false, "stored":true}}' 
> http://localhost:8983/solr/films/schema
> curl -X POST -H 'Content-type:application/json' --data-binary 
> '{"add-copy-field" : {"source":"*","dest":"_text_"}}' 
> http://localhost:8983/solr/films/schema
> ./bin/post -c films example/films/films.json
> {noformat}
>Reporter: Cesar Rodriguez
>Priority: Major
>  Labels: diffblue, newdev, pull-request-available
> Attachments: SOLR-13202.patch, home.zip
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Requesting any of the following URLs causes Solr to return an HTTP 500 error 
> response:
> {noformat}
> http://localhost:8983/solr/films/select?fq={!join%20from=b%20to=a}
> http://localhost:8983/solr/films/select?fq={!join%20to=a}
> http://localhost:8983/solr/films/select?fq={!join}
> {noformat}
> The error response seems to be caused by the following uncaught exception:
>  {noformat}
> java.lang.NullPointerException
>  at org.apache.solr.search.JoinQuery.hashCode(JoinQParserPlugin.java:578)
>  at org.apache.solr.search.QueryResultKey.(QueryResultKey.java:52)
>  at 
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1328)
>  at 
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:567)
>  at 
> org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1434)
>  at 
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:373)
>  at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:298)
>  at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
>  at org.apache.solr.core.SolrCore.execute(SolrCore.java:2559)
> [...]
> {noformat}
> The problem seems to be related with method {{hasCode}} in the class 
> {{org.apache.solr.search.JoinQuery}}:
> {code:java}
>   @Override
>   public int hashCode() {
> int h = classHash();
> h = h * 31 + fromField.hashCode();
> h = h * 31 + toField.hashCode();
> h = h * 31 + q.hashCode();
> h = h * 31 + Objects.hashCode(fromIndex);
> h = h * 31 + (int) fromCoreOpenTime;
> return h;
>   }
> {code}
> The URLs provided above selectively leave uninitialized the fields 
> {{fromField}}, {{fromIndex}}, {{q}}, and {{toField}}, but all of these fields 
> are accessed by this method.
>  
> We found this issue and ~70 more like this using [Diffblue Microservices 
> Testing|https://www.diffblue.com/labs/?utm_source=solr-br]. Find more 
> information on this [fuzz testing 
>