From: | "chris markiewicz" <cmarkiew(at)commnav(dot)com> |
---|---|
To: | <cmarkiew(at)commnav(dot)com>, "'Postgres Jdbc \(E-mail\)'" <pgsql-jdbc-owner(at)postgresql(dot)org> |
Cc: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: error - NOTICE: current transaction...MORE DETAIL... |
Date: | 2001-09-04 17:39:36 |
Message-ID: | 006701c13568$914825a0$77b846c6@cmarkiewicz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
hello. i have some more details on this problem...i found the reference to
calling rollback when you get this sort of error.
(http://fts.postgresql.org/db/mw/msg.html?mid=1030879) i have started
doing that, but i am still getting the problem.
i have the setup shown below...i've learned that i can usually get around
the fastpath error if i try the query a few times...so i make it call up to
10 times if there is an error...the po.load() call runs the (SELECT
versionid, versionid, versioncomment, versionlabel, creatorid, documentid,
versionorder, datestamp, versioncontent FROM
document_version WHERE versionid = 1034272) query from the last message i
sent (see below)...if that throws an exception, i catch it, rollback, and
contine...i am still seeing the same behavior though...
public void loadComplex(User user) throws SBHException {
int iterations = 10;
try {
//## TODO:
//## occasionally get a fastpath exception here...try to
//## call load() as many as 10 times if there is an exception...
//## this is here only as a test...
//## chris markiewicz
int i = 0;
boolean exceptionfound = false;
boolean goodResult = false;
while (!goodResult && i < iterations) {
try {
i++;
dv = (DocumentVersion)po.load(versionid, user);
goodResult = true;
} catch (Exception e) {
System.out.println("SBHDocument.loadComplex exception
attempt:"+i);
try {po.rollback(user);} catch (Exception e3) {...log
here...}
exceptionfound = true;
Log.log("SBHDocument.loadComplex attempt:"+i);
Log.log("SBHDocument.loadComplex e:"+e);
if (i == (iterations - 1)) {
throw e;
}
}
}
if (exceptionfound) {
...log here...
}
} catch (TransactionException te) {
throw te;
} catch (SBHSecurityException sse) {
throw sse;
} catch (SBHException sbe) {
throw sbe;
} catch (Exception e) {
throw new SBHException(e);
}
}
here is the log calling that query many times:
DEBUG: StartTransactionCommand
DEBUG: query: SELECT versionid, versionid, versioncomment, versionlabel,
creatorid, documentid, versionorder, datestamp, versioncontent FROM
document_version WHERE versionid = 1034277
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT versionid, versionid, versioncomment, versionlabel,
creatorid, documentid, versionorder, datestamp, versioncontent FROM
document_version WHERE versionid = 1034277
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT versionid, versionid, versioncomment, versionlabel,
creatorid, documentid, versionorder, datestamp, versioncontent FROM
document_version WHERE versionid = 1034277
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT versionid, versionid, versioncomment, versionlabel,
creatorid, documentid, versionorder, datestamp, versioncontent FROM
document_version WHERE versionid = 1034277
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT versionid, versionid, versioncomment, versionlabel,
creatorid, documentid, versionorder, datestamp, versioncontent FROM
document_version WHERE versionid = 1034277
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
DEBUG: CommitTransactionCommand
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: Tuesday, September 04, 2001 11:42 AM
To: Postgres Jdbc (E-mail)
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: [JDBC] error - NOTICE: current transaction is aborted, queries
ignored until end of transaction block
Hello.
I have been having problems with postgresql large objects...i have been
searching the archives of this group and i have posted a question or two but
i have so far be unable to resolve the issues. right now, i have a screen
that loads a few LOs...they occasionally don't make it to the screen. i see
a couple of different errors in my log files (which i included below). i
turned on debugging (d2) and i see the following on many of my queries (see
below).
DEBUG: StartTransactionCommand
DEBUG: query: SELECT DISTINCT sbhd.timestamp AS "modifydate",
sbhd.versionid AS "versionid", sbhd.documentdescription AS
"sbhdocumentdescription", sbhd.maxversions AS "maxversions", sbhd.documentid
AS "sbhdocumentid", sbhd.hidden AS "hidden", sbhd.documentpath AS
"sbhdocumentpath", sbhd.parentid AS "parentid", sbhd.ownerid AS "ownerid",
sbhd.documentname AS "sbhdocumentname", sbhd.createtimestamp AS "createdate"
FROM document sbhd WHERE sbhd.documentpath =
'/cmarkiew/porsche/porsche_speedster.jpg'
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT versionid, versionid, versioncomment, versionlabel,
creatorid, documentid, versionorder, datestamp, versioncontent FROM
document_version WHERE versionid = 1034272
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: SELECT versionid, versionid, versioncomment, versionlabel,
creatorid, documentid, versionorder, datestamp, versioncontent FROM
document_version WHERE versionid = 1034272
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
DEBUG: CommitTransactionCommand
what causes the "current transaction is aborted, queries ignored until end
of transaction block?" the first query in the above debug block does not
load an LO, but the second one does. after the second query, seems like all
subsequent have that message...my log file starts getting a bunch of the
following:
No results were returned by the query.
at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:63)
at com.commnav.sbh.framework.persist.JDBCEngine.load(JDBCEngine.java:274)
at
com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObject.j
ava:169)
at
com.commnav.sbh.framework.documentmanager.SBHDocument.loadComplex(SBHDocumen
t.java:402)
at
com.commnav.sbh.framework.documentmanager.SBHDocument.getSBHDocument(SBHDocu
ment.java:363)
at
com.commnav.sbh.servlets.DocumentManager.doPost(DocumentManager.java:201)
at com.commnav.sbh.servlets.CommnavServlet.doGet(CommnavServlet.java:170)
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)
No results were returned by the query.
at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:63)
at com.commnav.sbh.framework.persist.JDBCEngine.load(JDBCEngine.java:274)
at
com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObject.j
ava:169)
at
com.commnav.sbh.framework.documentmanager.SBHDocument.loadComplex(SBHDocumen
t.java:402)
at
com.commnav.sbh.framework.documentmanager.SBHDocument.getSBHDocument(SBHDocu
ment.java:363)
at
com.commnav.sbh.servlets.DocumentManager.doPost(DocumentManager.java:201)
at com.commnav.sbh.servlets.CommnavServlet.doGet(CommnavServlet.java:170)
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)
what should i look for? can i get other information from logs (i think i
can raise the log level to 3 if it would help). i can send pieces of code,
but our data layer is pretty abstracted, so i don't know how much that would
help.
finally, an apology. i started a thread about this issue a few weeks ago
but got pulled onto some other stuff. i am determined to follow this until
i fix it this time.
i appreciate your help.
chris
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2001-09-04 17:40:36 | Re: [JDBC] Troubles using German Umlauts with JDBC |
Previous Message | Dave Cramer | 2001-09-04 17:22:33 | Re: Why JDBC 1? |