[jira] Created: (SOLR-2025) SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SOLR-2025) SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List

Prajeeth Emanuel (Jira)
SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
-----------------------------------------------------------------------------------------------------------------------

                 Key: SOLR-2025
                 URL: https://issues.apache.org/jira/browse/SOLR-2025
             Project: Solr
          Issue Type: Bug
          Components: clients - java
    Affects Versions: 1.4.1
            Reporter: Reuben Firmin


org.apache.solr.client.solrj.SolrServerException: Error executing query
        at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
        at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
...
Caused by: java.lang.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
        at org.apache.solr.client.solrj.response.SpellCheckResponse$Suggestion.<init>(SpellCheckResponse.java:107)
        at org.apache.solr.client.solrj.response.SpellCheckResponse.<init>(SpellCheckResponse.java:51)
        at org.apache.solr.client.solrj.response.QueryResponse.extractSpellCheckInfo(QueryResponse.java:125)
        at org.apache.solr.client.solrj.response.QueryResponse.setResponse(QueryResponse.java:115)
        at org.apache.solr.client.solrj.response.QueryResponse.<init>(QueryResponse.java:80)
        at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-2025) SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List

Prajeeth Emanuel (Jira)

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

Reuben Firmin commented on SOLR-2025:
-------------------------------------

This bug was introduced somewhere between 1.4-dev and 1.4.1. When I run our code with 1.4-dev I don't get the exception; with 1.4.1 I do.

> SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2025
>                 URL: https://issues.apache.org/jira/browse/SOLR-2025
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.4.1
>            Reporter: Reuben Firmin
>
> org.apache.solr.client.solrj.SolrServerException: Error executing query
>         at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
>         at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
> ...
> Caused by: java.lang.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
>         at org.apache.solr.client.solrj.response.SpellCheckResponse$Suggestion.<init>(SpellCheckResponse.java:107)
>         at org.apache.solr.client.solrj.response.SpellCheckResponse.<init>(SpellCheckResponse.java:51)
>         at org.apache.solr.client.solrj.response.QueryResponse.extractSpellCheckInfo(QueryResponse.java:125)
>         at org.apache.solr.client.solrj.response.QueryResponse.setResponse(QueryResponse.java:115)
>         at org.apache.solr.client.solrj.response.QueryResponse.<init>(QueryResponse.java:80)
>         at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-2025) SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List

Prajeeth Emanuel (Jira)
In reply to this post by Prajeeth Emanuel (Jira)

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

Reuben Firmin commented on SOLR-2025:
-------------------------------------

RLa asked for more details.

I snipped some lines (indicated by ...) from our code and the webapp container. Unfortunately the "caused by" exception is cut off by log4j/tomcat/something.

Here's everything that leads up to the query (flattened out - this is actually in several classes) - hopefully this will give you a path to the cause.

                        StringBuilder builder = new StringBuilder();

                        if (StringUtils.isEmpty(name)) {
                                builder.append("*:*");
                        } else {

                                if (!fuzzy) {
                                        builder.append("+name:\"");
                                        builder.append(name);
                                        builder.append("\"");
                                } else {
                                        builder.append("name:\"");
                                        builder.append(name);
                                        builder.append("\"");

                                        builder.append(" nameFuzzy:");
                                        builder.append(name);
                                }
                        }

                        if (types.length > 0) {

                                builder.append(" +type:(");

                                builder.append(types[0].name());

                                for (int i = 1; i < types.length; i++) {
                                        builder.append(" or ");
                                        builder.append(types[i].name());
                                }

                                builder.append(")");

                        }

                        SolrQuery query = new SolrQuery();
                        query.setQuery(builder.toString());
                        query.addField("score");
                        query.addSortField("score", SolrQuery.ORDER.desc);

                        CommonsHttpSolrServer server = new CommonsHttpSolrServer(url);
                        server.setAllowCompression(true);

                        QueryResponse rsp = server.query(query);

> SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2025
>                 URL: https://issues.apache.org/jira/browse/SOLR-2025
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.4.1
>            Reporter: Reuben Firmin
>
> org.apache.solr.client.solrj.SolrServerException: Error executing query
>         at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
>         at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
> ...
> Caused by: java.lang.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
>         at org.apache.solr.client.solrj.response.SpellCheckResponse$Suggestion.<init>(SpellCheckResponse.java:107)
>         at org.apache.solr.client.solrj.response.SpellCheckResponse.<init>(SpellCheckResponse.java:51)
>         at org.apache.solr.client.solrj.response.QueryResponse.extractSpellCheckInfo(QueryResponse.java:125)
>         at org.apache.solr.client.solrj.response.QueryResponse.setResponse(QueryResponse.java:115)
>         at org.apache.solr.client.solrj.response.QueryResponse.<init>(QueryResponse.java:80)
>         at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (SOLR-2025) SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List

Prajeeth Emanuel (Jira)
In reply to this post by Prajeeth Emanuel (Jira)

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

Reuben Firmin edited comment on SOLR-2025 at 8/3/10 2:25 PM:
-------------------------------------------------------------

RLa asked for more details.

I snipped some lines (indicated by ...) from our code and the webapp container. Unfortunately the "caused by" exception is cut off by log4j/tomcat/something.

Here's everything that leads up to the query (flattened out - this is actually in several classes) - hopefully this will give you a path to the cause.

{{monospaced}}
                        StringBuilder builder = new StringBuilder();

                        if (StringUtils.isEmpty(name)) {
                                builder.append("*:*");
                        } else {

                                if (!fuzzy) {
                                        builder.append("+name:\"");
                                        builder.append(name);
                                        builder.append("\"");
                                } else {
                                        builder.append("name:\"");
                                        builder.append(name);
                                        builder.append("\"");

                                        builder.append(" nameFuzzy:");
                                        builder.append(name);
                                }
                        }

                        if (types.length > 0) {

                                builder.append(" +type:(");

                                builder.append(types[0].name());

                                for (int i = 1; i < types.length; i++) {
                                        builder.append(" or ");
                                        builder.append(types[i].name());
                                }

                                builder.append(")");

                        }

                        SolrQuery query = new SolrQuery();
                        query.setQuery(builder.toString());
                        query.addField("score");
                        query.addSortField("score", SolrQuery.ORDER.desc);

                        CommonsHttpSolrServer server = new CommonsHttpSolrServer(url);
                        server.setAllowCompression(true);

                        QueryResponse rsp = server.query(query);

{{monospaced}}

      was (Author: reubenfirmin):
    RLa asked for more details.

I snipped some lines (indicated by ...) from our code and the webapp container. Unfortunately the "caused by" exception is cut off by log4j/tomcat/something.

Here's everything that leads up to the query (flattened out - this is actually in several classes) - hopefully this will give you a path to the cause.

                        StringBuilder builder = new StringBuilder();

                        if (StringUtils.isEmpty(name)) {
                                builder.append("*:*");
                        } else {

                                if (!fuzzy) {
                                        builder.append("+name:\"");
                                        builder.append(name);
                                        builder.append("\"");
                                } else {
                                        builder.append("name:\"");
                                        builder.append(name);
                                        builder.append("\"");

                                        builder.append(" nameFuzzy:");
                                        builder.append(name);
                                }
                        }

                        if (types.length > 0) {

                                builder.append(" +type:(");

                                builder.append(types[0].name());

                                for (int i = 1; i < types.length; i++) {
                                        builder.append(" or ");
                                        builder.append(types[i].name());
                                }

                                builder.append(")");

                        }

                        SolrQuery query = new SolrQuery();
                        query.setQuery(builder.toString());
                        query.addField("score");
                        query.addSortField("score", SolrQuery.ORDER.desc);

                        CommonsHttpSolrServer server = new CommonsHttpSolrServer(url);
                        server.setAllowCompression(true);

                        QueryResponse rsp = server.query(query);
 

> SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2025
>                 URL: https://issues.apache.org/jira/browse/SOLR-2025
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.4.1
>            Reporter: Reuben Firmin
>
> org.apache.solr.client.solrj.SolrServerException: Error executing query
>         at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
>         at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
> ...
> Caused by: java.lang.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
>         at org.apache.solr.client.solrj.response.SpellCheckResponse$Suggestion.<init>(SpellCheckResponse.java:107)
>         at org.apache.solr.client.solrj.response.SpellCheckResponse.<init>(SpellCheckResponse.java:51)
>         at org.apache.solr.client.solrj.response.QueryResponse.extractSpellCheckInfo(QueryResponse.java:125)
>         at org.apache.solr.client.solrj.response.QueryResponse.setResponse(QueryResponse.java:115)
>         at org.apache.solr.client.solrj.response.QueryResponse.<init>(QueryResponse.java:80)
>         at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (SOLR-2025) SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List

Prajeeth Emanuel (Jira)
In reply to this post by Prajeeth Emanuel (Jira)

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

Reuben Firmin edited comment on SOLR-2025 at 8/3/10 2:25 PM:
-------------------------------------------------------------

RLa asked for more details.

I snipped some lines (indicated by ...) from our code and the webapp container. Unfortunately the "caused by" exception is cut off by log4j/tomcat/something.

Here's everything that leads up to the query (flattened out - this is actually in several classes) - hopefully this will give you a path to the cause.

{{
                        StringBuilder builder = new StringBuilder();

                        if (StringUtils.isEmpty(name)) {
                                builder.append("*:*");
                        } else {

                                if (!fuzzy) {
                                        builder.append("+name:\"");
                                        builder.append(name);
                                        builder.append("\"");
                                } else {
                                        builder.append("name:\"");
                                        builder.append(name);
                                        builder.append("\"");

                                        builder.append(" nameFuzzy:");
                                        builder.append(name);
                                }
                        }

                        if (types.length > 0) {

                                builder.append(" +type:(");

                                builder.append(types[0].name());

                                for (int i = 1; i < types.length; i++) {
                                        builder.append(" or ");
                                        builder.append(types[i].name());
                                }

                                builder.append(")");

                        }

                        SolrQuery query = new SolrQuery();
                        query.setQuery(builder.toString());
                        query.addField("score");
                        query.addSortField("score", SolrQuery.ORDER.desc);

                        CommonsHttpSolrServer server = new CommonsHttpSolrServer(url);
                        server.setAllowCompression(true);

                        QueryResponse rsp = server.query(query);

}}

      was (Author: reubenfirmin):
    RLa asked for more details.

I snipped some lines (indicated by ...) from our code and the webapp container. Unfortunately the "caused by" exception is cut off by log4j/tomcat/something.

Here's everything that leads up to the query (flattened out - this is actually in several classes) - hopefully this will give you a path to the cause.

{{monospaced}}
                        StringBuilder builder = new StringBuilder();

                        if (StringUtils.isEmpty(name)) {
                                builder.append("*:*");
                        } else {

                                if (!fuzzy) {
                                        builder.append("+name:\"");
                                        builder.append(name);
                                        builder.append("\"");
                                } else {
                                        builder.append("name:\"");
                                        builder.append(name);
                                        builder.append("\"");

                                        builder.append(" nameFuzzy:");
                                        builder.append(name);
                                }
                        }

                        if (types.length > 0) {

                                builder.append(" +type:(");

                                builder.append(types[0].name());

                                for (int i = 1; i < types.length; i++) {
                                        builder.append(" or ");
                                        builder.append(types[i].name());
                                }

                                builder.append(")");

                        }

                        SolrQuery query = new SolrQuery();
                        query.setQuery(builder.toString());
                        query.addField("score");
                        query.addSortField("score", SolrQuery.ORDER.desc);

                        CommonsHttpSolrServer server = new CommonsHttpSolrServer(url);
                        server.setAllowCompression(true);

                        QueryResponse rsp = server.query(query);

{{monospaced}}
 

> SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2025
>                 URL: https://issues.apache.org/jira/browse/SOLR-2025
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.4.1
>            Reporter: Reuben Firmin
>
> org.apache.solr.client.solrj.SolrServerException: Error executing query
>         at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
>         at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
> ...
> Caused by: java.lang.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
>         at org.apache.solr.client.solrj.response.SpellCheckResponse$Suggestion.<init>(SpellCheckResponse.java:107)
>         at org.apache.solr.client.solrj.response.SpellCheckResponse.<init>(SpellCheckResponse.java:51)
>         at org.apache.solr.client.solrj.response.QueryResponse.extractSpellCheckInfo(QueryResponse.java:125)
>         at org.apache.solr.client.solrj.response.QueryResponse.setResponse(QueryResponse.java:115)
>         at org.apache.solr.client.solrj.response.QueryResponse.<init>(QueryResponse.java:80)
>         at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (SOLR-2025) SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List

Prajeeth Emanuel (Jira)
In reply to this post by Prajeeth Emanuel (Jira)

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

Reuben Firmin edited comment on SOLR-2025 at 8/3/10 2:26 PM:
-------------------------------------------------------------

RLa asked for more details.

I snipped some lines (indicated by ...) from our code and the webapp container. Unfortunately the "caused by" exception is cut off by log4j/tomcat/something.

Here's everything that leads up to the query (flattened out - this is actually in several classes) - hopefully this will give you a path to the cause.

{code}
                        StringBuilder builder = new StringBuilder();

                        if (StringUtils.isEmpty(name)) {
                                builder.append("*:*");
                        } else {

                                if (!fuzzy) {
                                        builder.append("+name:\"");
                                        builder.append(name);
                                        builder.append("\"");
                                } else {
                                        builder.append("name:\"");
                                        builder.append(name);
                                        builder.append("\"");

                                        builder.append(" nameFuzzy:");
                                        builder.append(name);
                                }
                        }

                        if (types.length > 0) {

                                builder.append(" +type:(");

                                builder.append(types[0].name());

                                for (int i = 1; i < types.length; i++) {
                                        builder.append(" or ");
                                        builder.append(types[i].name());
                                }

                                builder.append(")");

                        }

                        SolrQuery query = new SolrQuery();
                        query.setQuery(builder.toString());
                        query.addField("score");
                        query.addSortField("score", SolrQuery.ORDER.desc);

                        CommonsHttpSolrServer server = new CommonsHttpSolrServer(url);
                        server.setAllowCompression(true);

                        QueryResponse rsp = server.query(query);

{code}

      was (Author: reubenfirmin):
    RLa asked for more details.

I snipped some lines (indicated by ...) from our code and the webapp container. Unfortunately the "caused by" exception is cut off by log4j/tomcat/something.

Here's everything that leads up to the query (flattened out - this is actually in several classes) - hopefully this will give you a path to the cause.

{{
                        StringBuilder builder = new StringBuilder();

                        if (StringUtils.isEmpty(name)) {
                                builder.append("*:*");
                        } else {

                                if (!fuzzy) {
                                        builder.append("+name:\"");
                                        builder.append(name);
                                        builder.append("\"");
                                } else {
                                        builder.append("name:\"");
                                        builder.append(name);
                                        builder.append("\"");

                                        builder.append(" nameFuzzy:");
                                        builder.append(name);
                                }
                        }

                        if (types.length > 0) {

                                builder.append(" +type:(");

                                builder.append(types[0].name());

                                for (int i = 1; i < types.length; i++) {
                                        builder.append(" or ");
                                        builder.append(types[i].name());
                                }

                                builder.append(")");

                        }

                        SolrQuery query = new SolrQuery();
                        query.setQuery(builder.toString());
                        query.addField("score");
                        query.addSortField("score", SolrQuery.ORDER.desc);

                        CommonsHttpSolrServer server = new CommonsHttpSolrServer(url);
                        server.setAllowCompression(true);

                        QueryResponse rsp = server.query(query);

}}
 

> SpellCheckResponse --.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2025
>                 URL: https://issues.apache.org/jira/browse/SOLR-2025
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.4.1
>            Reporter: Reuben Firmin
>
> org.apache.solr.client.solrj.SolrServerException: Error executing query
>         at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
>         at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
> ...
> Caused by: java.lang.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
>         at org.apache.solr.client.solrj.response.SpellCheckResponse$Suggestion.<init>(SpellCheckResponse.java:107)
>         at org.apache.solr.client.solrj.response.SpellCheckResponse.<init>(SpellCheckResponse.java:51)
>         at org.apache.solr.client.solrj.response.QueryResponse.extractSpellCheckInfo(QueryResponse.java:125)
>         at org.apache.solr.client.solrj.response.QueryResponse.setResponse(QueryResponse.java:115)
>         at org.apache.solr.client.solrj.response.QueryResponse.<init>(QueryResponse.java:80)
>         at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]