On Fri, 25 Aug 2023 at 22:57, Maxim Solodovnik <[email protected]> wrote: > > On Fri, 25 Aug 2023 at 22:20, Dr. Janko Jochimsen > <[email protected]> wrote: > > > > Hi, > > > > I am new to Wicket but have some experience with Java and Tapestry. > > Installing the quickstarts I have run into some problems that make me > > wonder how many people are starting with this platform as of 2023? > > > > First the facts: > > I installed the default quickstart 9.14.0 from the > > https://wicket.apache.org/start/quickstart.html as well as the 10.0.0.M1 > > directly via eclipse both into a completely fresh eclipse Version: 2023-06 > > (4.28.0) running under Java 17.0.8.7 from Openlogic. In both versions I > > have got problem 1. and 2. Problem 3. is exclusive on 10.0.0-M1 but this is > > due to the enforcement of Java 17 in Version 10. > > > > Now the problems: > > 1.) There is a simple problem with the keystore > > > > In Line 46 of the Start.java the keystore (keystore.p12) is supposed to be > > read. However in the path "\src\test\resources" you will find only a file > > keystore (without the .p12 suffix). That can not work and therefore the > > switch to https breaks if that file is not renamed. After renaming the > > keystore file it worked and I can change to https (at least in 9.14.0 under > > Java 11. > > Just tried these steps: > > 1) generate project: `mvn > org.apache.maven.plugins:maven-archetype-plugin:2.4:generate > -DarchetypeGroupId=org.apache.wicket > -DarchetypeArtifactId=wicket-archetype-quickstart > -DarchetypeVersion=9.15.0-SNAPSHOT -DgroupId=org.apache.solomax > -DartifactId=test1 > -DarchetypeRepository=https://repository.apache.org/content/repositories/snapshots/ > -DinteractiveMode=false` > > 2) `cd test1` > > 3) `mvn jetty:run` > > 4) In browser open https://localhost:8443/ > > certificate is invalid (expected) > The page was displayed, no errors in console > > wicket 9.15.0-SNAPSHOT (build locally from sources) > Ubuntu 22.04 > Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8) > Maven home: /opt/maven > Java version: 17.0.8, vendor: Private Build, runtime: > /usr/lib/jvm/java-17-openjdk-amd64 > Default locale: en_US, platform encoding: UTF-8 > OS name: "linux", version: "5.15.0-79-generic", arch: "amd64", family: "unix" > > Tried with 9.14 (official) > > Same result > > What am I doing wrong?
Got it :) `mvn jetty:run` works as expected :) Debugging Start.java doesn't :) I'll fix it :) > > > > > > 2.) > > In the path "\src\test\jetty" are four xml definition file how all get a > > > > Referenced file contains errors > > (http://www.eclipse.org/jetty/configure_9_0.dtd). > > > > error. > > > > I didn't managed to switch this off but it seems to be irrelevant at least > > for the development system > > > > > > 3.) > > > > It looks as if the usage of org.eclipse.jetty.util.ssl.SslContextFactory is > > outdated and for Java 17 broken. > > > > a.) > > In Line 58 of the Start.java a SslContextFactory is created by this command: > > > > SslContextFactory sslContextFactory = new SslContextFactory(); > > > > This call is deprecated in Java 11 and causes an error in Java 17. It > > should read: > > > > SslContextFactory sslContextFactory = new SslContextFactory.Server(); > > > > > > b.) > > > > A little bit more complicated is the problem in line 64 ff > > > > It states: > > ServerConnector https = new ServerConnector(server, new > > SslConnectionFactory( > > sslContextFactory, "http/1.1"), new HttpConnectionFactory(https_config)); > > > > While this is legal in Java 11 but not in Java 17. With 17 you get a > > > > The constructor SslConnectionFactory(SslContextFactory, String) is undefined > > > > error. > > > > You can kind of work around it by making an explicit cast > > > > ServerConnector https = new ServerConnector(server, new > > SslConnectionFactory( > > (org.eclipse.jetty.util.ssl.SslContextFactory.Server) sslContextFactory, > > "http/1.1"), new HttpConnectionFactory(https_config)); > > > > That works for the http side but it will break if you change to https with > > the following error. > > > > [qtp2009787198-27] WARN org.eclipse.jetty.server.HttpChannel - > > handleException / org.eclipse.jetty.http.BadMessageException: 400: Invalid > > SNI > > > > > > I understand that a lot of the old hands work in their production > > environments and do not have any problems on this level but for a newcomer > > it is a bit disappointing to run into a number of problems as soon as you > > load / create a completely untouched quickstart, > > > > Thanks anyway to keep going with this interesting platform. > > > > > > Best > > > > > > Janko > > > > ________________________ > > This email was scanned by Bitdefender > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > -- > Best regards, > Maxim -- Best regards, Maxim --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
