[
https://issues.apache.org/jira/browse/SOLR-17048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17778498#comment-17778498
]
ASF subversion and git services commented on SOLR-17048:
--------------------------------------------------------
Commit 083833e70f3d01aa382547054e2f705c7e5c9588 in solr's branch
refs/heads/branch_9x from Jason Gerlowski
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=083833e70f3 ]
SOLR-17048: Update solrj dep on 'api' module (#2029)
Previously listed as an 'implementation' dependency, this was causing
ClassDefNotFoundExceptions in some client apps that ran afoul of it.
Switching to an 'api' dependency should fix this.
> solr-api dependency sope in solr-solrj is wrong
> -----------------------------------------------
>
> Key: SOLR-17048
> URL: https://issues.apache.org/jira/browse/SOLR-17048
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: clients - java, Gradle
> Affects Versions: 9.4
> Reporter: Thomas Wöckinger
> Priority: Critical
> Labels: easyfix
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The dependency scope of solr-api is currently set to runtime, this leads to
> following NoClassDefFoundError
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/solr/client/api/util/ReflectWritable
> at org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:89)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:48)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at
> org.apache.solr.common.util.SolrJSONWriter.writeObj(SolrJSONWriter.java:52)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at org.apache.solr.common.util.Utils.writeJson(Utils.java:213)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at org.apache.solr.common.util.Utils.writeJson(Utils.java:208)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at
> org.apache.solr.client.solrj.request.json.JsonQueryRequest$1.write(JsonQueryRequest.java:430)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at
> org.apache.solr.client.solrj.impl.Http2SolrClient.makeRequestAndSend(Http2SolrClient.java:723)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at
> org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:529)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at
> org.apache.solr.client.solrj.impl.LBSolrClient.doRequest(LBSolrClient.java:386)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at
> org.apache.solr.client.solrj.impl.LBSolrClient.request(LBSolrClient.java:352)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at
> org.apache.solr.client.solrj.impl.CloudSolrClient.sendRequest(CloudSolrClient.java:1199)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at
> org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:898)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
> at
> org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:826)
> ~[solr-solrj-9.4.0.jar:9.4.0 71e101bb37497f730078d9afe1991b60d10bfe96 -
> stillalex - 2023-10-10 19:10:39]
>
> Workaroud is to overridde the the dependency sope of solr-api in solr-solrj
> to `compile`
> So either the scope is wrong or this code should never be called by solrj.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]