Обсуждение: Bug #707: Cannot connect Java Applet to Postgresql database

Поиск
Список
Период
Сортировка

Bug #707: Cannot connect Java Applet to Postgresql database

От
pgsql-bugs@postgresql.org
Дата:
hex (hexecution@hotmail.com) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Cannot connect Java Applet to Postgresql database

Long Description
I have 1 file name main.java. It has 3 classes which need to access a postgresql database. All files and database
resideon the same Linux machine (RH 7.2)
 
I have downloaded the pgjdbc2.jar file and kept it in the same directory as the main.java file. 
I then run the command:
      ' javac -classpath ./pgjdbc2.jar main.java '
The compiler runs and completes with no errors.
I have an SQL exception catch in my java code that prints the error to screen. When I run the applet I get the
followingerror......
 

' SQLException: Something unusual has occured to cause the driver to fail. Please report this exception: 
Exception: java.security.AccessControlException: access denied (java.net.SocketPermission db resolve) '

I have checked all syntax (and tried many variations), classpath variations and db access permissions etc and it is all
good.The postmaster was started with the -i option (I use PGAdmin to connect from windows with the same credentials)
 

Please help!

Regards
Hex

Sample Code



No file was uploaded with this report

Re: Bug #707: Cannot connect Java Applet to Postgresql database

От
Aslak Hellesøy
Дата:
This is an applet security issue and has nothing to do with PostgreSQL.

http://www.jguru.com/forums/view.jsp?EID=899614

HTH,
Aslak

> -----Original Message-----
> From: pgsql-bugs-owner@postgresql.org
> [mailto:pgsql-bugs-owner@postgresql.org]On Behalf Of
> pgsql-bugs@postgresql.org
> Sent: 11. juli 2002 01:51
> To: pgsql-bugs@postgresql.org
> Subject: [BUGS] Bug #707: Cannot connect Java Applet to Postgresql
> database
>
>
> hex (hexecution@hotmail.com) reports a bug with a severity of 1
> The lower the number the more severe it is.
>
> Short Description
> Cannot connect Java Applet to Postgresql database
>
> Long Description
> I have 1 file name main.java. It has 3 classes which need to
> access a postgresql database. All files and database reside on
> the same Linux machine (RH 7.2)
> I have downloaded the pgjdbc2.jar file and kept it in the same
> directory as the main.java file.
> I then run the command:
>       ' javac -classpath ./pgjdbc2.jar main.java '
> The compiler runs and completes with no errors.
> I have an SQL exception catch in my java code that prints the
> error to screen. When I run the applet I get the following error......
>
> ' SQLException: Something unusual has occured to cause the driver
> to fail. Please report this exception:
> Exception: java.security.AccessControlException: access denied
> (java.net.SocketPermission db resolve) '
>
> I have checked all syntax (and tried many variations), classpath
> variations and db access permissions etc and it is all good. The
> postmaster was started with the -i option (I use PGAdmin to
> connect from windows with the same credentials)
>
> Please help!
>
> Regards
> Hex
>
> Sample Code
>
>
>
> No file was uploaded with this report
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster