lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Rowe <sar...@gmail.com>
Subject Re: [help!] java.lang.NoSuchMethodError: org.apache.solr.client.solrj.request.schema.SchemaRequest
Date Fri, 24 Aug 2018 23:50:32 GMT
Hi,

SchemaRequestJSONWriter class was removed in SOLR-12455[1], but this change has not been released
yet (will be released with Solr 7.5).  I’m guessing you’re using code built against branch_7x
or master?  If so, then one solution is to build against the released source for any 7.x version.

[1] https://issues.apache.org/jira/browse/SOLR-12455

--
Steve
www.lucidworks.com

> On Aug 24, 2018, at 6:47 PM, yx zhou <zhouyuanxi@gmail.com> wrote:
> 
> Got the following errow when i try to delete a field with Schema API,  on
> Solr 7.0.1,  cloud model
> 
> java.lang.NoSuchMethodError:
> org.apache.solr.client.solrj.request.schema.SchemaRequest$SchemaRequestJSONWriter.writeString(Ljava/lang/String;)V
> 
> at
> org.apache.solr.client.solrj.request.schema.SchemaRequest$SchemaRequestJSONWriter.write(SchemaRequest.java:824)
> at
> org.apache.solr.client.solrj.request.schema.SchemaRequest$Update.getContentStreams(SchemaRequest.java:711)
> at
> org.apache.solr.client.solrj.request.RequestWriter.getContentStreams(RequestWriter.java:51)
> at
> org.apache.solr.client.solrj.impl.BinaryRequestWriter.getContentStreams(BinaryRequestWriter.java:53)
> at
> org.apache.solr.client.solrj.impl.HttpSolrClient.createMethod(HttpSolrClient.java:330)
> at
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:251)
> at
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:242)
> at
> org.apache.solr.client.solrj.impl.LBHttpSolrClient.doRequest(LBHttpSolrClient.java:483)
> at
> org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:413)
> at
> org.apache.solr.client.solrj.impl.CloudSolrClient.sendRequest(CloudSolrClient.java:1121)
> at
> org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:862)
> at
> org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:793)
> at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:178)
> at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:195)
> at org.janusgraph.diskstorage.solr.SolrUtil.deleteField(SolrUtil.java:286)
> at org.janusgraph.diskstorage.solr.SolrUtil.fieldsSync(SolrUtil.java:249)
> 
> My code is
> 
> public static void deleteField(CloudSolrClient client, String
> collection, String fieldName)
>    throws IOException, SolrServerException {
>    SchemaRequest.DeleteField deleteFieldRequest = new
> SchemaRequest.DeleteField(fieldName);
> 
>    client.setDefaultCollection(collection);
>    SchemaResponse.UpdateResponse deleteFieldResponse =
> deleteFieldRequest.process(client);
> }


Mime
View raw message