|
[
Permlink
| « Hide
]
martin added a comment - 14/May/08 08:44 AM
Oops, I mean the error is "NoClassDefFoundError: org/slf4j/LoggerFactory" since it's slf4j-api that isn't visible.
According to Jetty classloading architecture (see http://docs.codehaus.org/display/JETTY/Classloading
org.slf4j.* classes by default are included in so called ServerClasses and are hidden from webapp context classloaders. I think that you have two possibilities: 1. Override default ServerClasses list excluding org.slf4j. from it. After it webapp context classloader will see slf4j classes from parent classloader. or 2. Add slf4j dependencies not only to maven-plugin-jetty, but as dependency at top maven pom <dependencies> level . After it webapp context classloader will see slf4j classes from its own WEB-INF/lib/ directory. Sorry for the false alarm, I didn't know Jetty was hiding certain classes.
Your first suggestion works great, I added this to the plugin configuration and now everything's ok: <configuration> Thanks! |
|||||||||||||||||||||||||||||||||||||||||||||||