HTTP Status 500 – Internal Server Error


Type Exception Report

Message An exception occurred processing [/include/dbconnection.jsp] at line [8]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: An exception occurred processing [/include/dbconnection.jsp] at line [8]

5: Class.forName("com.mysql.jdbc.Driver");
6: //Connection con=DriverManager.getConnection("jdbc:mysql://localhost/nirmala?user=root&password=");
7: 
8: Connection con=DriverManager.getConnection("jdbc:mysql://localhost/idreamz2_nirmala?user=idreamz2_nirmala&password=try@12345");
9: 
10: %>
11: <%@ taglib uri="/WEB-INF/lib/pager-taglib.jar" prefix="pg" %>


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:617)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:499)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Root Cause

javax.servlet.ServletException: java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'idreamz2_nirmala'@'localhost' (using password: YES)"
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838)
	org.apache.jsp.news_002dand_002devents_002ddetail.index_jsp._jspService(index_jsp.java:469)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Root Cause

java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'idreamz2_nirmala'@'localhost' (using password: YES)"
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1906)
	com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2520)
	com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:817)
	com.mysql.jdbc.Connection.createNewIO(Connection.java:1782)
	com.mysql.jdbc.Connection.<init>(Connection.java:450)
	com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
	java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
	java.sql/java.sql.DriverManager.getConnection(DriverManager.java:251)
	org.apache.jsp.news_002dand_002devents_002ddetail.index_jsp._jspService(index_jsp.java:133)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Note The full stack trace of the root cause is available in the server logs.


Apache Tomcat/8.5.46