[
https://issues.apache.org/jira/browse/SOLR-16220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17571435#comment-17571435
]
Eric Pugh commented on SOLR-16220:
----------------------------------
https://search.maven.org/solrsearch/select?q=guice&rows=20&wt=json appears to
work... So does curl
"https://search.maven.org/solrsearch/select?q=fc:org.sonatype.nexus&wt=json"...
Lookinbg a bit more, I don't see a explicit example of the Http2SolrClient
being used...
Would you be interested in submitting a PR to ref guide to add an example about
using this? One neat thing is that we now have the sample code written as
unit tests, that are part of the ref guide, so that would be a great place to
ensure that the examples using the new client work with no hangups...
https://github.com/apache/solr/tree/main/solr/solr-ref-guide/modules/query-guide/examples
is an example...
> Documentation leads to NPE Missing SslContextFactory for SolrJ client
> ---------------------------------------------------------------------
>
> Key: SOLR-16220
> URL: https://issues.apache.org/jira/browse/SOLR-16220
> Project: Solr
> Issue Type: Bug
> Components: SolrJ
> Affects Versions: 9.0
> Environment: JDK used is:
> {noformat}
> openjdk 11.0.14.1 2022-02-08 LTS
> OpenJDK Runtime Environment Zulu11.54+26-SA (build 11.0.14.1+1-LTS)
> OpenJDK 64-Bit Server VM Zulu11.54+26-SA (build 11.0.14.1+1-LTS, mixed
> mode){noformat}
> Reporter: Gunnar Wagenknecht
> Priority: Minor
>
> Following the documentation here:
> [https://solr.apache.org/guide/solr/latest/deployment-guide/solrj.html]
>
> This code leads to an NPE:
> {noformat}
> Http2SolrClient mavenCentralRepo = new
> Http2SolrClient.Builder("https://search.maven.org/solrsearch").build();
> final SolrQuery query = new SolrQuery("fc:" + className);
> query.setRows(20);
> QueryResponse response = mavenCentralRepo.query(query);{noformat}
> NPE:
> {noformat}
> java.lang.NullPointerException: Missing SslContextFactory
> at java.base/java.util.Objects.requireNonNull(Objects.java:246)
> at
> org.eclipse.jetty.io.ssl.SslClientConnectionFactory.<init>(SslClientConnectionFactory.java:57)
> at
> org.eclipse.jetty.client.HttpClient.newSslClientConnectionFactory(HttpClient.java:1208)
> at
> org.eclipse.jetty.client.HttpClient.newSslClientConnectionFactory(HttpClient.java:1214)
> at
> org.eclipse.jetty.client.HttpDestination.newSslClientConnectionFactory(HttpDestination.java:148)
> at
> org.eclipse.jetty.client.HttpDestination.newSslClientConnectionFactory(HttpDestination.java:154)
> at
> org.eclipse.jetty.client.HttpDestination.<init>(HttpDestination.java:94)
> at
> org.eclipse.jetty.client.MultiplexHttpDestination.<init>(MultiplexHttpDestination.java:25)
> at
> org.eclipse.jetty.http2.client.http.HttpDestinationOverHTTP2.<init>(HttpDestinationOverHTTP2.java:32)
> at
> org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2.newHttpDestination(HttpClientTransportOverHTTP2.java:128)
> at
> org.eclipse.jetty.client.HttpClient.lambda$resolveDestination$0(HttpClient.java:575)
> at
> java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
> at
> org.eclipse.jetty.client.HttpClient.resolveDestination(HttpClient.java:573)
> at
> org.eclipse.jetty.client.HttpClient.resolveDestination(HttpClient.java:551)
> at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:599)
> at org.eclipse.jetty.client.HttpRequest.sendAsync(HttpRequest.java:778)
> at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:765)
> at
> org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:448)
> at
> org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:217)
> at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:927)
> at
> org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:940){noformat}
> I think there is a bug in Http2SolrClient somewhere. Such URLs should be
> supported out of the box on a Java 11 JDK without requiring users to provide
> system properties or other custom initialization. Otherwise it should be
> documented but I couldn't find anything related to TLS/SSL configuration in
> the doc mentioned above.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]