You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by anuradha devi <da...@yahoo.com> on 2003/06/25 07:27:42 UTC

A Very Serious problem -- The cursor "SQLCUR7" is not in a prepared state

Hi all,
We are working on a web application which was
developed on OJB0.9.5.
The system is very well working normally.
When it comes performance testing, when 3 users tried
to hit the system concurrently with 2 as maximum no.
of connections at one point we got the following
exception.

[IBM][CLI Driver][DB2/NT] SQL0514N  The cursor
"SQLCUR7" is not in a prepared state.  SQLSTATE=26501

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI
Driver][DB2/NT] SQL0514N  The cursor "SQLCUR7" is not
in a prepared state.  SQLSTATE=26501

	at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:260)
	at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java(Compiled
Code))
	at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java(Compiled
Code))
	at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.java(Compiled
Code))
	at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(DB2PreparedStatement.java(Compiled
Code))
	at
com.ibm.ejs.cm.cache.CachedStatement.executeQuery(CachedStatement.java(Compiled
Code))
	at
com.ibm.ejs.cm.proxy.PreparedStatementProxy.executeQuery(PreparedStatementProxy.java(Compiled
Code))
	at
org.apache.ojb.broker.accesslayer.JdbcAccess.executeQuery(Unknown
Source)
	at
org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown
Source)
	at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getIteratorFromQuery(Unknown
Source)
	at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuery(Unknown
Source)
	at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuery(Unknown
Source)
	at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuery(Unknown
Source)
	at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuery(Unknown
Source)
	at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getObjectByQuery(Unknown
Source)
	at
com.tgt.hr.exm.business.dao.OJBPostOccupantDAO.findPostOccupantByEmpId(OJBPostOccupantDAO.java:99)
	at
com.tgt.hr.exm.business.process.MiscProcess.getName(MiscProcess.java:236)
	at
com.tgt.hr.exm.ui.action.BackToMenuAction.emPerform(BackToMenuAction.java:165)
	at
com.tgt.hr.exm.ui.action.AbstractEMAction.perform(AbstractEMAction.java:124)
	at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
	at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
	at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
	at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159)
	at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
	at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
	at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
	at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
	at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
	at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:499)
	at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
	at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
	at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
	at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
	at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
	at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
	at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
	at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
	at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
	at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
	at
com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)

This exception occured twice and when we saw the log
the two exceptions are one after the other and we feel
this could be with concurrent hit to the same method.

Because of this we are not able to pass our
performance testing.
Please tell us what to do to avoid these kind of
problems.

Thanks in advance..

ANU

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Re: A Very Serious problem -- The cursor "SQLCUR7" is not in a prepared state

Posted by anuradha devi <da...@yahoo.com>.
Hi Armin,
Thanks for your reply.
It is basically like this. I have two users who logged
on to my application and working on that parallely
that means two different PB instances and contexts.
It happened that both of them hit the same query at
the same time and we got this problem.
Is there any setting in ojb properties file or any
where for to avoid this concurrency problem.

Let me know if you want me to post the code snippets.

Thanks 
Anu
--- Armin Waibel <ar...@code-au-lait.de> wrote:
> Hi,
> 
> > This exception occured twice and when we saw the
> log
> > the two exceptions are one after the other and we
> feel
> > this could be with concurrent hit to the same
> method.
> >
> Could you explain a little more? code snip of the
> method?.
> Do you mean concurrent hit to the same method with
> different
> PB instances or do you use the same PB instance?
> 
> regards,
> Armin
> 
> ----- Original Message -----
> From: "anuradha devi" <da...@yahoo.com>
> To: <oj...@db.apache.org>
> Sent: Wednesday, June 25, 2003 7:27 AM
> Subject: A Very Serious problem -- The cursor
> "SQLCUR7" is not in a
> prepared state
> 
> 
> > Hi all,
> > We are working on a web application which was
> > developed on OJB0.9.5.
> > The system is very well working normally.
> > When it comes performance testing, when 3 users
> tried
> > to hit the system concurrently with 2 as maximum
> no.
> > of connections at one point we got the following
> > exception.
> >
> > [IBM][CLI Driver][DB2/NT] SQL0514N  The cursor
> > "SQLCUR7" is not in a prepared state. 
> SQLSTATE=26501
> >
> > COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI
> > Driver][DB2/NT] SQL0514N  The cursor "SQLCUR7" is
> not
> > in a prepared state.  SQLSTATE=26501
> >
> > at
> >
>
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExcepti
> onGenerator.java:260)
> > at
> >
>
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptio
> nGenerator.java(Compiled
> > Code))
> > at
> >
>
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptio
> nGenerator.java(Compiled
> > Code))
> > at
> >
>
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.
> java(Compiled
> > Code))
> > at
> >
>
COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(DB2PreparedStatem
> ent.java(Compiled
> > Code))
> > at
> >
>
com.ibm.ejs.cm.cache.CachedStatement.executeQuery(CachedStatement.java(C
> ompiled
> > Code))
> > at
> >
>
com.ibm.ejs.cm.proxy.PreparedStatementProxy.executeQuery(PreparedStateme
> ntProxy.java(Compiled
> > Code))
> > at
> >
>
org.apache.ojb.broker.accesslayer.JdbcAccess.executeQuery(Unknown
> > Source)
> > at
> >
>
org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown
> > Source)
> > at
> >
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getIteratorFromQuer
> y(Unknown
> > Source)
> > at
> >
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(Unknown
> > Source)
> > at
> >
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(Unknown
> > Source)
> > at
> >
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(Unknown
> > Source)
> > at
> >
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(Unknown
> > Source)
> > at
> >
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getObjectByQuery(Un
> known
> > Source)
> > at
> >
>
com.tgt.hr.exm.business.dao.OJBPostOccupantDAO.findPostOccupantByEmpId(O
> JBPostOccupantDAO.java:99)
> > at
> >
>
com.tgt.hr.exm.business.process.MiscProcess.getName(MiscProcess.java:236
> )
> > at
> >
>
com.tgt.hr.exm.ui.action.BackToMenuAction.emPerform(BackToMenuAction.jav
> a:165)
> > at
> >
>
com.tgt.hr.exm.ui.action.AbstractEMAction.perform(AbstractEMAction.java:
> 124)
> > at
> >
>
org.apache.struts.action.ActionServlet.processActionPerform(ActionServle
> t.java:1787)
> > at
> >
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
> > at
> >
>
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> > at
> >
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > at
> >
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
>
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletMan
> ager.java:827)
> > at
> >
>
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLife
> cycleServlet.java:159)
> > at
> >
>
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleSe
> rvlet.java:286)
> > at
> >
>
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifec
> ycleServlet.java:106)
> > at
> >
>
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.jav
> a:472)
> > at
> >
>
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(Servle
> tManager.java:1012)
> > at
> >
>
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletM
> anager.java:913)
> > at
> >
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispat
> ch(WebAppRequestDispatcher.java:499)
> > at
> >
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppReq
> uestDispatcher.java:278)
> > at
> >
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequ
> estDispatcher.java:105)
> > at
> >
>
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67
> )
> > at
> >
>
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvo
> ker.java:123)
> > at
> >
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Re: A Very Serious problem -- The cursor "SQLCUR7" is not in a prepared state

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi,

> This exception occured twice and when we saw the log
> the two exceptions are one after the other and we feel
> this could be with concurrent hit to the same method.
>
Could you explain a little more? code snip of the method?.
Do you mean concurrent hit to the same method with different
PB instances or do you use the same PB instance?

regards,
Armin

----- Original Message -----
From: "anuradha devi" <da...@yahoo.com>
To: <oj...@db.apache.org>
Sent: Wednesday, June 25, 2003 7:27 AM
Subject: A Very Serious problem -- The cursor "SQLCUR7" is not in a
prepared state


> Hi all,
> We are working on a web application which was
> developed on OJB0.9.5.
> The system is very well working normally.
> When it comes performance testing, when 3 users tried
> to hit the system concurrently with 2 as maximum no.
> of connections at one point we got the following
> exception.
>
> [IBM][CLI Driver][DB2/NT] SQL0514N  The cursor
> "SQLCUR7" is not in a prepared state.  SQLSTATE=26501
>
> COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI
> Driver][DB2/NT] SQL0514N  The cursor "SQLCUR7" is not
> in a prepared state.  SQLSTATE=26501
>
> at
>
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExcepti
onGenerator.java:260)
> at
>
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptio
nGenerator.java(Compiled
> Code))
> at
>
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptio
nGenerator.java(Compiled
> Code))
> at
>
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.
java(Compiled
> Code))
> at
>
COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(DB2PreparedStatem
ent.java(Compiled
> Code))
> at
>
com.ibm.ejs.cm.cache.CachedStatement.executeQuery(CachedStatement.java(C
ompiled
> Code))
> at
>
com.ibm.ejs.cm.proxy.PreparedStatementProxy.executeQuery(PreparedStateme
ntProxy.java(Compiled
> Code))
> at
> org.apache.ojb.broker.accesslayer.JdbcAccess.executeQuery(Unknown
> Source)
> at
> org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown
> Source)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getIteratorFromQuer
y(Unknown
> Source)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
y(Unknown
> Source)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
y(Unknown
> Source)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
y(Unknown
> Source)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
y(Unknown
> Source)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getObjectByQuery(Un
known
> Source)
> at
>
com.tgt.hr.exm.business.dao.OJBPostOccupantDAO.findPostOccupantByEmpId(O
JBPostOccupantDAO.java:99)
> at
>
com.tgt.hr.exm.business.process.MiscProcess.getName(MiscProcess.java:236
)
> at
>
com.tgt.hr.exm.ui.action.BackToMenuAction.emPerform(BackToMenuAction.jav
a:165)
> at
>
com.tgt.hr.exm.ui.action.AbstractEMAction.perform(AbstractEMAction.java:
124)
> at
>
org.apache.struts.action.ActionServlet.processActionPerform(ActionServle
t.java:1787)
> at
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
> at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletMan
ager.java:827)
> at
>
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLife
cycleServlet.java:159)
> at
>
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleSe
rvlet.java:286)
> at
>
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifec
ycleServlet.java:106)
> at
>
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.jav
a:472)
> at
>
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(Servle
tManager.java:1012)
> at
>
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletM
anager.java:913)
> at
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispat
ch(WebAppRequestDispatcher.java:499)
> at
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppReq
uestDispatcher.java:278)
> at
>
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequ
estDispatcher.java:105)
> at
>
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67
)
> at
>
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvo
ker.java:123)
> at
>
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(Cach
edInvocation.java:67)
> at
>
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(Servlet
RequestProcessor.java:122)
> at
>
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEList
ener.java:315)
> at
>
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnectio
n.java:60)
> at
>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
313)
> at
> com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
> at
> com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
>
> This exception occured twice and when we saw the log
> the two exceptions are one after the other and we feel
> this could be with concurrent hit to the same method.
>
> Because of this we are not able to pass our
> performance testing.
> Please tell us what to do to avoid these kind of
> problems.
>
> Thanks in advance..
>
> ANU
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>