I am getting a:
he Cause java.lang.NoClassDefFoundError Msg:net/spy/memcached/MemcachedClient
When executing jetty:run -e in eclipse. Why 开发者_如何学运维isn't this dependency being added into the classpath?
Which classpath do you expect it to be added to? If something in your project is trying to load it, ensure you have a project dependency that has that class in it. It looks like it comes from ServiceMix. If you've added something to Jetty itself to make it require that class, then add the dependency to the jetty plugin.
Your code is missing a runtime dependency. I searched Maven Central for the missing class
http://search.maven.org/#search|ga|1|fc%3A%22net.spy.memcached.MemcachedClient%22
Try adding the following to your POM:
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.spymemcached</artifactId>
<version>2.5_2</version>
<packaging>bundle</packaging>
</dependency>
The dependency had a provided scope. Change this.
精彩评论