Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Running More than One Webapp



So, I’m using jetty 8.1.2 v20121308 in eclipse and trying to setup a server running two webapps. The server is launched using run-jetty-run, see picture attached. Run-jetty-run also configures the first webapp. The second webapp is a war-file and I have attempted to create a jetty.xml-file according to the recommendations on I’m not using maven, which is why I’m using jetty.xml to configure the additional webapp instead of the maven pom.xml file.


This is my jetty.xml:



<?xml version="1.0"?>

<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "">


<Ref refid="Contexts">

  <Call name="addHandler">


      <New class="org.eclipse.jetty.webapp.WebAppContext">

        <Set name="contextPath">/OSLC4JRegistry</Set>

        <Set name="war">C:\Users\A051831\GitRepositories\git\org.eclipse.lyo.core\org.eclipse.lyo.oslc4j.registry\target\oslc4j-registry-3.0.0-SNAPSHOT.war</Set>








And this is the error I get when trying to read the jetty.xml:


Loading Jetty.xml:C:\Users\A051831\EclipseWorkplaces\Juno\OslcEatopServiceProvider\jetty.xml

2014-06-05 13:29:39.994:WARN:oejx.XmlConfiguration:Config error at <Ref refid="Contexts"><Call name="addHandler"><Arg>|      <New class="org.eclipse.jetty.webapp.WebAppContext"><Set name="contextPath">/OSLC4JRegistry</Set><Set name="war">C:\Users\A051831\GitRepositories\git\org.eclipse.lyo.core\org.eclipse.lyo.oslc4j.registry\target\oslc4j-registry-3.0.0-SNAPSHOT.war</Set></New>|    </Arg></Call></Ref> java.lang.IllegalStateException: No object for id=null

Exception happened when loading Jetty.xml:

java.lang.IllegalStateException: No object for id=null

            at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.refObj(

            at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(

            at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(

            at org.eclipse.jetty.xml.XmlConfiguration.configure(

            at runjettyrun.Bootstrap.main(


Does anyone know what I’m doing wrong? I read another post on a similar topic (, but it recommends looking at the “normal” jetty.xml file which sets the refid to something other than “Contexts”. However, I don’t know where to locate this configuration file, I only have a web.xml available and as far as I can see this does not define any context.


Thanks for any help!

Best regards,




Back to the top