Jump to content

Search the Community

Showing results for tags 'jdbc'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • Website Management and Coding
    • Technology and the Internet
    • Philosophy, Politics, and Science
    • Art and Entertainment
    • Other Discussion
  • HelioHost
    • Questions
    • Customer Service
    • How You Can Help
  • HelioNet
    • News
    • Contact HelioNet

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. this is code of dbconnection.java file which is inside my javaee webapplicataion my web application is hosted on heliohost package Database; import java.sql.Connection; import java.sql.DriverManager; public class DbConnection { public static Connection getconnection() { Connection con=null; try { Class.forName("com.mysql.jdbc.Driver");//load the driver //Create the connection //Connection is an interface //Drivermanager is a class and getConnetcion()is a static metod of DriverManager class whose return type is Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/yo52674_wp678"+"?verifyServerCertificate=false&useSSL=false&autoReconnect=true&useUnicode=true&characterEncoding=utf8","yo52674_R","<removed>"); } catch(Exception e){ System.out.println(e); } return con; //return the connection } } my web application is trying to connect heliohost mysql database but it can only connect and perform queries when my heliohost phpmyadmin page is open after when i close php my admin it gives me error e Exception Report Message An exception occurred processing JSP page [/userregact.jsp] at line [17] Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception org.apache.jasper.JasperException: An exception occurred processing JSP page [/userregact.jsp] at line [17] 14: //String feedback = request.getParameter("feedback"); 15: Connection getconnection = DbConnection.getconnection(); 16: //String sql=; 17: PreparedStatement st = getconnection.prepareStatement("insert into user values(?,?,?,?)"); 18: 19: st.setString(1,username); 20: st.setString(2,password); Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481) 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:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) Root Cause java.lang.NullPointerException org.apache.jsp.userregact_jsp._jspService(userregact_jsp.java:147) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) 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:742) 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.24 this is code of dbconnection.java file
×
×
  • Create New...