java.lang.NoSuchMethodError:org.opencms.jsp.I_CmsXmlContentContainer.hasMoreContent()

时间:2012-08-26 08:37:56

标签: java jsp opencms

我是学习“开放式CMS”并尝试理解它的新手,创建一些基于此CMS的基本网站。最新版本为8.0.3。我正在使用“opencms-7-development”doc进行培训(我在版本8中找不到相同的内容)。

我已经在源文件和配置文件中做了所有必要的准备工作来创建博客示例但是当我可以尝试查看任何页面时出现以下错误。有人知道我为什么要面对这个exception吗?

javax.servlet.ServletException: java.lang.NoSuchMethodError: org.opencms.jsp.I_CmsXmlContentContainer.hasMoreContent()Z
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:911)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:840)
at org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.com_deepthoughts_templates.templates.BlogEntry_jsp._jspService(BlogEntry_jsp.java:327)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:188)
at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:163)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:612)
at org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:417)
at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:167)
at org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:886)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:517)
at org.opencms.loader.A_CmsXmlDocumentLoader.load(A_CmsXmlDocumentLoader.java:224)
at org.opencms.loader.CmsXmlContentLoader.load(CmsXmlContentLoader.java:44)
at org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1062)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1598)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError: org.opencms.jsp.I_CmsXmlContentContainer.hasMoreContent()Z
    at com.deepthoughts.templates.BlogJspTemplate.hasMoreBlogs(BlogJspTemplate.java:340)
    at org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.com_deepthoughts_templates.templates.BlogEntry_jsp._jspService(BlogEntry_jsp.java:162)
    ... 41 more

1 个答案:

答案 0 :(得分:0)

我不确定你想要实现什么,但是从阅读本文来看,似乎你想要输出文档的内容。在这种情况下,我宁愿坚持使用cms taglibrary而不是使用jstl。例如:

<cms:contentloop element="/blog/blogpost">
    <cms:contentshow element="Headline"/>
</cms:contentloop>

也许这有帮助。如果没有,您可能想要发布更多模板代码。