Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Upgrading from 8.1.8 to 9.1.0

On 09/10/2013 17:24, Joakim Erdfelt wrote:
/me takes a deep breath ... :)

Me too... :-)

OK, I've created a "modules" directory, copied a bunch of XML and mod files from the distro (https, jmx, logging, requestlog, server, servlet, ssl, and webapp) and yes, the module system is pretty cute...

However, a few points still elude me. The main problem I have is that my server only hosts a single webapp, which was formerly configured like this in jetty.xml:

  <Call name="setHandler">
      <New class="org.eclipse.jetty.webapp.WebAppContext">
        <Set name="Descriptor">
          <Property name="jetty.home" default="." />/webapps/myapp/WEB-INF/web.xml
        <Set name="ResourceBase">
          <Property name="jetty.home" default="." />/webapps/myapp
        <Set name="ContextPath">/</Set>

I could presumably use the "deploy" module, renaming the webapp directory from "myapp" to "ROOT" and letting it discover it, but I don't want or need hot deployment. Putting the above in jetty.xml doesn't work; this is what I get:

Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/security/SecurityHandler
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(
	at java.lang.Class.getConstructors(
	at org.eclipse.jetty.util.TypeUtil.construct(
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj( at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.itemValue( at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.value( at org.eclipse.jetty.xml.XmlConfiguration$ at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure( at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(
	at org.eclipse.jetty.xml.XmlConfiguration.configure(
	at org.eclipse.jetty.xml.XmlConfiguration$

So I have a server that starts but has no webapp contexts...

I also ended up editing the XML files for the logging as I couldn't figure out how to specify additional logging parameters in start.ini and the documentation doesn't seem to cover this. I've been trying to use the local default timezone (using "getDefault" instead of "getTimeZone" in the XML) but since AsyncNCSARequestLog takes a String instead of a TimeZone, I commented out the LogTimeZone setting in the hope that it would give me local time to avoid hardwiring it into the configuration and having to edit it if the server is deployed in a different time zone. However, since I have got a webapp to make any requests to, I have no idea whether this will work yet!

Sorry to be a bear of very little brain here!

John English

Back to the top