Unix Technical Forum

org.postgresql.util.PSQLException: The backend has broken the connection.

This is a discussion on org.postgresql.util.PSQLException: The backend has broken the connection. within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> Hi I am quite new to postgreSQL. I just need to do a simple insert operation on a table ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 11:38 PM
salman.ashraf@gmail.com
 
Posts: n/a
Default org.postgresql.util.PSQLException: The backend has broken the connection.

Hi

I am quite new to postgreSQL. I just need to do a simple insert
operation on a table in PGSQL database. Now the problem I am facing is:

when I am connected to the server (on which postgresql server is up and
running) remotely with the username exactly same as that of postgres
username. I can connect to the database easily and can perform any DB
operation I want to.

But whenever I try connecting to the same DB from my Java code, I get
the exception

org.postgresql.util.PSQLException: The backend has broken the
connection. Possibly the action you have attempted has caused it to
close.

(thats it, no more details on the exception)

Furthermore If I try to connect to same database using some windows
client e.g EMS PG Manager, I am unable to move forward as well, 'coz
there is an error message again:

"Server closed the connection unexpectedly
This probably means server terminated abnormally
before or after the processing"

When I recheck by logging in to server remotely. PG server is running.

I have done a couple of steps,
I have given access previliges to my IP by modifying pg_hba.conf
I have set tcpip_connect=TRUE in postgresql.conf file

Now any pointers if you could guide me. I have tried to give every
detail of the problem

Regards
Salman

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 11:38 PM
Oliver Jowett
 
Posts: n/a
Default Re: org.postgresql.util.PSQLException: The backend has broken

salman.ashraf@gmail.com wrote:

> org.postgresql.util.PSQLException: The backend has broken the
> connection. Possibly the action you have attempted has caused it to
> close.


You should check the server-side logs for errors.

-O

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 11:38 PM
andres@sayago.info
 
Posts: n/a
Default Help !! Postgres on JDeveloper+ADF

Hello again.

I can't find the solution. I need to use PostgreSQL on JDeveloper using
ADF. I get an error about "check sintaxis". The problem is that ADF use
aliases for UPDATE statements, and PostgreSQL not (MySQL yes!!).

Can you help me??

Andrés Sáyago
Bogotá D.C., Colombia

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-15-2008, 11:38 PM
Mike Warnecke
 
Posts: n/a
Default Re: Help !! Postgres on JDeveloper+ADF

On Wed, 2005-21-09 at 08:50 -0600, andres@sayago.info wrote:
> Hello again.
>
> I can't find the solution. I need to use PostgreSQL on JDeveloper using
> ADF. I get an error about "check sintaxis". The problem is that ADF use
> aliases for UPDATE statements, and PostgreSQL not (MySQL yes!!).
>
> Can you help me??


As said before, you need to write a JDBC driver that will remove the
aliases from updates, and then send the rewritten query to postgresql.


--
Mike Warnecke <mike@audiowarehouse.ca>
Audio Warehouse

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDMZVp5CWHSd2vwsgRAqLYAJ9KD/x9JooXNBicdFCgDaKQu6ChyQCg5/cK
m/zRFQZWMEZ7OBhoLLAoSLA=
=85D/
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-15-2008, 11:38 PM
Craig Servin
 
Posts: n/a
Default Re: Help !! Postgres on JDeveloper+ADF

The way that I would deal with this is by implementing a JDBC driver. I would
cheat with a java.lang.reflect.Proxy which really just passes everything to
the PostreSQL JDBC driver but parses the statements and removes the alias.

It should not be too hard. But since this is so specific to your situation I
do not think anyone is going to do it for you. I think that a
java.lang.reflect.Proxy is the way to go.



On Wednesday 21 September 2005 09:50 am, andres@sayago.info wrote:
> Hello again.
>
> I can't find the solution. I need to use PostgreSQL on JDeveloper using
> ADF. I get an error about "check sintaxis". The problem is that ADF use
> aliases for UPDATE statements, and PostgreSQL not (MySQL yes!!).
>
> Can you help me??
>
> Andrés Sáyago
> Bogotá D.C., Colombia
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:44 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com