You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Johan <j....@telia.com> on 2000/10/20 15:17:12 UTC

jdbc-mySql

If I change domainname from localhost.localdomain to any other domainname I get this message. I am running tomcat3.1 on mandrake with mySql3.22

Best regards Johan Kvarnström (first time)
----------------------------------------------------------------------------------------------------------
Error: 500
Location: /jspMySql.jsp
Internal Servlet Error:javax.servlet.ServletException:
 Server configuration denies access to data source
 at org.apache.jasper.runtime.PageContextImpl.handlePageException
(PageContextImpl.java:386)
 at _0002fjspMySql_0002ejspjspMySql_jsp_0._jspService
(_0002fjspMySql_0002ejspjspMySql_jsp_0.java:104)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
(JspServlet.java:174)
 at org.apache.jasper.runtime.JspServlet.serviceJspFile
(JspServlet.java:261)
 at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.handleRequest
(ServletWrapper.java:503)
 at org.apache.tomcat.core.ContextManager.service
(ContextManager.java:559)
 at org.apache.tomcat.service.http.HttpConnectionHandler.
processConnection(HttpConnectionHandler.java:160)
 at org.apache.tomcat.service.TcpConnectionThread.run
(SimpleTcpEndpoint.java:338)
 at java.lang.Thread.run(Thread.java:484)

Root cause:java.sql.SQLException:
 Server configuration denies access to data source

 at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java)
 at org.gjt.mm.mysql.Connection.connectionInit(Connection.java)
 at org.gjt.mm.mysql.jdbc2.Connection.connectionInit
(Connection.java:89)
at org.gjt.mm.mysql.Driver.connect(Driver.java)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:199)
 at _0002fjspMySql_0002ejspjspMySql_jsp_0._jspService
(_0002fjspMySql_0002ejspjspMySql_jsp_0.java:65)
 at org.apache.jasper.runtime.HttpJspBase.service
(HttpJspBase.java:126)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
(JspServlet.java:174)
 at org.apache.jasper.runtime.JspServlet.serviceJspFile
(JspServlet.java:261)
 at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.handleRequest
(ServletWrapper.java:503)
 at org.apache.tomcat.core.ContextManager.service
(ContextManager.java:559)
 at org.apache.tomcat.service.http.HttpConnectionHandler.
processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run
(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)
-----------------------------------------------------------------------------
j.kvarnstom@telia.com 

Re: jdbc-mySql

Posted by Duane Gran <ra...@spinweb.net>.
Johan,

What you describe is more of a MySQL issue than Tomcat, but I'm familiar
with it, so I'll give my $.02.  When you install MySQL it uses your
existing hostname value.  On many linux systems this defaults to
localhost.localdomain and therefore this is what is returned by the
"hostname" command.  MySQL uses this value and puts it into the security
settings.  If you change the hostname, you must update the "host" value
for access in the mysql database.

You will probably find some better documentation and explanation of this
in the mysql online guide at mysql.com.  I hope this short explanation
gives a nudge in the right direction.

Duane Gran
spinweb.net

On Fri, 20 Oct 2000, Johan wrote:

>If I change domainname from localhost.localdomain to any other domainname I get this message. I am running tomcat3.1 on mandrake with mySql3.22
>
>Best regards Johan Kvarnstr�m (first time)
>----------------------------------------------------------------------------------------------------------
>Error: 500
>Location: /jspMySql.jsp
>Internal Servlet Error:javax.servlet.ServletException:
> Server configuration denies access to data source
> at org.apache.jasper.runtime.PageContextImpl.handlePageException
>(PageContextImpl.java:386)
> at _0002fjspMySql_0002ejspjspMySql_jsp_0._jspService
>(_0002fjspMySql_0002ejspjspMySql_jsp_0.java:104)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
>(JspServlet.java:174)
> at org.apache.jasper.runtime.JspServlet.serviceJspFile
>(JspServlet.java:261)
> at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.tomcat.core.ServletWrapper.handleRequest
>(ServletWrapper.java:503)
> at org.apache.tomcat.core.ContextManager.service
>(ContextManager.java:559)
> at org.apache.tomcat.service.http.HttpConnectionHandler.
>processConnection(HttpConnectionHandler.java:160)
> at org.apache.tomcat.service.TcpConnectionThread.run
>(SimpleTcpEndpoint.java:338)
> at java.lang.Thread.run(Thread.java:484)
>
>Root cause:java.sql.SQLException:
> Server configuration denies access to data source
>
> at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java)
> at org.gjt.mm.mysql.Connection.connectionInit(Connection.java)
> at org.gjt.mm.mysql.jdbc2.Connection.connectionInit
>(Connection.java:89)
>at org.gjt.mm.mysql.Driver.connect(Driver.java)
>at java.sql.DriverManager.getConnection(DriverManager.java:517)
>at java.sql.DriverManager.getConnection(DriverManager.java:199)
> at _0002fjspMySql_0002ejspjspMySql_jsp_0._jspService
>(_0002fjspMySql_0002ejspjspMySql_jsp_0.java:65)
> at org.apache.jasper.runtime.HttpJspBase.service
>(HttpJspBase.java:126)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
>(JspServlet.java:174)
> at org.apache.jasper.runtime.JspServlet.serviceJspFile
>(JspServlet.java:261)
> at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.tomcat.core.ServletWrapper.handleRequest
>(ServletWrapper.java:503)
> at org.apache.tomcat.core.ContextManager.service
>(ContextManager.java:559)
> at org.apache.tomcat.service.http.HttpConnectionHandler.
>processConnection(HttpConnectionHandler.java:160)
>at org.apache.tomcat.service.TcpConnectionThread.run
>(SimpleTcpEndpoint.java:338)
>at java.lang.Thread.run(Thread.java:484)
>-----------------------------------------------------------------------------
>j.kvarnstom@telia.com 
>