That's because I changed the method call to include a "null" argument that it didn't have before.
If all the versions are right I think that is all we need to do. FWIW, the change does require JDK 11 and if you don't have your JAVA_HOME set up to point to that it won't build correctly now. On Tue, Jun 6, 2023 at 6:42 PM Mingchun Zhao <mingchun.zha...@gmail.com> wrote: > Hi Karl, > > Thanks for your reply! > > I pulled the latest trunk and confirmed the jetty.version within build.xml > and pom.xml was already updated to "9.4.48.v20220622". > > And then, I tried the build command: > > *ant clean clean-deps clean-core-deps make-core-deps make-deps build* > > with different combinations of jdk and ant versions and got different > results. > However, the build error below as you pointed out in your previous mail did > not occur. > > *incompatible types: HttpClientTransport cannot be converted to > SslContextFactory* > > ## jdk11.0.11 + ant1.10.13 > > == > > > > *BUILD SUCCESSFULTotal time: 1 minute 52 seconds==* > ## jdk11.0.11 + ant1.8.2 > > == > *BUILD FAILED* > */Users/zhaomingchun/mcf/manifoldcf/build.xml:294: The following error > occurred while executing this line:* > */Users/zhaomingchun/mcf/manifoldcf/framework/build.xml:283: Error starting > Sun's native2ascii:* > *Total time: 5 seconds* > == > > ## jdk1.8.0_292 + ant1.8.2(Also ant1.10.13) > *==* > *compile-connector:* > * [javac] Compiling 17 source files to > /Users/zhaomingchun/mcf/manifoldcf/connectors/solr/build/connector/classes* > * [javac] > > /Users/zhaomingchun/mcf/manifoldcf/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/ModifiedHttp2SolrClient.java:3: > error: cannot access Utils* > * [javac] import static > org.apache.solr.common.util.Utils.getObjectByPath;* > * [javac] ^* > * [javac] bad class file: > > /Users/zhaomingchun/mcf/manifoldcf/lib/solr-solrj-9.1.0.jar(org/apache/solr/common/util/Utils.class)* > * [javac] class file has wrong version 55.0, should be 52.0* > * [javac] Please remove or make sure it appears in the correct > subdirectory of the classpath.* > > *BUILD FAILED* > */Users/zhaomingchun/mcf/manifoldcf/build.xml:487: The following error > occurred while executing this line:* > */Users/zhaomingchun/mcf/manifoldcf/build.xml:469: The following error > occurred while executing this line:* > */Users/zhaomingchun/mcf/manifoldcf/dist/connector-build.xml:686: Compile > failed; see the compiler error output for details.* > > *Total time: 5 minutes 27 seconds* > == > > Could you please tell me which java and ant version you are using? > > Regards, > Mingchun > > > 2023年6月7日(水) 6:10 Karl Wright <daddy...@gmail.com>: > > > Interestingly I updated trunk by merging the branch, so I would have > > expected the Jetty update to have happened properly. You may want to > check > > why it didn't. > > > > Karl > > > > > > On Tue, Jun 6, 2023 at 4:29 PM Mingchun Zhao <mingchun.zha...@gmail.com> > > wrote: > > > > > Hi Karl, > > > > > > Thanks for your email. About this compile error, I think there are two > > > ways to fix it. > > > > > > 1. Change jetty.version within build.xml and pom.xml to > > > 9.4.48.v20220622 same as CONNECTORS-1740 branch: > > > > > > build.xml > > > - <property name="jetty.version" value="9.4.25.v20191220"/> > > > + <property name="jetty.version" value="9.4.48.v20220622"/> > > > > > > pom.xml > > > - <jetty.version>9.4.25.v20191220</jetty.version> > > > + <jetty.version>9.4.48.v20220622</jetty.version> > > > > > > 2. Change the parameters of the HttpClient function within > > > ModifiedHttp2SolrClient.java as below: > > > > > > - httpClient = sslEnabled ? new HttpClient(transport, > > > sslContextFactory) : new HttpClient(transport); > > > + httpClient = sslEnabled ? new HttpClient(transport, > > > sslContextFactory) : new HttpClient(transport, null); > > > > > > The reason for this fix is that the constructor > > > HttpClient(HttpClientTransport) does not exist in older jetty.version > > > like 9.4.25.v20191220, so it seems that trying to use the constructor > > > HttpClient(SslContextFactory) caused a conversion error. > > > > > > > > > > > > https://www.javadoc.io/doc/org.eclipse.jetty/jetty-project/9.4.25.v20191220/org/eclipse/jetty/client/HttpClient.html#%3Cinit%3E(org.eclipse.jetty.client.HttpClientTransport,org.eclipse.jetty.util.ssl.SslContextFactory) > > > > > > Best Regards, > > > Mingchun > > > > > > 2023年6月6日(火) 10:03 Karl Wright <daddy...@gmail.com>: > > > > > > > > Hi Mingchun, > > > > > > > > The previous work done on this branch is almost complete but there is > > > still > > > > a build error I get: > > > > > > > > [javac] > > > > > > > > > > C:\wip\mcf\trunk\connectors\solr\connector\src\main\java\org\apache\manifoldcf\agents\output\solr\ModifiedHttp2SolrClient.java:200: > > > > error: incompatible types: HttpClientTransport cannot be converted to > > > > SslContextFactory > > > > [javac] httpClient = sslEnabled ? new HttpClient(transport, > > > > sslContextFactory) : new HttpClient(transport); > > > > [javac] > > > > ^ > > > > > > > > This didn't show up until I merged the branch onto trunk. I haven't > > yet > > > > committed it because it doesn't quite build. Any idea how to resolve > > > this? > > > > > > > > Karl > > > > > >