I'm trying to run my jsp page but netbean ide keep giving me this error:-
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "com.mysql.jdbc.exceptions.jdbc4.CommunicationsExc eption: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."
org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:862)
org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:791)
org.apache.jsp.DisplayData_jsp._jspService(Display Data_jsp.java:141)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:393)
root cause
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "com.mysql.jdbc.exceptions.jdbc4.CommunicationsExc eption: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."
org.apache.taglibs.standard.tag.common.sql.QueryTa gSupport.getConnection(QueryTagSupport.java:276)
org.apache.taglibs.standard.tag.common.sql.QueryTa gSupport.doStartTag(QueryTagSupport.java:159)
org.apache.jsp.DisplayData_jsp._jspx_meth_sql_005f query_005f0(DisplayData_jsp.java:191)
org.apache.jsp.DisplayData_jsp._jspService(Display Data_jsp.java:93)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:393)
So, i thought I would add the MySQL connector jar file again. I added in relative file at the add library there.
..\..\Mysqlconnector\mysql-connector-java-5.1.15\
Not sure why still can't get connected.
Hope someone can advise me how to make it work. Thanks.