Re: jdbc connection refused, please help

From: "Peter Mount" <peter(at)retep(dot)org(dot)uk>
To: "Robert Morrow" <rhmorrow1(at)earthlink(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: jdbc connection refused, please help
Date: 2000-08-28 08:47:02
Message-ID: 004d01c010cc$bd2ba1e0$2516989e@heather
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You have fallen fowl of applet security. Here, you can only connect to the
same server as the applet was downloaded from, so unless you connected
directly to 127.0.0.1 to download the applet it will fail.

The rule is: The URL for the applet must be identical to the jdbc url.
Pseudonyms, or identical IP addresses won't work. The URL's must match
exactly.

Peter

--
Peter T Mount peter(at)retep(dot)org(dot)uk, me(at)petermount(dot)com
Homepage: http://www.retep.org.uk Contact details: http://petermount.com
PostgreSQL JDBC: http://www.retep.org.uk/postgres/
Java PDF Generator: http://www.retep.org.uk/pdf/
----- Original Message -----
From: "Robert Morrow" <rhmorrow1(at)earthlink(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Monday, August 28, 2000 2:13 AM
Subject: [GENERAL] jdbc connection refused, please help

> Hi all,
> I'm definitely a postgreSQL newbie. In trying to hook up postgreSQL to
a
> JSP engine (Java Web Server) using the postgreSQL jdbc driver, I get the
> following error:
>
> Message: Something unusual has occured to cause the driver to fail. Please
> report this exception: java.security.AccessControlException: access denied
> (java.net.SocketPermission 127.0.0.1:5432 connect,resolve) Error code: 0
> Something unusual has occured to cause the driver to fail. Please report
> this exception: java.security.AccessControlException: access denied
> (java.net.SocketPermission 127.0.0.1:5432 connect,resolve) at
> java.lang.Throwable.fillInStackTrace(Native Method) at
> java.lang.Throwable.fillInStackTrace(Compiled Code) at
> java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code)
> at java.sql.SQLException.(SQLException.java:98) at
> org.postgresql.util.PSQLException.(Compiled Code) at
> org.postgresql.Driver.connect(Compiled Code) at
> java.sql.DriverManager.getConnection(Compiled Code) at
> java.sql.DriverManager.getConnection(Compiled Code) at
> sunexamples.beans.JDBCBean.go(Compiled Code) at
> sunexamples.beans.HttpJDBCBean.processRequest(Compiled Code) at
> pagecompile.jsp._examples._jdbc._JDBCSample._jspService(Compiled Code) at
> com.sun.server.http.pagecompile.jsp.runtime.HttpJspBase.service(Compiled
> Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at
>
com.sun.server.http.pagecompile.jsp.runtime.JspServlet.runServlet(JspServlet
> .java:469) at
>
com.sun.server.http.pagecompile.jsp.runtime.JspServlet.processJspPage(JspSer
> vlet.java:259) at
> com.sun.server.http.pagecompile.jsp.runtime.JspServlet.service(Compiled
> Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at
> com.sun.server.ServletState.callService(Compiled Code) at
> com.sun.server.ServletManager.callServletService(Compiled Code) at
> com.sun.server.ProcessingState.invokeTargetServlet(Compiled Code) at
> com.sun.server.http.HttpProcessingState.execute(Compiled Code) at
> com.sun.server.http.stages.Runner.process(Compiled Code) at
> com.sun.server.ProcessingSupport.process(Compiled Code) at
> com.sun.server.Service.process(Compiled Code) at
> com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at
> com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at
> com.sun.server.HandlerThread.run(Compiled Code) JDBC/JSP Example
>
> Anyone have any ideas how I can work around it? I'm not sure why
> connect,resolve isn't allowed...but here's the relevant line from my
> pg_hba.conf:
>
> # TYPE DATABASE IP_ADDRESS MASK USERAUTH MAP
>
> host all 127.0.0.1 255.255.255.128 trust
> --
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Mount 2000-08-28 08:49:32 Re: JDBC + large objects problem
Previous Message Yury Don 2000-08-28 05:01:24 Re: table count limitation