The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

JSP/Mysql

Discussion in 'General Discussion' started by Nico, Mar 12, 2002.

  1. Nico

    Nico Well-Known Member

    Joined:
    Dec 5, 2001
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Edmond, OK
    Hello all,
    Is there anything special that needs to be done in order to connect to a MYSQL database wth JSP?
    We have one setup up but it report the following:
    'Server configuration denies access to data source'

    Error: 500
    Location: /test.jsp
    Internal Servlet Error:

    javax.servlet.ServletException: Server configuration denies access to data source
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
    at _0002ftest_0002ejsptest_jsp_10._jspService(_0002ftest_0002ejsptest_jsp_10.java:147)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
    at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:498)

    Root cause:
    java.sql.SQLException: Server configuration denies access to data source
    at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:193)
    at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261)
    at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
    at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
    at java.sql.DriverManager.getConnection(DriverManager.java:523)
    at java.sql.DriverManager.getConnection(DriverManager.java:183)
    at _0002ftest_0002ejsptest_jsp_10._jspService(_0002ftest_0002ejsptest_jsp_10.java:88)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
    at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:498)
     
  2. HOSTFORWEB

    HOSTFORWEB Well-Known Member
    PartnerNOC

    Joined:
    Feb 6, 2002
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Everyone have such problem.

    To fix use in mysql:

    GRANT ALL ON db_name.* TO user_name IDENTIFIED BY &pass_here&;
     
  3. Nico

    Nico Well-Known Member

    Joined:
    Dec 5, 2001
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Edmond, OK
    MYSQL

    Thanks. We found some additional problems in their code as well. We finally have it working.
     
Loading...

Share This Page