[jira] [Commented] (SOLR-13180) ClassCastExceptions in o.a.s.s.facet.FacetModule for valid JSON inputs that are not objects
[ https://issues.apache.org/jira/browse/SOLR-13180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16932557#comment-16932557 ] Munendra S N commented on SOLR-13180: - [~janhoy] I think the current patch can be committed. Is there anything pending to be done here? > ClassCastExceptions in o.a.s.s.facet.FacetModule for valid JSON inputs that > are not objects > --- > > Key: SOLR-13180 > URL: https://issues.apache.org/jira/browse/SOLR-13180 > Project: Solr > Issue Type: Bug > Components: Facet Module >Affects Versions: 7.5, master (9.0) > Environment: Running on Unix, using a git checkout close to master. > h2. Steps to reproduce > * 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 above. > h2. 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} > h2. Building the collection > We followed Exercise 2 from the quick start tutorial > ([http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html#exercise-2]) - > for reference, I have attached a copy of the database. > {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: > {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: Johannes Kloos >Priority: Minor > Labels: diffblue, newdev > Attachments: SOLR-13180.patch, home.zip > > Time Spent: 0.5h > Remaining Estimate: 0h > > Requesting the following URL gives a 500 error due to a ClassCastException in > o.a.s.s.f.FacetModule: [http://localhost:8983/solr/films/select?json=0] > The error response is caught by an uncaught ClassCastException, with the > stacktrace shown here: > java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Map > at org.apache.solr.search.facet.FacetModule.prepare(FacetModule.java:78) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:272) > > The cause of this bug is similar to #13178: line 78 in FacetModule reads > {{jsonFacet = (Map) json.get("facet")}} > and assumes that the JSON object contained in facet is a JSON object, while > we only guarantee that it is a JSON value. > Line 92 semms to contain another situation like this, but I do not have a > test case handy for this specific case. > This bug was found using [Diffblue Microservices > Testing|http://www.diffblue.com/labs]. Find more information on this [test > campaign|https://www.diffblue.com/blog/2018/12/19/diffblue-microservice-testing-a-sneak-peek-at-our-early-product-and-results]. -- 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
[jira] [Commented] (SOLR-13180) ClassCastExceptions in o.a.s.s.facet.FacetModule for valid JSON inputs that are not objects
[ https://issues.apache.org/jira/browse/SOLR-13180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16935123#comment-16935123 ] Munendra S N commented on SOLR-13180: - [^SOLR-13180.patch] Moved the check to {{ObjectUtil}} with previous patch {{json.limit=5}} would fail instead of succeeding but now, error message won't contain query parameter name > ClassCastExceptions in o.a.s.s.facet.FacetModule for valid JSON inputs that > are not objects > --- > > Key: SOLR-13180 > URL: https://issues.apache.org/jira/browse/SOLR-13180 > Project: Solr > Issue Type: Bug > Components: Facet Module >Affects Versions: 7.5, master (9.0) > Environment: Running on Unix, using a git checkout close to master. > h2. Steps to reproduce > * 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 above. > h2. 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} > h2. Building the collection > We followed Exercise 2 from the quick start tutorial > ([http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html#exercise-2]) - > for reference, I have attached a copy of the database. > {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: > {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: Johannes Kloos >Assignee: Munendra S N >Priority: Minor > Labels: diffblue, newdev > Attachments: SOLR-13180.patch, SOLR-13180.patch, home.zip > > Time Spent: 0.5h > Remaining Estimate: 0h > > Requesting the following URL gives a 500 error due to a ClassCastException in > o.a.s.s.f.FacetModule: [http://localhost:8983/solr/films/select?json=0] > The error response is caught by an uncaught ClassCastException, with the > stacktrace shown here: > java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Map > at org.apache.solr.search.facet.FacetModule.prepare(FacetModule.java:78) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:272) > > The cause of this bug is similar to #13178: line 78 in FacetModule reads > {{jsonFacet = (Map) json.get("facet")}} > and assumes that the JSON object contained in facet is a JSON object, while > we only guarantee that it is a JSON value. > Line 92 semms to contain another situation like this, but I do not have a > test case handy for this specific case. > This bug was found using [Diffblue Microservices > Testing|http://www.diffblue.com/labs]. Find more information on this [test > campaign|https://www.diffblue.com/blog/2018/12/19/diffblue-microservice-testing-a-sneak-peek-at-our-early-product-and-results]. -- 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
[jira] [Commented] (SOLR-13180) ClassCastExceptions in o.a.s.s.facet.FacetModule for valid JSON inputs that are not objects
[ https://issues.apache.org/jira/browse/SOLR-13180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16935191#comment-16935191 ] Lucene/Solr QA commented on SOLR-13180: --- | (/) *{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 10s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 8s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 8s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Release audit (RAT) {color} | {color:green} 1m 8s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Check forbidden APIs {color} | {color:green} 1m 8s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} Validate source patterns {color} | {color:green} 1m 8s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} unit {color} | {color:green} 44m 24s{color} | {color:green} core in the patch passed. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 48m 41s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | SOLR-13180 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12980979/SOLR-13180.patch | | Optional Tests | compile javac unit ratsources checkforbiddenapis validatesourcepatterns | | uname | Linux lucene2-us-west.apache.org 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018 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 / d75f027 | | ant | version: Apache Ant(TM) version 1.9.6 compiled on July 20 2018 | | Default Java | LTS | | Test Results | https://builds.apache.org/job/PreCommit-SOLR-Build/554/testReport/ | | modules | C: solr/core U: solr/core | | Console output | https://builds.apache.org/job/PreCommit-SOLR-Build/554/console | | Powered by | Apache Yetus 0.7.0 http://yetus.apache.org | This message was automatically generated. > ClassCastExceptions in o.a.s.s.facet.FacetModule for valid JSON inputs that > are not objects > --- > > Key: SOLR-13180 > URL: https://issues.apache.org/jira/browse/SOLR-13180 > Project: Solr > Issue Type: Bug > Components: Facet Module >Affects Versions: 7.5, master (9.0) > Environment: Running on Unix, using a git checkout close to master. > h2. Steps to reproduce > * 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 above. > h2. 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} > h2. Building the collection > We followed Exercise 2 from the quick start tutorial > ([http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html#exercise-2]) - > for reference, I have attached a copy of the database. > {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: > {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: Johannes Kloos >Assignee: Munendra S N >Priority: Minor > Labels: diffblue, newdev > Attachments: SOLR-13180.patch, SOLR-13180.patch, home.zip > >
[jira] [Commented] (SOLR-13180) ClassCastExceptions in o.a.s.s.facet.FacetModule for valid JSON inputs that are not objects
[ https://issues.apache.org/jira/browse/SOLR-13180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16939866#comment-16939866 ] ASF subversion and git services commented on SOLR-13180: Commit 7752964e19eeebd085bb89a8db26411f455ae303 in lucene-solr's branch refs/heads/master from Munendra S N [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=7752964 ] SOLR-13180: fix classCastEx in JSON Request API > ClassCastExceptions in o.a.s.s.facet.FacetModule for valid JSON inputs that > are not objects > --- > > Key: SOLR-13180 > URL: https://issues.apache.org/jira/browse/SOLR-13180 > Project: Solr > Issue Type: Bug > Components: Facet Module >Affects Versions: 7.5, master (9.0) > Environment: Running on Unix, using a git checkout close to master. > h2. Steps to reproduce > * 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 above. > h2. 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} > h2. Building the collection > We followed Exercise 2 from the quick start tutorial > ([http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html#exercise-2]) - > for reference, I have attached a copy of the database. > {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: > {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: Johannes Kloos >Assignee: Munendra S N >Priority: Minor > Labels: diffblue, newdev > Attachments: SOLR-13180.patch, SOLR-13180.patch, home.zip > > Time Spent: 0.5h > Remaining Estimate: 0h > > Requesting the following URL gives a 500 error due to a ClassCastException in > o.a.s.s.f.FacetModule: [http://localhost:8983/solr/films/select?json=0] > The error response is caught by an uncaught ClassCastException, with the > stacktrace shown here: > java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Map > at org.apache.solr.search.facet.FacetModule.prepare(FacetModule.java:78) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:272) > > The cause of this bug is similar to #13178: line 78 in FacetModule reads > {{jsonFacet = (Map) json.get("facet")}} > and assumes that the JSON object contained in facet is a JSON object, while > we only guarantee that it is a JSON value. > Line 92 semms to contain another situation like this, but I do not have a > test case handy for this specific case. > This bug was found using [Diffblue Microservices > Testing|http://www.diffblue.com/labs]. Find more information on this [test > campaign|https://www.diffblue.com/blog/2018/12/19/diffblue-microservice-testing-a-sneak-peek-at-our-early-product-and-results]. -- 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
[jira] [Commented] (SOLR-13180) ClassCastExceptions in o.a.s.s.facet.FacetModule for valid JSON inputs that are not objects
[ https://issues.apache.org/jira/browse/SOLR-13180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16939870#comment-16939870 ] ASF subversion and git services commented on SOLR-13180: Commit 9586396dba0094da45c695cb30634d81311491af in lucene-solr's branch refs/heads/branch_8x from Munendra S N [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=9586396 ] SOLR-13180: fix classCastEx in JSON Request API > ClassCastExceptions in o.a.s.s.facet.FacetModule for valid JSON inputs that > are not objects > --- > > Key: SOLR-13180 > URL: https://issues.apache.org/jira/browse/SOLR-13180 > Project: Solr > Issue Type: Bug > Components: Facet Module >Affects Versions: 7.5, master (9.0) > Environment: Running on Unix, using a git checkout close to master. > h2. Steps to reproduce > * 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 above. > h2. 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} > h2. Building the collection > We followed Exercise 2 from the quick start tutorial > ([http://lucene.apache.org/solr/guide/7_5/solr-tutorial.html#exercise-2]) - > for reference, I have attached a copy of the database. > {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: > {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: Johannes Kloos >Assignee: Munendra S N >Priority: Minor > Labels: diffblue, newdev > Attachments: SOLR-13180.patch, SOLR-13180.patch, home.zip > > Time Spent: 0.5h > Remaining Estimate: 0h > > Requesting the following URL gives a 500 error due to a ClassCastException in > o.a.s.s.f.FacetModule: [http://localhost:8983/solr/films/select?json=0] > The error response is caught by an uncaught ClassCastException, with the > stacktrace shown here: > java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Map > at org.apache.solr.search.facet.FacetModule.prepare(FacetModule.java:78) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:272) > > The cause of this bug is similar to #13178: line 78 in FacetModule reads > {{jsonFacet = (Map) json.get("facet")}} > and assumes that the JSON object contained in facet is a JSON object, while > we only guarantee that it is a JSON value. > Line 92 semms to contain another situation like this, but I do not have a > test case handy for this specific case. > This bug was found using [Diffblue Microservices > Testing|http://www.diffblue.com/labs]. Find more information on this [test > campaign|https://www.diffblue.com/blog/2018/12/19/diffblue-microservice-testing-a-sneak-peek-at-our-early-product-and-results]. -- 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