i have coded a simple code to connect solr from AEM server with https but it gives me following error which i cannot understand my pom.xml
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<scope>provided</scope>
<version>9.1.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<scope>provided</scope>
<version>9.4.19.v20190610</version>
</dependency>
<!-- Needed for the SSLContextFactory$Client class -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>provided</scope>
<version>9.4.19.v20190610</version>
</dependency>
this is the code that implemented to index to solr
public boolean indexPageToSolr(JsonObject indexPageData, SolrClient server) throws
SolrServerException,
IOException {
if (null != indexPageData) {
String urlString = "https://connecttosolr.com/solr/mycollection";
Http2SolrClient solr = new Http2SolrClient.Builder(urlString).build();
solr.setParser(new XMLResponseParser());
SolrInputDocument doc = createPageSolrDoc(indexPageData);
try{
solr.add(doc);
}
catch(Exception e){
logger.info("******* error in add :********" + e.toString());
}
solr.commit();
return true;
}
return false;
}
error im getting is below
indexto Solr Stacktrace [java.base/java.util.Objects.requireNonNull(Objects.java:246), org.eclipse.jetty.io.ssl.SslClientConnectionFactory.<init>(SslClientConnectionFactory.java:57), org.eclipse.jetty.client.HttpClient.newSslClientConnectionFactory(HttpClient.java:1208), org.eclipse.jetty.client.HttpClient.newSslClientConnectionFactory(HttpClient.java:1214), org.eclipse.jetty.client.HttpDestination.newSslClientConnectionFactory(HttpDestination.java:148), org.eclipse.jetty.client.HttpDestination.newSslClientConnectionFactory(HttpDestination.java:154), org.eclipse.jetty.client.HttpDestination.<init>(HttpDestination.java:94), org.eclipse.jetty.client.MultiplexHttpDestination.<init>(MultiplexHttpDestination.java:25), org.eclipse.jetty.http2.client.http.HttpDestinationOverHTTP2.<init>(HttpDestinationOverHTTP2.java:32), org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2.newHttpDestination(HttpClientTransportOverHTTP2.java:128), org.eclipse.jetty.client.HttpClient.lambda$resolveDestination$0(HttpClient.java:575), java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705), org.eclipse.jetty.client.HttpClient.resolveDestination(HttpClient.java:573), org.eclipse.jetty.client.HttpClient.resolveDestination(HttpClient.java:551), org.eclipse.jetty.client.HttpClient.send(HttpClient.java:599), org.eclipse.jetty.client.HttpRequest.sendAsync(HttpRequest.java:778), org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:765), org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:455), org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:234), org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:166), org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:131), org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:147), com.mypackage.subpackage.core.model.search.solr.services.impl.SolrServiceImpl.indexPageToSolr(SolrServiceImpl.java:432), com.mypackage.subpackage.core.model.search.solr.services.impl.SolrServiceImpl.index(SolrServiceImpl.java:203), com.mypackage.subpackage.core.model.search.solr.services.impl.SolrServiceImpl.updateSolrIndex(SolrServiceImpl.java:112), com.mypackage.subpackage.core.model.search.solr.eventhandler.SolrEventHandler.handleEvent(SolrEventHandler.java:54), org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415), org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82), org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104), org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166), java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515), java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264), java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128), java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628), java.base/java.lang.Thread.run(Thread.java:834)]
18.07.2023 18:41:39.748 *ERROR* [EventAdminAsyncThread #9] com.myproject.subcat.core.model.search.solr.services.impl.SolrServiceImpl Error indexing /content/mypage/en/master2/page2 to Solr Missing SslContextFactory
com.myproject.subcat.core.model.search.solr.services.impl.SolrServiceImpl Error indexing /content/mypage/en/master2/page2 to Solr Missing SslContextFactory