Re: Connect Socket problem

Поиск
Список
Период
Сортировка
От David Wall
Тема Re: Connect Socket problem
Дата
Msg-id 022a01c33673$dddbbbd0$3201a8c0@rasta
обсуждение исходный текст
Ответ на Connect Socket problem  ("Rodrigo F. Baroni" <rodrigobaroni@yahoo.com.br>)
Список 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@yahoo.com.br>
To: <pgsql-jdbc@postgresql.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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: forName finds Driver but getConnection doesn't (AGAIN)
Следующее
От: Casey Kemp
Дата:
Сообщение: DOWNLOAD JDBC3