Abrupt connection closure while handling large objects

From: shanmugavel <shanmugavel(at)compucraftersindia(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Abrupt connection closure while handling large objects
Date: 2002-08-14 07:03:08
Message-ID: 3D5A00AC.3040801@compucraftersindia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi

I am having problem with while reading large objects thru jdbc. The
connection is closed abruptly halfway thru, meaning i can read some
data. The content size varies from 300 KB to 1 MB.

While i can use lo_export directly in pgsql command interface, accessing
thru jdbc fails to do the same. I have given the stack trace here and
also the configurations of my system. Thanks for any help.

rgds
vel

Config:
Redhat Linux 7.1/512 MB/20 GB IDE
PostgreSQL - 7.1.2
JDBC driver for 7.1.2
JBoss 2.4.1

StackTrace:

[Default] Received throwable with Message: An I/O error has occured
while flushing the output - Exception: java.net.SocketException: Socket
closed
Stack Trace:

java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:72)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:130)
at org.postgresql.PG_Stream.flush(PG_Stream.java:414)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:93)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
at org.postgresql.fastpath.Fastpath.getData(Fastpath.java:218)
at org.postgresql.largeobject.LargeObject.read(LargeObject.java:142)
at
org.postgresql.largeobject.BlobInputStream.read(BlobInputStream.java:62)
at java.io.InputStream.read(InputStream.java:165)
at
aps.utils.UploadDownloadBean.downloadDocument(UploadDownloadBean.java:90)
at aps.user.DocDownload.processRequest(DocDownload.java:58)
at aps.user.DocDownload.doGet(DocDownload.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
End of Stack Trace
[Default] java.io.IOException: An I/O error has occured while flushing
the output - Exception: java.net.SocketException: Socket closed
Stack Trace:

java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:72)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:130)
at org.postgresql.PG_Stream.flush(PG_Stream.java:414)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:93)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
at org.postgresql.fastpath.Fastpath.getData(Fastpath.java:218)
at org.postgresql.largeobject.LargeObject.read(LargeObject.java:142)
at
org.postgresql.largeobject.BlobInputStream.read(BlobInputStream.java:62)
at java.io.InputStream.read(InputStream.java:165)
at
aps.utils.UploadDownloadBean.downloadDocument(UploadDownloadBean.java:90)
at aps.user.DocDownload.processRequest(DocDownload.java:58)
at aps.user.DocDownload.doGet(DocDownload.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
End of Stack Trace
[Default] at
org.postgresql.largeobject.BlobInputStream.read(BlobInputStream.java:72)
[Default]
[Default] at java.io.InputStream.read(InputStream.java:165)
[Default]
[Default] at
aps.utils.UploadDownloadBean.downloadDocument(UploadDownloadBean.java:90)
[Default]
[Default] at aps.user.DocDownload.processRequest(DocDownload.java:58)
[Default]
[Default] at aps.user.DocDownload.doGet(DocDownload.java:74)
[Default]
[Default] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
[Default]
[Default] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[Default]
[Default] at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
[Default]
[Default] at org.apache.tomcat.core.Handler.service(Handler.java:287)
[Default]
[Default] at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
[Default]
[Default] at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
[Default]
[Default] at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
[Default]
[Default] at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
[Default]
[Default] at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
[Default]
[Default] at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
[Default]
[Default] at java.lang.Thread.run(Thread.java:484)
[Default]
[EmbeddedTomcatServiceSX] 2002-08-14 00:35:00 - Ctx( /apslawyer ):
Exception in: R( /apslawyer + download + null) -
java.lang.NullPointerException
at
org.jboss.pool.jdbc.xa.wrapper.XAConnectionImpl.clientConnectionClosed(XAConnectionImpl.java:131)
at
org.jboss.pool.jdbc.xa.wrapper.XAClientConnection.close(XAClientConnection.java:250)
at
aps.utils.UploadDownloadBean.downloadDocument(UploadDownloadBean.java:108)
at aps.user.DocDownload.processRequest(DocDownload.java:58)
at aps.user.DocDownload.doGet(DocDownload.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)

Browse pgsql-jdbc by date

  From Date Subject
Next Message Carsten Heidmann 2002-08-14 12:47:24 Problems with column names in dot-notation
Previous Message Jun KAWAI 2002-08-14 06:48:44 md5 authentication bug?