首页上一页 1 下一页尾页 5 条记录 1/1页
JSP开发技术大全 例子问题
发表在JavaWeb图书答疑
2008-02-28
是否精华
是
否
版块置顶:
是
否
<PRE>你好,我在做第30章 Spring 框架第一个例子的时候 路径是 mingrisoft\30\sl\01</PRE><PRE>出现以下问题,请问错误在哪里?如何解决?</PRE><PRE>org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 16
13: </head>
14: <body>
15: <%
16: Resource resource = new ClassPathResource("applicationContext.xml");
17: BeanFactory factory = new XmlBeanFactory(resource);
18: Placard placard = (Placard) factory.getBean("placard");
19: %>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
</PRE>
<P></P>
<P><B><FONT style="BACKGROUND-COLOR: #525d76" color=#ffffff>root cause</FONT></B> <PRE>javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.springframework.util.ClassUtils
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.index_jsp._jspService(index_jsp.java:99)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
</PRE>
<P></P>
<P><B><FONT style="BACKGROUND-COLOR: #525d76" color=#ffffff>root cause</FONT></B> <PRE>java.lang.NoClassDefFoundError: Could not initialize class org.springframework.util.ClassUtils
org.springframework.core.io.ClassPathResource.<init>(ClassPathResource.java:84)
org.springframework.core.io.ClassPathResource.<init>(ClassPathResource.java:66)
org.apache.jsp.index_jsp._jspService(index_jsp.java:73)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
</PRE>
<P></P>
<P><B><FONT style="BACKGROUND-COLOR: #525d76" color=#ffffff>note</FONT></B> <U>The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.</U></P>
13: </head>
14: <body>
15: <%
16: Resource resource = new ClassPathResource("applicationContext.xml");
17: BeanFactory factory = new XmlBeanFactory(resource);
18: Placard placard = (Placard) factory.getBean("placard");
19: %>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
</PRE>
<P></P>
<P><B><FONT style="BACKGROUND-COLOR: #525d76" color=#ffffff>root cause</FONT></B> <PRE>javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.springframework.util.ClassUtils
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.index_jsp._jspService(index_jsp.java:99)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
</PRE>
<P></P>
<P><B><FONT style="BACKGROUND-COLOR: #525d76" color=#ffffff>root cause</FONT></B> <PRE>java.lang.NoClassDefFoundError: Could not initialize class org.springframework.util.ClassUtils
org.springframework.core.io.ClassPathResource.<init>(ClassPathResource.java:84)
org.springframework.core.io.ClassPathResource.<init>(ClassPathResource.java:66)
org.apache.jsp.index_jsp._jspService(index_jsp.java:73)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
</PRE>
<P></P>
<P><B><FONT style="BACKGROUND-COLOR: #525d76" color=#ffffff>note</FONT></B> <U>The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.</U></P>