Thread: postgresql JDBC error

postgresql JDBC error

From
Lloyd Holman
Date:
Hi everyone,

this is my first mail to this mailing list.  I was wondering if anyone
encountered this error when trying to establish a JDBC connection to a
postgresql database?

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

is it a corrupt database?

by the way the server is running redhat 6.x, apache and tomcat 3.x

Thanks in advance
Lloyd Holman


Re: postgresql JDBC error

From
"Nick Fankhauser"
Date:
Hi Lloyd-

It sounds like maybe you need to add a line to your pg_hba.conf file to
authorize the connection. (Remember that if you are running Tomcat, the user
that Tomcat connects as may be different from the user you develop as...)

The low-security-but-make-it-work approach would be to add this line:

host all 127.0.0.1 255.0.0.0 trust

This assumes you are on the same machine.

Look at this FAQ for more details:

http://www.fankhausers.com/postgresql/jdbc/welcome.html#tcpip

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/

> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Lloyd Holman
> Sent: Wednesday, January 09, 2002 11:33 AM
> To: pgsql-jdbc@postgresql.org
> Subject: [JDBC] postgresql JDBC error
>
>
> Hi everyone,
>
> this is my first mail to this mailing list.  I was wondering if anyone
> encountered this error when trying to establish a JDBC connection to a
> postgresql database?
>
> "SQLException caught: Something unusual has occured to cause the driver
> to fail. Please report this exception:
> java.security.AccessControlException: access denied
> (java.net.SocketPermission localhost resolve)"
>
> is it a corrupt database?
>
> by the way the server is running redhat 6.x, apache and tomcat 3.x
>
> Thanks in advance
> Lloyd Holman
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


Re: postgresql JDBC error

From
"Dave Cramer"
Date:
Lloyd,

No it's not a corrupt database, looks like you are trying to run an
applet? The error is related to your jvm not being able to open a
socket. Nothing to do with the database yet

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Lloyd Holman
Sent: Wednesday, January 09, 2002 11:33 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] postgresql JDBC error


Hi everyone,

this is my first mail to this mailing list.  I was wondering if anyone
encountered this error when trying to establish a JDBC connection to a
postgresql database?

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

is it a corrupt database?

by the way the server is running redhat 6.x, apache and tomcat 3.x

Thanks in advance
Lloyd Holman


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly



Re: postgresql JDBC error

From
"Paulo Merson"
Date:
Additionally, you may need to start postgres with "-i".

Paulo Merson
Summa Technologies - www.summa-tech.com

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Nick Fankhauser
Sent: Wednesday, January 09, 2002 1:57 PM
To: Lloyd Holman; pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] postgresql JDBC error


Hi Lloyd-

It sounds like maybe you need to add a line to your pg_hba.conf file to
authorize the connection. (Remember that if you are running Tomcat, the
user
that Tomcat connects as may be different from the user you develop
as...)

The low-security-but-make-it-work approach would be to add this line:

host all 127.0.0.1 255.0.0.0 trust

This assumes you are on the same machine.

Look at this FAQ for more details:

http://www.fankhausers.com/postgresql/jdbc/welcome.html#tcpip

-Nick

------------------------------------------------------------------------
--
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax
1.765.962.9788
Ray Ontko & Co.     Software Consulting Services
http://www.ontko.com/

> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Lloyd Holman
> Sent: Wednesday, January 09, 2002 11:33 AM
> To: pgsql-jdbc@postgresql.org
> Subject: [JDBC] postgresql JDBC error
>
>
> Hi everyone,
>
> this is my first mail to this mailing list.  I was wondering if anyone
> encountered this error when trying to establish a JDBC connection to a
> postgresql database?
>
> "SQLException caught: Something unusual has occured to cause the
driver
> to fail. Please report this exception:
> java.security.AccessControlException: access denied
> (java.net.SocketPermission localhost resolve)"
>
> is it a corrupt database?
>
> by the way the server is running redhat 6.x, apache and tomcat 3.x
>
> Thanks in advance
> Lloyd Holman
>
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org