RE: Large Objects

Lists: pgsql-generalpgsql-jdbc
From: Kovács Péter <peter(dot)kovacs(at)sysdata(dot)siemens(dot)hu>
To: noselasd(at)frisurf(dot)no, daniel(dot)fisher(at)vt(dot)edu, Daniel Fisher <dfisher(at)vt(dot)edu>, pgsql-jdbc(at)postgresql(dot)org
Subject: RE: Large Objects
Date: 2001-07-30 07:12:04
Message-ID: 8A2DDD7ED7876A4698F6FF204F62CBFCD2FE60@budg112a.sysdata.siemens.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-jdbc

This would be the standard way of inserting Large Objects. But last time I
looked at it, it did not work with the jdbc implementation provided with
pgsql.

-----Original Message-----
From: Nils O. Selåsdal [mailto:noselasd(at)frisurf(dot)no]
Sent: Friday, July 27, 2001 9:44 PM
To: daniel(dot)fisher(at)vt(dot)edu; Daniel Fisher; pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] Large Objects

if you want to insert Large Objects, you need to use one of the setXXXStream

of the statement, not setBytes.


From: "chris markiewicz" <cmarkiew(at)commnav(dot)com>
To: 'Kovács Péter' <peter(dot)kovacs(at)sysdata(dot)siemens(dot)hu>, <noselasd(at)frisurf(dot)no>, <daniel(dot)fisher(at)vt(dot)edu>, "'Daniel Fisher'" <dfisher(at)vt(dot)edu>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: RE: Large Objects
Date: 2001-07-31 20:42:08
Message-ID: 008a01c11a01$44f45fc0$77b846c6@cmarkiewicz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-jdbc

i have a different but related question - i OCCASIONALLY get a fastpath
error. i'd guess that it shows up once in every hundred LO requests. i've
verified that autocommit is set to false. the stack trace is shown here:

FastPath call returned ERROR: lo_tell: invalid large object descriptor (0)

at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:141)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
at org.postgresql.fastpath.Fastpath.getInteger(Fastpath.java:203)
at org.postgresql.largeobject.LargeObject.tell(LargeObject.java:232)
at org.postgresql.largeobject.LargeObject.size(LargeObject.java:247)
at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:370)
at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:580)
at (the rest is from my code)...

any thoughts?

thanks
chris

-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org]On Behalf Of Kovács Péter
Sent: Monday, July 30, 2001 3:12 AM
To: noselasd(at)frisurf(dot)no; daniel(dot)fisher(at)vt(dot)edu; Daniel Fisher;
pgsql-jdbc(at)postgresql(dot)org
Subject: RE: [JDBC] Large Objects

This would be the standard way of inserting Large Objects. But last time I
looked at it, it did not work with the jdbc implementation provided with
pgsql.

-----Original Message-----
From: Nils O. Selåsdal [mailto:noselasd(at)frisurf(dot)no]
Sent: Friday, July 27, 2001 9:44 PM
To: daniel(dot)fisher(at)vt(dot)edu; Daniel Fisher; pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] Large Objects

if you want to insert Large Objects, you need to use one of the setXXXStream

of the statement, not setBytes.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org


From: "chris markiewicz" <cmarkiew(at)commnav(dot)com>
To: <cmarkiew(at)commnav(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: errors while getting large objects...
Date: 2001-08-02 22:03:35
Message-ID: 017a01c11b9e$faef6420$77b846c6@cmarkiewicz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-jdbc

hello.

my application uses large objects frequently...to render the main page, it
might load anywhere from zero to 10 large objects - mostly images or
documents. recently i started stress testing this page (making it always
load many LOs) and i frequently encounter two different problems.

1. fastpath - autocommit is always false...i've verified this several times.
my current workaround is to catch the fastpath error and resubmit the
query...usually works on the second pass and rarely makes it to 4 passes
(the current limit i have set). i have included a stack trace at the bottom
of this message. does anyone have any ideas on this? i'm using 7.0.2 with
the 7.0-1.2 jdbc driver. the occurences seem totally random...sometimes a
page loads perfectly, sometimes i get three fastpath errors...sometimes the
first load gets FP erros, sometimes the fifth page does.

2. hanging - i recently noticed that the processing sometimes (pretty
frequently) hangs on the line of code that grabs the LO from the db...i've
tried both:

byte[] bytes = rs.getBytes(columnName);
and
InputStream is = rs.getBinaryStream(columnName);

Same result for both. It hangs indefinitely. Similar to the fastpath -
sometimes it happens, sometimes it doesn't...but it always happens within 5
screen loads of my stress test page.

does anyone know if these problems were fixed in recent versions of
postgresql? is anyone having similar problems? i greatly appreciate any
help!

thanks
chris

FastPath call returned ERROR: lo_tell: invalid large object descriptor (0)

at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:141)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
at org.postgresql.fastpath.Fastpath.getInteger(Fastpath.java:203)
at org.postgresql.largeobject.LargeObject.tell(LargeObject.java:232)
at org.postgresql.largeobject.LargeObject.size(LargeObject.java:247)
at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:370)
at org.postgresql.jdbc2.ResultSet.getBinaryStream(ResultSet.java:514)
at org.postgresql.jdbc2.ResultSet.getBinaryStream(ResultSet.java:616)
at
com.commnav.sbh.framework.persist.JDBCEngine.loadResultSet(JDBCEngine.java:4
40)
at com.commnav.sbh.framework.persist.JDBCEngine.load(JDBCEngine.java:284)
at
com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObject.j
ava:169)
at
com.commnav.sbh.framework.documentmanager.SBHDocument.loadComplex(SBHDocumen
t.java:586)
at
com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObject.j
ava:208)
at
com.commnav.sbh.applications.documentmanager.FavoriteDocumentIteratorTag.doS
tartTag(FavoriteDocumentIteratorTag.java:56)
at
apps.favorited_00025cuments._0002fapps_0002ffavoritedocuments_0002ffavorited
ocumentspidget_0002ejspfavoritedocumentspidget_jsp_24._jspService(_0002fapps
_0002ffavoritedocuments_0002ffavoritedocumentspidget_0002ejspfavoritedocumen
tspidget_jsp_24.java:392)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.include(RequestDispatcherImpl
.java:345)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:414)
at
_0002fdesktop_0002ejspdesktop_jsp_130._jspService(_0002fdesktop_0002ejspdesk
top_jsp_130.java:601)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
com.commnav.sbh.framework.navigation.handlers.NavigationHandlerImpl.execute(
NavigationHandlerImpl.java:39)
at
com.commnav.sbh.framework.navigation.Navigator.navigate(Navigator.java:80)
at com.commnav.sbh.servlets.ControlServlet.doPost(ControlServlet.java:132)
at com.commnav.sbh.servlets.ControlServlet.doGet(ControlServlet.java:63)
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:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)


From: "chris markiewicz" <cmarkiew(at)commnav(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Cc: <chris(dot)markiewicz(at)commnav(dot)com>
Subject: hangs while getting large objects...
Date: 2001-08-15 19:04:21
Message-ID: 002a01c125bd$18684da0$77b846c6@cmarkiewicz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-jdbc

hello. i occasionally have problems getting large objects from postgres. i
am confident that this problem is a problem with my code and not postgres
because i cannot find similar complaints and no one responded to my question
from earlier this month (appears later in this email).

I have a screen that loads several LOs (small images, mostly). Occasionally
the process hangs on the rs.getBytes() line. Does anyone know what could be
causing this?

Separately, I have written a simple program that queries the table with the
LOs. No problems - unless I run it while my application is hanging (then
the simple program hangs indefinitely as well). I am able to run queries
from the command line while this is going on, so it seems like the byte
stream is plugging things up, but everything else is fine.

Does anyone have any ideas what the problem could be? Everything works
perfectly 90% of the time, but 90% isn't that good. At this point, I'm not
even sure what to try. Are there any Postgres configuration changes I could
make? Would Postgres logging tell me anything.

I greatly appreciate your help. note - i'm running 7.0.3 on
linux...connecting through jdbc.

chris

-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org]On Behalf Of chris markiewicz
Sent: Thursday, August 02, 2001 6:04 PM
To: cmarkiew(at)commnav(dot)com; pgsql-jdbc(at)postgresql(dot)org
Subject: [JDBC] errors while getting large objects...

hello.

my application uses large objects frequently...to render the main page, it
might load anywhere from zero to 10 large objects - mostly images or
documents. recently i started stress testing this page (making it always
load many LOs) and i frequently encounter two different problems.

1. fastpath - autocommit is always false...i've verified this several times.
my current workaround is to catch the fastpath error and resubmit the
query...usually works on the second pass and rarely makes it to 4 passes
(the current limit i have set). i have included a stack trace at the bottom
of this message. does anyone have any ideas on this? i'm using 7.0.2 with
the 7.0-1.2 jdbc driver. the occurences seem totally random...sometimes a
page loads perfectly, sometimes i get three fastpath errors...sometimes the
first load gets FP erros, sometimes the fifth page does.

2. hanging - i recently noticed that the processing sometimes (pretty
frequently) hangs on the line of code that grabs the LO from the db...i've
tried both:

byte[] bytes = rs.getBytes(columnName);
and
InputStream is = rs.getBinaryStream(columnName);

Same result for both. It hangs indefinitely. Similar to the fastpath -
sometimes it happens, sometimes it doesn't...but it always happens within 5
screen loads of my stress test page.

does anyone know if these problems were fixed in recent versions of
postgresql? is anyone having similar problems? i greatly appreciate any
help!

thanks
chris

FastPath call returned ERROR: lo_tell: invalid large object descriptor (0)

at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:141)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
at org.postgresql.fastpath.Fastpath.getInteger(Fastpath.java:203)
at org.postgresql.largeobject.LargeObject.tell(LargeObject.java:232)
at org.postgresql.largeobject.LargeObject.size(LargeObject.java:247)
at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:370)
at org.postgresql.jdbc2.ResultSet.getBinaryStream(ResultSet.java:514)
at org.postgresql.jdbc2.ResultSet.getBinaryStream(ResultSet.java:616)
at
com.commnav.sbh.framework.persist.JDBCEngine.loadResultSet(JDBCEngine.java:4
40)
at com.commnav.sbh.framework.persist.JDBCEngine.load(JDBCEngine.java:284)
at
com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObject.j
ava:169)
at
com.commnav.sbh.framework.documentmanager.SBHDocument.loadComplex(SBHDocumen
t.java:586)
at
com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObject.j
ava:208)
at
com.commnav.sbh.applications.documentmanager.FavoriteDocumentIteratorTag.doS
tartTag(FavoriteDocumentIteratorTag.java:56)
at
apps.favorited_00025cuments._0002fapps_0002ffavoritedocuments_0002ffavorited
ocumentspidget_0002ejspfavoritedocumentspidget_jsp_24._jspService(_0002fapps
_0002ffavoritedocuments_0002ffavoritedocumentspidget_0002ejspfavoritedocumen
tspidget_jsp_24.java:392)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.include(RequestDispatcherImpl
.java:345)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:414)
at
_0002fdesktop_0002ejspdesktop_jsp_130._jspService(_0002fdesktop_0002ejspdesk
top_jsp_130.java:601)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
com.commnav.sbh.framework.navigation.handlers.NavigationHandlerImpl.execute(
NavigationHandlerImpl.java:39)
at
com.commnav.sbh.framework.navigation.Navigator.navigate(Navigator.java:80)
at com.commnav.sbh.servlets.ControlServlet.doPost(ControlServlet.java:132)
at com.commnav.sbh.servlets.ControlServlet.doGet(ControlServlet.java:63)
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:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org


From: Rene Pijlman <rpijlman(at)wanadoo(dot)nl>
To: <cmarkiew(at)commnav(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>, <chris(dot)markiewicz(at)commnav(dot)com>
Subject: Re: hangs while getting large objects...
Date: 2001-08-15 19:16:27
Message-ID: efilnt81s0n7aemo2cnldo3nuqsln1ratn@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-jdbc

On Wed, 15 Aug 2001 15:04:21 -0400, you wrote:
>i am confident that this problem is a problem with my code and not postgres

OK, so where is your code? A small isolated test case that
reproduces the problem would be best.

Since this appears to be JDBC-specific I did not cc
pgsql-general.

Regards,
René Pijlman


From: "Dave Cramer" <Dave(at)micro-automation(dot)net>
To: <cmarkiew(at)commnav(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Cc: <chris(dot)markiewicz(at)commnav(dot)com>
Subject: RE: [JDBC] hangs while getting large objects...
Date: 2001-08-15 19:26:12
Message-ID: 00c901c125c0$24fdb5c0$c201a8c0@inspiron
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-jdbc

Chris,

Try using the latest jar files from http://jdbc.fastcrypt.com

DAve

-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of chris markiewicz
Sent: August 15, 2001 3:04 PM
To: pgsql-jdbc(at)postgresql(dot)org; pgsql-general(at)postgresql(dot)org
Cc: chris(dot)markiewicz(at)commnav(dot)com
Subject: [JDBC] hangs while getting large objects...

hello. i occasionally have problems getting large objects from
postgres. i am confident that this problem is a problem with my code
and not postgres because i cannot find similar complaints and no one
responded to my question from earlier this month (appears later in this
email).

I have a screen that loads several LOs (small images, mostly).
Occasionally the process hangs on the rs.getBytes() line. Does anyone
know what could be causing this?

Separately, I have written a simple program that queries the table with
the LOs. No problems - unless I run it while my application is hanging
(then the simple program hangs indefinitely as well). I am able to run
queries from the command line while this is going on, so it seems like
the byte stream is plugging things up, but everything else is fine.

Does anyone have any ideas what the problem could be? Everything works
perfectly 90% of the time, but 90% isn't that good. At this point, I'm
not even sure what to try. Are there any Postgres configuration changes
I could make? Would Postgres logging tell me anything.

I greatly appreciate your help. note - i'm running 7.0.3 on
linux...connecting through jdbc.

chris

-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org]On Behalf Of chris markiewicz
Sent: Thursday, August 02, 2001 6:04 PM
To: cmarkiew(at)commnav(dot)com; pgsql-jdbc(at)postgresql(dot)org
Subject: [JDBC] errors while getting large objects...

hello.

my application uses large objects frequently...to render the main page,
it might load anywhere from zero to 10 large objects - mostly images or
documents. recently i started stress testing this page (making it
always load many LOs) and i frequently encounter two different problems.

1. fastpath - autocommit is always false...i've verified this several
times. my current workaround is to catch the fastpath error and resubmit
the query...usually works on the second pass and rarely makes it to 4
passes (the current limit i have set). i have included a stack trace at
the bottom of this message. does anyone have any ideas on this? i'm
using 7.0.2 with the 7.0-1.2 jdbc driver. the occurences seem totally
random...sometimes a page loads perfectly, sometimes i get three
fastpath errors...sometimes the first load gets FP erros, sometimes the
fifth page does.

2. hanging - i recently noticed that the processing sometimes (pretty
frequently) hangs on the line of code that grabs the LO from the
db...i've tried both:

byte[] bytes = rs.getBytes(columnName);
and
InputStream is = rs.getBinaryStream(columnName);

Same result for both. It hangs indefinitely. Similar to the fastpath -
sometimes it happens, sometimes it doesn't...but it always happens
within 5 screen loads of my stress test page.

does anyone know if these problems were fixed in recent versions of
postgresql? is anyone having similar problems? i greatly appreciate
any help!

thanks
chris

FastPath call returned ERROR: lo_tell: invalid large object descriptor
(0)

at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:141)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
at
org.postgresql.fastpath.Fastpath.getInteger(Fastpath.java:203)
at
org.postgresql.largeobject.LargeObject.tell(LargeObject.java:232)
at
org.postgresql.largeobject.LargeObject.size(LargeObject.java:247)
at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:370)
at
org.postgresql.jdbc2.ResultSet.getBinaryStream(ResultSet.java:514)
at
org.postgresql.jdbc2.ResultSet.getBinaryStream(ResultSet.java:616)
at
com.commnav.sbh.framework.persist.JDBCEngine.loadResultSet(JDBCEngine.ja
va:4
40)
at
com.commnav.sbh.framework.persist.JDBCEngine.load(JDBCEngine.java:284)
at
com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObje
ct.j
ava:169)
at
com.commnav.sbh.framework.documentmanager.SBHDocument.loadComplex(SBHDoc
umen
t.java:586)
at
com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObje
ct.j
ava:208)
at
com.commnav.sbh.applications.documentmanager.FavoriteDocumentIteratorTag
.doS
tartTag(FavoriteDocumentIteratorTag.java:56)
at
apps.favorited_00025cuments._0002fapps_0002ffavoritedocuments_0002ffavor
ited
ocumentspidget_0002ejspfavoritedocumentspidget_jsp_24._jspService(_0002f
apps
_0002ffavoritedocuments_0002ffavoritedocumentspidget_0002ejspfavoritedoc
umen
tspidget_jsp_24.java:392)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.ja
va:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.include(RequestDispatcher
Impl
.java:345)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:4
14)
at
_0002fdesktop_0002ejspdesktop_jsp_130._jspService(_0002fdesktop_0002ejsp
desk
top_jsp_130.java:601)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.ja
va:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher
Impl
.java:194)
at
com.commnav.sbh.framework.navigation.handlers.NavigationHandlerImpl.exec
ute(
NavigationHandlerImpl.java:39)
at
com.commnav.sbh.framework.navigation.Navigator.navigate(Navigator.java:8
0)
at
com.commnav.sbh.servlets.ControlServlet.doPost(ControlServlet.java:132)
at
com.commnav.sbh.servlets.ControlServlet.doGet(ControlServlet.java:63)
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:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
at java.lang.Thread.run(Thread.java:484)

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

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


From: "chris markiewicz" <cmarkiew(at)commnav(dot)com>
To: "'Rene Pijlman'" <rpijlman(at)wanadoo(dot)nl>, <Dave(at)micro-automation(dot)net>
Cc: <pgsql-jdbc(at)postgresql(dot)org>, <chris(dot)markiewicz(at)commnav(dot)com>
Subject: RE: hangs while getting large objects...
Date: 2001-08-15 20:16:01
Message-ID: 003401c125c7$1b37dcd0$77b846c6@cmarkiewicz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-jdbc

While I can readily reproduce it on my application, I have so far been
unsuccessful at writing a test case that reproduces the problem.

Oh, I just tried the latest drivers - no luck - same problem.

Equally unfortunate is the fact that all database processing is heavily
abstracted in the application - so there is no method that grabs a
connection, performs the query, iterates through the ResultSet, and closes
the rs/stmt/conn. I know that I am unlikely to find help unless I can
manage to reproduce the problem on an independent program, but I was hoping
that there might be some general LO or byte stream rule that I am not
following.

The area where is breaks is shown below. The method grabs the column name
from RS metadata and calls either getObject or getBytes. When it hangs, it
occurs on the getBytes(...) line.
Once it hangs, the system is essentially useless. My test program will
freeze when it reaches the particular row that the application is trying to
access. The application hangs on to the commection until I stop Tomcat.

I'll continue trying to reproduce in a separate program.

thanks
chris

if (sqlf.getGetType().equals("byte[]")) {
try {
System.out.println("JDBCE.getbytes (before)");
byte[] bytes = rs.getBytes(columnName);
System.out.println("JDBCE.getbytes (after)");
marshaller.setObjectField(o, sqlf.getMapField(), bytes);
} catch (Exception e) {
String exStr = e.toString();
//## create SBHException here so that it is logged
SBHException sbhex = new SBHException(e);
if (exStr.indexOf("FastPath") == -1) {
System.out.println("JDBCE.lrs NONFastPath error..."+exStr);
throw e;
} else {
System.out.println("JDBCE.lrs FastPath error..."+exStr);
throw new FastPathException(e);
}
}
} else {
result = rs.getObject(columnName);
marshaller.setObjectField(o, sqlf.getMapField(), result);
}