[ https://issues.apache.org/jira/browse/SOLR-16220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gunnar Wagenknecht updated SOLR-16220: -------------------------------------- Description: 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 uses 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. was: 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 uses 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. > 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 > Security Level: Public(Default Security Level. Issues are Public) > 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 uses 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.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org