0

When adding the --https module to the start.ini file for jetty, I receive the following "noconstructorclass" error and geoserver fails to startup. This is an out of the box geo server 2.16.0 install on linux.

Geoserver comes with jetty.version = 9.4.18.v20190429

Upon startup on geoserver utilizing jetty, I get the following error:

/usr/lib/jvm/jre-1.8.0/bin/java -server -Xms16G -Xmx16G -Xmn2G -XX:       +UseG1GC -DSTOP.PORT=8079 -DSTOP.KEY=geoserver -jar start.jar
2020-04-14 22:12:01.961:WARN:oejx.XmlConfiguration:main:
java.lang.IllegalStateException: No constructor class.   org.eclipse.jetty.server.ServerConnector([],{}) in file:/opt/software/etc/  jetty-https.xml 
Caused by: java.lang.IllegalStateException: No constructor class org.eclipse.jetty.server.ServerConnector([],{}) in file:/opt/software/etc/jetty-https.xml
Caused by: java.lang.IllegalStateException: No constructor class org.eclipse.jetty.server.ServerConnector([],{}) in file:/opt/software/etc/jetty-https.xml

When I startup jetty --list-config option I see: Jetty Active XMLs:

${jetty.base}/etc/jetty.xml
${jetty.base}/etc/jetty-deploy.xml
${jetty.base}/etc/jetty-http.xml
${jetty.base}/etc/jetty-ssl.xml
${jetty.base}/etc/jetty-ssl-context.xml
${jetty.base}/etc/jetty-https.xml

Other jetty settings are

jetty.base = /opt/software
jetty.base.uri = file:///opt/software
jetty.ssl.port = 8443
jetty.sslContext.keyManagerPassword = MyPassword
jetty.sslContext.keyStorePassword = MyPassword
jetty.sslContext.keyStorePath = etc/keystore
jetty.sslContext.trustStorePassword = MyPassword
jetty.sslContext.trustStorePath = etc/keystore

Everything starts up successful when I disable the --https module but working on getting https working with jetty. Here is the excerpt form the classPath if that is needed as well.

Jetty Server classpath items:

0: (dir) | ${jetty.base}/resources
1: 3.1.0 | ${jetty.base}/lib/javax.servlet-api-3.1.0.jar
2: 3.1.0.M0 | ${jetty.base}/lib/jetty-schemas-3.1.M0.jar
3: 9.4.18.v20190429 | ${jetty.base}/lib/jetty-http-9.4.18.v20190429.jar
4: 9.4.18.v20190429 | ${jetty.base}/lib/jetty-server-9.4.18.v20190429.jar
5: 9.4.18.v20190429 | ${jetty.base}/lib/jetty-xml-9.4.18.v20190429.jar
6: 9.4.18.v20190429 | ${jetty.base}/lib/jetty-util-9.4.18.v20190429.jar
7: 9.4.18.v20190429 | ${jetty.base}/lib/jetty-io-9.4.18.v20190429.jar
8: 9.4.18.v20190429 | ${jetty.base}/lib/jetty-security-9.4.18.v20190429.jar
9: 9.4.18.v20190429 | ${jetty.base}/lib/jetty-servlet-9.4.18.v20190429.jar
10: 9.4.18.v20190429 | ${jetty.base}/lib/jetty-webapp-9.4.18.v20190429.jar
11: 9.4.18.v20190429 | ${jetty.base}/lib/jetty-deploy-9.4.18.v20190429.jar
12: 9.4.18.v20190429 | ${jetty.base}/lib/jetty-servlets-9.4.18.v20190429.jar

It appears it is finding all of the configuration files correctly...yet can't quite see why it is failing when loading that module.

I will try to update the format. Hard on phone.

If I disable the --https module, everything starts up without issues. This is out of the box config so not sure why https would be failing with default options.

5
  • In general, the GeoServer team don't recommend running the jetty version for more than testing purposes. Set up a normal jetty or tomcat and add the war file is the best approach
    – Ian Turton
    Commented Apr 15, 2020 at 9:21
  • 1
    I also believe I found the issue. When they upgraded from I think 2.15 to some point where they upgraded jetty, they left the existing jetty-https and jetty-ssl.xml files in place from the previous install causing issues. Doing more debugging but I think it was a simple as updated those files
    – IT_User
    Commented Apr 15, 2020 at 15:29
  • @ian turton. I just realized who you are. I'll take your word that the embedded instance isnt appropriate. Want me to send an email to the mailing list so your team can update it in the future?
    – IT_User
    Commented Apr 15, 2020 at 15:44
  • That would be cool
    – Ian Turton
    Commented Apr 15, 2020 at 17:03
  • GeoServer could release a prepared ${jetty.base} tarball (no jetty-home, jetty-distro, or Jetty libs present), to make a suitable distro for external Jetty support without tying it to a specific version of Jetty. Commented Apr 21, 2020 at 21:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.