Skip to main content

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

Without commenting on your specific problem, I want to point out that the documentation you are referring to is the Jetty 9 documentation, while you are using Jetty 8. So the example may not be suitable.


On Thu, Jun 5, 2014 at 1:57 PM, Wermström Emma (Consultant) <emma.wermstrom@xxxxxxxxxxxxxxxxxxxx> wrote:

Hi,

 

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 http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html. 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" "http://www.eclipse.org/jetty/configure.dtd">

 

<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>

</Configure>

****************************

 

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(XmlConfiguration.java:799)

            at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:390)

            at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:320)

            at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:279)

            at runjettyrun.Bootstrap.main(Bootstrap.java:65)

 

Does anyone know what I’m doing wrong? I read another post on a similar topic (http://dev.eclipse.org/mhonarc/lists/jetty-users/msg00654.html), 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,

 

Emma

 


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top