Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Webapp coonector in jetty 9
Webapp coonector in jetty 9 [message #1799342] Wed, 05 December 2018 10:22
malini kennady is currently offline malini kennadyFriend
Messages: 2
Registered: December 2018
Junior Member
I'm using Jetty 9.2.15.v20160210. I wanted to serve different webapps from different ports. I tried the 'Alternative Method' in https://wiki.eclipse.org/Jetty/Howto/WebappPerConnector. It results in
2018-12-05 15:30:07.172:WARN:oejx.XmlConfiguration:main: Config error at <Set name="connectors">|      <Array type="org.eclipse.jetty.server.Connector"><Item>|          <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"><Set name="port">8080</Set><Set name="maxIdleTime">30000</Set><Set name="Acceptors">1</Set><Set name="name">connA</Set></New>|        </Item><Item>|          <New id="connB" class="org.eclipse.jetty.server.nio.SelectChannelConnector"><Set name="port">9090</Set><Set name="maxIdleTime">30000</Set><Set name="Acceptors">1</Set><Set name="name">connB</Set></New>|        </Item></Array>|    </Set> java.lang.ClassNotFoundException: org.eclipse.jetty.server.nio.SelectChannelConnector in file:/D:/Jetty/jetty-distribution-9.2/jetty-distribution-9.2.15.v20160210/etc/jetty.xml
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.jetty.start.Main.invokeMain(Main.java:321)
    at org.eclipse.jetty.start.Main.start(Main.java:817)
    at org.eclipse.jetty.start.Main.main(Main.java:112)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.nio.SelectChannelConnector
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86)
    at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.nodeClass(XmlConfiguration.java:364)
    at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:754)
    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.newArray(XmlConfiguration.java:874)
    at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.itemValue(XmlConfiguration.java:1129)
    at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.value(XmlConfiguration.java:1030)
    at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:457)
    at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:411)
    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:1243)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)
    ... 7 more
Usage: java -jar start.jar [options] [properties] [configs]
       java -jar start.jar --help  # for more information

I found that the above link is for Jetty 7. How to achieve this in Jetty 9? How to use Jetty 9 named connectors?
Previous Topic:Debugging vs setting a breakfront and running a program
Next Topic:Eclipse JGit
Goto Forum:
  


Current Time: Sat Feb 22 07:59:22 GMT 2020

Powered by FUDForum. Page generated in 0.03373 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top