|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"> <Arg> <New class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="Descriptor"> <Property name="jetty.home" default="." />/webapps/myapp/WEB-INF/web.xml </Set> <Set name="ResourceBase"> <Property name="jetty.home" default="." />/webapps/myapp </Set> <Set name="ContextPath">/</Set> </New> </Arg> </Call>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(Class.java:2404) at java.lang.Class.getConstructors(Class.java:1476) at org.eclipse.jetty.util.TypeUtil.construct(TypeUtil.java:542)at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:806) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.itemValue(XmlConfiguration.java:1125) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.value(XmlConfiguration.java:1030) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.call(XmlConfiguration.java:721) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:417) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:354)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:262) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1238) 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! TIA... -- John English
Back to the top