|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Keep getting
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: Exception in JSP: /testing.jsp:12 9: <body> 10: 11: <% 12: Class.forName("com.mysql.jdbc.Driver").newInstance(); 13: connection = DriverManager.getConnection(connectionURL,"",""); 14: statement = connection.createStatement(); 15: rs = statement.executeQuery("SELECT * FROM student"); Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:504) org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:375) org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet .java:802) org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:368) root cause javax.servlet.ServletException: com.mysql.jdbc.Driver org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:858) org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:791) org.apache.jsp.testing_jsp._jspService(testing_jsp .java:77) org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet .java:802) org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:332) org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet .java:802) org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:368) root cause java.lang.ClassNotFoundException: com.mysql.jdbc.Driver org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1352) org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1198) org.apache.jasper.servlet.JasperLoader.loadClass(J asperLoader.java:127) org.apache.jasper.servlet.JasperLoader.loadClass(J asperLoader.java:65) java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319) java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:169) org.apache.jsp.testing_jsp._jspService(testing_jsp .java:56) org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet .java:802) org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:332) org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet .java:802) org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:368) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs. Any suggestion?? Here's my coding: <%@ page import="java.sql.*"%> <% String connectionURL = "jdbc:mysql://localhost:3306/example?user=root&password=password"; Connection connection = null; Statement statement = null; ResultSet rs = null; %> <html> <body> <% Class.forName("com.mysql.jdbc.Driver").newInstance(); connection = DriverManager.getConnection(connectionURL,"",""); statement = connection.createStatement(); rs = statement.executeQuery("SELECT * FROM student"); while(rs.next()) { out.println(rs.getString("name")); } rs.close(); %> </body> </html> |
|
#2
|
|||
|
|||
|
org.apache.jasper.JasperException: Exception in JSP: /callReport.jsp:10
org.apache.jasper.JasperException: Exception in JSP: /callReport.jsp:10 |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Help urgently required on Mysql netbeans connection |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|