Re: Connect Socket problem

From: "David Wall" <d(dot)wall(at)computer(dot)org>
To: <rodrigobaroni(at)yahoo(dot)com(dot)br>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Connect Socket problem
Date: 2003-06-19 15:02:55
Message-ID: 022a01c33673$dddbbbd0$3201a8c0@rasta
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I'm not an applet kind of person, so I'm not sure how you work around it,
but this is simply an exception thrown because the JVM has a security
manager and your applet has not been configured to allow the socket
permissions in it's related "java.policy" file. You'll need an entry for
your applet that grants that permission with an entry like:

permission java.net.SocketPermission "xxx.xxx.xxx.xxx:5432",
"connect,resolve";

Hope this helps as you'll need to research how to set this for an applet.

David

----- Original Message -----
From: "Rodrigo F. Baroni" <rodrigobaroni(at)yahoo(dot)com(dot)br>
To: <pgsql-jdbc(at)postgresql(dot)org>
Sent: Wednesday, June 18, 2003 10:44 PM
Subject: [JDBC] Connect Socket problem

> Hello all,
>
> Please, could someone help me ?!
>
> I did a applet, using a jdbc driver to connect
> with postgres 7.3.1 in a RedHat linux 8.0. When I run
> it from my own machine to connect with the postgres in
> my PC it works fine, but when I run the applet to
> connect to a remote server postgres, the driver
> returns the follow error (got at exception) :
>
> " Something unusual has occured to cause the driver to
> fail. Please report this exception: Exception:
> java.security.AccessControlException: access denied
> (java.net.SocketPermission XXX.XXX.XXX.XXX:5432
> connect, resolve) "
>
> And the Sack Trace follows:
>
>
"java.security.AccessControlContext.checkPermission(AccesscontrolContex.java
:270)
> .... "
>
>
> Does anybody have any suggestion ?!!
>
>
> Thanks a lot
> Rodrigo F Baroni
>
> _______________________________________________________________________
> Yahoo! Mail
> Mais espaço, mais segurança e gratuito: caixa postal de 6MB, antivírus,
proteção contra spam.
> http://br.mail.yahoo.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Erik Price 2003-06-19 17:46:31 Re: DOWNLOAD JDBC3
Previous Message Dave Cramer 2003-06-19 09:06:25 Re: forName finds Driver but getConnection doesn't (AGAIN)