I get the following when attempting to view a project I have, I have MySQL 5.0 and Tomcat 6.0. Both services are running. As far as MySQL connectors, I have both "mysql-connector-java-5.0.7-bin" and "mysql-connector-java-3.0.8-stable-bin". This has not worked with either one.
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /test.jsp at line 8
5: </head><body>
6: <%
7: DBConnect d = new DBConnect();
8: ResultSet rs = d.getResult("SELECT * FROM items");
9: //this is where you loop over your results
10:
11: while (rs.next()) {
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
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)
root cause
java.lang.NullPointerException
com.monkeygarage.DBConnect.getResult(Unknown Source)
org.apache.jsp.test_jsp._jspService(test_jsp.java:62)
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)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
Apache Tomcat/6.0.14