| Summary: | org.eclipse.equinox.http.jetty overrides org.slf4j.LoggerFactory causing NoSuchMethodError | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Bastian Knerr <bastian.knerr> |
| Component: | Components | Assignee: | equinox.components-inbox <equinox.components-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | digulla, simon_kaegi |
| Version: | 3.6.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Bastian Knerr
Hi Bastian, The two SLF4J classes packaged with the Jetty server bundle that you mention are not meant to be exported and are really an internal detail meant to handle console logging when running in the Eclipse IDE. This binding is used as a last resort and if there is a version of SLF4J exported by another bundle the Jetty bundle will you it in preference to its internal copy. If your application is not using OSGi then you have to take control to ensure the class-path is created correctly and the JAR containing the SLF4J packages must appear "before" the Jetty JAR file. Your two workarounds are reasonable and although I admit what's going on here is a bit obscure what we're doing with SLF4J in this case is the trade-off we meant. I'm going to mark WORKSFORME however that's not to say it's all perfectly elegant and when we update to the new version of Jetty in the current release cycle we'll see if we can find a way to avoid packaging an internal copy of the SLFJ Logger. I've stumbled over this today when I checked my classpath with maven-duplicate-finder-plugin. Can you please move these two files to a new bundle and import it as an optional dependency? |