在Jetty中部署webapp的错误

时间:2012-03-15 09:10:09

标签: servlets jetty

我有一个webapp的问题。请你帮我吗? :)

第一个错误:

2012-03-15 09:51:57.023:警告:oejs.ServletHandler:NAME_OF_WEBAPP / NAME_OF_SERVLET错误

此请求来自html页面中包含的表单。 发生此错误后,终端显示此错误:

    java.lang.NoClassDefFoundError: org/apache/lucene/analysis/payloads/PayloadEncoder
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:369)
    at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:390)
    at org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:84)
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
    at org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:835)
    at org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:58)
    at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:429)
    at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:447)
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:456)
    at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:95)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:520)
    at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
    at connector.SolrConnector.<init>(SolrConnector.java:33)
    at connector.SolrConnector.getInstance(SolrConnector.java:69)
    at connector.SolrConnector.getSolrServer(SolrConnector.java:77)
    at connector.QueryServlet.doGet(QueryServlet.java:117)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
    at org.eclipse.jetty.server.Server.handle(Server.java:349)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:910)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:647)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:233)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:615)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
    at java.lang.Thread.run(Thread.java:722)
Caused by: 
java.lang.ClassNotFoundException: org.apache.lucene.analysis.payloads.PayloadEncoder
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:369)
    at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:390)
    at org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:84)
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
    at org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:835)
    at org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:58)
    at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:429)
    at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:447)
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:456)
    at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:95)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:520)
    at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
    at connector.SolrConnector.<init>(SolrConnector.java:33)
    at connector.SolrConnector.getInstance(SolrConnector.java:69)
    at connector.SolrConnector.getSolrServer(SolrConnector.java:77)
    at connector.QueryServlet.doGet(QueryServlet.java:117)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
    at org.eclipse.jetty.server.Server.handle(Server.java:349)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:910)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:647)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:233)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:615)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
    at java.lang.Thread.run(Thread.java:722)

当我编译文件WAR时,没有错误.. 我使用Jetty 7.6.0.RC4,Solr 1.4.1和Java 7 ..;)

1 个答案:

答案 0 :(得分:1)

  

java.lang.ClassNotFoundException:org.apache.lucene.analysis.payloads.PayloadEncoder

这是相当自我解释的。在运行时类路径中找不到提到的类。

确保提到的类(或至少包含该类的JAR文件)位于webapp的运行时类路径中。 webapp的默认运行时类路径所涵盖的文件夹之一是webapp的/WEB-INF/lib文件夹。放下必要的JAR。

当包名称提示时,该类是Apache Lucene库的一部分。如果需要,您可以从那里下载。