pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anders Svensson <anders@simusoft.dk>
To: pgsql-interfaces@postgresql.org
Subject: Problem accessing databse via servlets
Date: Mon, 27 Sep 1999 14:35:46 +0200
Message-ID: <v04020a00b41513e1571f@[192.168.1.3]> (raw)

Does anyone have any solution to my problem.

I have 2 servlets, with basicly the same code for the database interface.
My problem is that one works the others doesn't.

I have

local        all                                         trust
host         all         127.0.0.1     255.255.255.255   trust
host         all         192.168.1.0   255.255.255.0     trust

for testing in my pg_hba.conf file.

The servlets are accesing two different databases, and when i run the one
that doesn't work i get the following meesage in my apache error_log

The backend has broken the connection. Possibly the action you have
attempted h\
as caused it to close.
        at postgresql.PG_Stream.ReceiveChar(PG_Stream.java:178)
        at postgresql.Connection.openConnection(Connection.java:219)
        at postgresql.Driver.connect(Driver.java:116)
        at java.sql.DriverManager.getConnection(DriverManager.java:457)
        at java.sql.DriverManager.getConnection(DriverManager.java:137)
        at Flykend.dbConn.<init>(dbConn.java)
        at Flykending.init(Flykending.java)
        at
org.apache.jserv.JServServletManager.load_init(JServServletManager.j\ava:478)

at
org.apache.jserv.JServServletManager.loadServlet(JServServletManager\.java:397)

at
org.apache.jserv.JServConnection.processRequest(JServConnection.java\:287)
        at org.apache.jserv.JServConnection.run(JServConnection.java:197)
        at java.lang.Thread.run(Thread.java:479)


The funny thing ?? is that the trouble program works if it is not run from
a servlet, but from a command line????????
Simu Soft
v/Anders Svensson
Frederikssundsvej 20, 2 th
DK-2400  København NV

e-mail 	: Anders@simusoft.dk
tlf.	: +45 3583 8126




view thread (2+ messages)  latest in thread

Message-ID: <v04020a00b41513e1571f@[192.168.1.3]>
Permalink:  ../v04020a00b41513e1571f@%5B192.168.1.3%5D/
Also on:    postgresql.org/message-id/v04020a00b41513e1571f@[192.168.1.3]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: anders@simusoft.dk
  Subject: Re: Problem accessing databse via servlets
  In-Reply-To: <v04020a00b41513e1571f@[192.168.1.3]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox