eclipse-jetty / eclipse-jetty-plugin

Eclipse Jetty Plugin
https://eclipse-jetty.github.io/
47 stars 29 forks source link

Latest version 5.0.0 cannot work with eclipse 2019-12 (4.14.0) #50

Open vincentcn opened 4 years ago

vincentcn commented 4 years ago

I saw https://github.com/eclipse-jetty/eclipse-jetty-plugin/issues/45. Not sure whether this plugin is still been maintained. @froque @derkoe

I tried the latest version of this plugin(5.0.0) with Eclipse 2019-12 (4.14.0) and the jetty server cannot start successfully with following error:

2020-01-08 18:11:03.082:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@77b52d12{/,file:///Users/xuevincent/Dev/Sources/neocore-dc2-groovy/target/max/,UNAVAILABLE}{/Users/xuevincent/Dev/Sources/neocore-dc2-groovy/target/max}
java.lang.NoClassDefFoundError: org/eclipse/jetty/plus/annotation/LifeCycleCallback
at org.eclipse.jetty.annotations.AnnotationDecorator.registerHandlers(AnnotationDecorator.java:41)
at org.eclipse.jetty.annotations.AnnotationDecorator.<init>(AnnotationDecorator.java:33)
at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:328)
at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:498)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1404)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:822)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:100)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at net.sourceforge.eclipsejetty.starter.jetty9.Jetty9Adapter.start(Jetty9Adapter.java:68)
at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.launch(AbstractJettyLauncherMain.java:84)
at net.sourceforge.eclipsejetty.starter.jetty9.Jetty9LauncherMain.main(Jetty9LauncherMain.java:42)
Caused by:
java.lang.ClassNotFoundException: org.eclipse.jetty.plus.annotation.LifeCycleCallback

Versions:

Eclipse version: 2019-12 (4.14.0)  (Eclipse 2019-09 cannot work either )
Eclipse Build id: 20191212-1212
Eclipse Jetty Integration version: 5.0.0
Jetty version: 9.4.11.v20180605

Downgrade it to version 4.0.0 can be a workaround. But version 5.0.0 is the only installation option in both Eclipse Marketplace and http://eclipse-jetty.github.io/update/. I have to uninstall version 5.0.0 and manually copy version 4.0.0 artifacts from other laptop to unblock it.

derkoe commented 4 years ago

Just tried this with a clean install of the current version 5.0.0 in Eclipse 2019-12 and it works as expected.

Created a Maven Project with File -> New -> Maven and then selecting the maven-archetype-webapp.

Then create a Eclipse Jetty launch configuration with all defaults for the project and the app launches as expected.

derkoe commented 4 years ago

Just tried it with an external Jetty 9.4.x and I get your error. When checking "Enable JNDI support" on the "Options" tab the server starts without any problems.

Seems like #47 does not work - fixes welcome. Oh and maintainers also welcome - best would be a regular user.

lildesert commented 4 years ago

Hi, just wanted to report that I experienced the same issue. As a workaround I downloaded the 4.0.0 (https://github.com/eclipse-jetty/eclipse-jetty-plugin/releases/tag/4.0.0) and installed it manually in Eclipse.