0

I loaded my Spring/Maven project in Eclipse (Spring Tools Suite variant), installed Run Jetty Run, and clicked Run Jetty.

PROBLEM: Jetty does not start correctly:

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Running Jetty 9.0.0.M3
ParentLoaderPriority enabled
Enable config class:runjettyrun.webapp.RJRWebInfConfiguration
Enable config class:org.eclipse.jetty.webapp.WebXmlConfiguration
Enable config class:runjettyrun.webapp.RJRMetaInfoConfiguration
Enable config class:org.eclipse.jetty.webapp.FragmentConfiguration
Enable config class:runjettyrun.annotation.RJRAnnotationConfiguration
Enable config class:org.eclipse.jetty.webapp.JettyWebXmlConfiguration
Enable config class:org.eclipse.jetty.webapp.TagLibConfiguration
ProjectClassLoader: entry=/home/nico/src/nemaki/core/target/classes
ProjectClassLoader: entry=/home/nico/.m2/repository/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar
[... many other JAR libraries, none being Jetty ...]
ProjectClassLoader: entry=/home/nico/.m2/repository/jp/aegif/nemakiware/nemakiware-common/2.3.10/nemakiware-common-2.3.10.jar
Excluded entry=/home/nico/src/nemaki/core/target/test-classes 
2016-09-30 17:17:09.780:INFO:oejs.Server:main: jetty-9.0.0.M3
2016-09-30 17:17:12.121:WARN:oejuc.AbstractLifeCycle:main: FAILED o.e.j.w.WebAppContext@694e1548{/core,[file:/home/nico/src/nemaki/core/WebContent/],STARTING}: java.lang.NoSuchMethodError: org.eclipse.jetty.util.MultiMap.add(Ljava/lang/Object;Ljava/lang/Object;)V
java.lang.NoSuchMethodError: org.eclipse.jetty.util.MultiMap.add(Ljava/lang/Object;Ljava/lang/Object;)V
    at org.eclipse.jetty.annotations.ClassInheritanceHandler.handle(ClassInheritanceHandler.java:56)
    at org.eclipse.jetty.annotations.AnnotationParser$MyClassVisitor.visit(AnnotationParser.java:398)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)

QUESTION: How can I fix it?

Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373

2 Answers2

0

You are running an unstable version of Jetty.

Version 9.0.0.M3 is not a stable release (that's an experimental milestone release, a candidate for release, something to help integrators start to evolve their code for the eventual release).

Use a stable release, such as 9.3.12.v20160915 and you'll have a much better experience.

In 9.3.12.v20160915 the MultiMap class can be found in jetty-util-9.3.12.v20160915.jar

Also note, Jetty 9 is servlet 3.1, not 3.0.1 (seen in your output)

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
0

As explained by Joakim, 9.0.0.M3 is an old version of Jetty.

Fortunately, Run Jetty Run has been updated a few weeks ago.
Here is how to use the latest Run Jetty Run:

  • Uninstall from Eclipse any existing version of Run Jetty Run
  • Add this update site: http://xzer.github.io/run-jetty-run-updatesite/nightly/
  • Install from it the required component and the optional component 9.3.6
  • You now have Run Jetty Run using Jetty 9.3.6, which is a year old already but does not trigger the error above. Be sure to select it in Run configurations.
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373