Я импортировал net.sf.json пакет, чтобы использовать функцию JSON в моем jsp apge , но как только я создаю объект JSONArray, он бросает меня NoClassDefinitionFound .
//line 50
JSONObject responcedata=new JSONObject();
exception thrown is:
org.apache.jasper.JasperException: An exception occurred processing JSP page /jqgriddata.jsp at line 50
48:
49:
50: JSONObject responcedata=new JSONObject();
51: JSONArray cellarray=new JSONArray();
52:
53: // responcedata.put("total",totalrow);
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class net.sf.json.JSONObject
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.jqgriddata_jsp._jspService(jqgriddata_jsp.java:191)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.NoClassDefFoundError: Could not initialize class net.sf.json.JSONObject
org.apache.jsp.jqgriddata_jsp._jspService(jqgriddata_jsp.java:100)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:
260)
javax.servlet.http.HttpServlet.service (HttpServlet.java:717)