[Geoserver-devel] Missing servlet API in geoserver-2.9-SNAPSHOT-bin.zip?

Startup failure in geoserver-2.9-SNAPSHOT-bin.zip with:
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletResponse

$ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 bin/startup.sh
GEOSERVER_HOME environment variable not found, using current
directory. If not set then running this script from other
directories will not work in the future.
GEOSERVER DATA DIR is /home/ben/tmp/geoserver/geoserver-2.9-SNAPSHOT/data_dir
WARNING: Module not found [ssl]
2016-03-24 12:22:03.943:INFO::main: Logging initialized @251ms
java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.eclipse.jetty.start.Main.invokeMain(Main.java:321)
  at org.eclipse.jetty.start.Main.start(Main.java:817)
  at org.eclipse.jetty.start.Main.main(Main.java:112)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletResponse
  at java.lang.Class.getDeclaredConstructors0(Native Method)
  at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
  at java.lang.Class.getConstructors(Class.java:1651)
  at org.eclipse.jetty.util.TypeUtil.construct(TypeUtil.java:542)
  at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:345)
  at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:262)
  at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1243)
  at java.security.AccessController.doPrivileged(Native Method)
  at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)
  ... 7 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletResponse
  at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  ... 16 more

Usage: java -jar start.jar [options] [properties] [configs]
        java -jar start.jar --help # for more information

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

It looks like a few spots in the code base did not get the Servlet API 3.0.1 upgrade: servlet-api -> javax.servlet-api

This change also broke some assembly descriptor patterns.

This will also cause all the CITE test to fail as Jetty will not start.

I am testing fixes.

On 24/03/16 12:25, Ben Caradoc-Davies wrote:

Startup failure in geoserver-2.9-SNAPSHOT-bin.zip with:
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletResponse

$ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 bin/startup.sh
GEOSERVER_HOME environment variable not found, using current
directory. If not set then running this script from other
directories will not work in the future.
GEOSERVER DATA DIR is
/home/ben/tmp/geoserver/geoserver-2.9-SNAPSHOT/data_dir
WARNING: Module not found [ssl]
2016-03-24 12:22:03.943:INFO::main: Logging initialized @251ms
java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.eclipse.jetty.start.Main.invokeMain(Main.java:321)
  at org.eclipse.jetty.start.Main.start(Main.java:817)
  at org.eclipse.jetty.start.Main.main(Main.java:112)
Caused by: java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServletResponse
  at java.lang.Class.getDeclaredConstructors0(Native Method)
  at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
  at java.lang.Class.getConstructors(Class.java:1651)
  at org.eclipse.jetty.util.TypeUtil.construct(TypeUtil.java:542)
  at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:345)
  at
org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:262)
  at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1243)
  at java.security.AccessController.doPrivileged(Native Method)
  at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)
  ... 7 more
Caused by: java.lang.ClassNotFoundException:
javax.servlet.http.HttpServletResponse
  at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  ... 16 more

Usage: java -jar start.jar [options] [properties] [configs]
         java -jar start.jar --help # for more information

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

Not quite right: what appears to have happened is that, in upgrading our dependencies to javax.servlet-api-3.0.1.jar, we have downgraded jetty to javax.servlet-api-3.1.0.jar. Jetty no like.

This is why the web-app module has a test dependency on 3.1.0. See Justin's comment:
https://github.com/geoserver/geoserver/commit/d5086daf3e3fa112ce7ca01889b4957636e6ad9c

Kind regards,
Ben.

On 24/03/16 12:38, Ben Caradoc-Davies wrote:

It looks like a few spots in the code base did not get the Servlet API
3.0.1 upgrade: servlet-api -> javax.servlet-api

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

Can we update to a newer version of Jetty now?

···

On 23 March 2016 at 17:40, Ben Caradoc-Davies <ben@anonymised.com> wrote:

Not quite right: what appears to have happened is that, in upgrading our
dependencies to javax.servlet-api-3.0.1.jar, we have downgraded jetty to
javax.servlet-api-3.1.0.jar. Jetty no like.

This is why the web-app module has a test dependency on 3.1.0. See
Justin’s comment:
https://github.com/geoserver/geoserver/commit/d5086daf3e3fa112ce7ca01889b4957636e6ad9c

Kind regards,
Ben.

On 24/03/16 12:38, Ben Caradoc-Davies wrote:

It looks like a few spots in the code base did not get the Servlet API
3.0.1 upgrade: servlet-api → javax.servlet-api


Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/>
New Zealand


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Jody Garnett

This seems to fix the problem locally:

Include Jetty-compatible javax.servlet-api jar in geoserver-*-bin.zip
https://github.com/geoserver/geoserver/commit/c73f26854f27b4018a0ed6ef16830f7df8faed68

I will kick the builds.

On 24/03/16 13:40, Ben Caradoc-Davies wrote:

Not quite right: what appears to have happened is that, in upgrading our
dependencies to javax.servlet-api-3.0.1.jar, we have downgraded jetty to
javax.servlet-api-3.1.0.jar. Jetty no like.

This is why the web-app module has a test dependency on 3.1.0. See
Justin's comment:
https://github.com/geoserver/geoserver/commit/d5086daf3e3fa112ce7ca01889b4957636e6ad9c

Kind regards,
Ben.

On 24/03/16 12:38, Ben Caradoc-Davies wrote:

It looks like a few spots in the code base did not get the Servlet API
3.0.1 upgrade: servlet-api -> javax.servlet-api

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

It looks like you have fixed everything Ben - thanks!

···

On 23 March 2016 at 20:49, Ben Caradoc-Davies <ben@anonymised.com> wrote:

This seems to fix the problem locally:

Include Jetty-compatible javax.servlet-api jar in geoserver-*-bin.zip
https://github.com/geoserver/geoserver/commit/c73f26854f27b4018a0ed6ef16830f7df8faed68

I will kick the builds.

On 24/03/16 13:40, Ben Caradoc-Davies wrote:

Not quite right: what appears to have happened is that, in upgrading our
dependencies to javax.servlet-api-3.0.1.jar, we have downgraded jetty to
javax.servlet-api-3.1.0.jar. Jetty no like.

This is why the web-app module has a test dependency on 3.1.0. See
Justin’s comment:
https://github.com/geoserver/geoserver/commit/d5086daf3e3fa112ce7ca01889b4957636e6ad9c

Kind regards,
Ben.

On 24/03/16 12:38, Ben Caradoc-Davies wrote:

It looks like a few spots in the code base did not get the Servlet API
3.0.1 upgrade: servlet-api → javax.servlet-api


Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/>
New Zealand


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Jody Garnett