archlinux - Jetty can't find web application file -
i've installed jetty using pkgbuild
aur. configuration left default.
note: since makepkg
unable download jetty v.9.3.2 offical site, downloaded maven repository
the problem when try deploy web application using jetty deployable descriptor xml file, jetty fails find war following exception:
2016-01-27 17:05:30.265:warn:oejw.webinfconfiguration:main: web application not found /home/pmitrofanov/sample.war 2016-01-27 17:05:30.265:warn:oejw.webappcontext:main: failed startup of context o.e.j.w.webappcontext@1efbd816{/sample,null,null}{/home/pmitrofanov/sample.war} java.io.filenotfoundexception: /home/pmitrofanov/sample.war @ org.eclipse.jetty.webapp.webinfconfiguration.unpack(webinfconfiguration.java:495) @ org.eclipse.jetty.webapp.webinfconfiguration.preconfigure(webinfconfiguration.java:72) @ org.eclipse.jetty.webapp.webappcontext.preconfigure(webappcontext.java:474) @ org.eclipse.jetty.webapp.webappcontext.dostart(webappcontext.java:510) @ org.eclipse.jetty.util.component.abstractlifecycle.start(abstractlifecycle.java:68) @ org.eclipse.jetty.deploy.bindings.standardstarter.processbinding(standardstarter.java:41) @ org.eclipse.jetty.deploy.applifecycle.runbindings(applifecycle.java:188) @ org.eclipse.jetty.deploy.deploymentmanager.requestappgoal(deploymentmanager.java:499) @ org.eclipse.jetty.deploy.deploymentmanager.addapp(deploymentmanager.java:147) @ org.eclipse.jetty.deploy.providers.scanningappprovider.fileadded(scanningappprovider.java:180) @ org.eclipse.jetty.deploy.providers.webappprovider.fileadded(webappprovider.java:459) @ org.eclipse.jetty.deploy.providers.scanningappprovider$1.fileadded(scanningappprovider.java:64) @ org.eclipse.jetty.util.scanner.reportaddition(scanner.java:610) @ org.eclipse.jetty.util.scanner.reportdifferences(scanner.java:529) @ org.eclipse.jetty.util.scanner.scan(scanner.java:392) @ org.eclipse.jetty.util.scanner.dostart(scanner.java:313) @ org.eclipse.jetty.util.component.abstractlifecycle.start(abstractlifecycle.java:68) @ org.eclipse.jetty.deploy.providers.scanningappprovider.dostart(scanningappprovider.java:150) @ org.eclipse.jetty.util.component.abstractlifecycle.start(abstractlifecycle.java:68) @ org.eclipse.jetty.deploy.deploymentmanager.startappprovider(deploymentmanager.java:561) @ org.eclipse.jetty.deploy.deploymentmanager.dostart(deploymentmanager.java:236) @ org.eclipse.jetty.util.component.abstractlifecycle.start(abstractlifecycle.java:68) @ org.eclipse.jetty.util.component.containerlifecycle.start(containerlifecycle.java:132) @ org.eclipse.jetty.server.server.start(server.java:405) @ org.eclipse.jetty.util.component.containerlifecycle.dostart(containerlifecycle.java:114) @ org.eclipse.jetty.server.handler.abstracthandler.dostart(abstracthandler.java:61) @ org.eclipse.jetty.server.server.dostart(server.java:372) @ org.eclipse.jetty.util.component.abstractlifecycle.start(abstractlifecycle.java:68) @ org.eclipse.jetty.xml.xmlconfiguration$1.run(xmlconfiguration.java:1510) @ java.security.accesscontroller.doprivileged(native method) @ org.eclipse.jetty.xml.xmlconfiguration.main(xmlconfiguration.java:1435) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:498) @ org.eclipse.jetty.start.main.invokemain(main.java:214) @ org.eclipse.jetty.start.main.start(main.java:457) @ org.eclipse.jetty.start.main.main(main.java:75)
here contents of xml:
<?xml version="1.0" encoding="iso-8859-1"?> <!doctype configure public "-//jetty//configure//en" "http://www.eclipse.org/jetty/configure.dtd"> <configure class="org.eclipse.jetty.webapp.webappcontext"> <set name="contextpath">/sample</set> <set name="war">/home/pmitrofanov/sample.war</set> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- max form size --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <set name="maxformcontentsize">5000000</set> </configure>
it should mentioned that:
- when manually put war webapps directory instead of using xml, goes fine.
- all users have rwx access war:
-rwxrwxrwx 1 pmitrofanov pmitrofanov 25104375 jan 27 16:37 /home/pmitrofanov/sample.war
a few things point out...
- the jetty xml format , syntax has changed jetty 9.3 has a new dtd (highly encouraged use it)
- jetty 8 eol (end of life)
- as of servlet 3.x, if doing file uploads via post, better use
@multipartconfig
or<multipart-config>
define locations, sizes, limits, etc. (notwebappcontext
settings) - as of jetty 9, if working large request headers (hinted @ 5,000,000 byte max form content setting) you'll need aware of connector's
httpconfiguration
limits request header sizes more severelywebappcontext
settings. - in example,
${jetty.base}/webapps/sample.xml
on startup war file, if cannot find it not deploy. (you using${jetty.base}
jetty 9, right? shouldn't modifying/adding/deleting files in jetty distribution, ever) - merely replacing war not redeploy war file. you'll have touch
${jetty.base}/webappps/sample.xml
trigger redeploy. - there no provision monitoring resources referenced in xml, content in
${jetty.base}/webapps/
Comments
Post a Comment