In 80% of cases that I have worked on, OutOfMemoryErrors were
caused by the database layer, so that is another reason to
make sure you close all your statements, result sets, connections
when you are done with them.

Kind regards from 

Heinz
--
Dr. Heinz M. Kabutz (Maximum Solutions) 
Author of "The Java(tm) Specialists' Newsletter"
http://www.javaspecialists.co.za
Tel: +27 (83) 340-5633 



> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] Behalf Of Bruce Stewart
> Sent: 17 November 2005 18:38
> To: [email protected]
> Subject: [CTJUG Forum] Re: JDBC Sql deadlock Error
> 
> 
> 
> 1. Make sure that you are closing each connection in a 
> finally block when
> you're done with it - we had problems and had to go through 
> 180 reports
> putting in 'close' statements so that connections were 
> released back into
> the pool.
> 2. Also check your connection's autoCommit property value.  
> Is it 'true' or
> 'false'? ('true' is the default - I'm pretty sure) If it's 'false' you
> should be doing 'connection.commit' before you close it.
> 3. Your connection.islolationLevel is probably READ_COMMITED 
> (the default,
> and probably what you want) - setting it to READ_UNCOMMITTED 
> (at run time,
> where necessary, if that's all you need) would eliminate the risk of
> deadlocks - I'm assuming 'TaskDAO.listTaskData' only needs 
> 'read' access.
> 
> FWIW: We don't use the M$ driver - we're using the jtds driver (on
> sourceforge) and have no problems on a variety of SQL servers 
> (including one
> 64 bit server), including distributed transactions, so I can recommend
> it....;-).
> 
> ----- Original Message -----
> From: "mogammad noordien" <[EMAIL PROTECTED]>
> To: "CTJUG-Forum" <[email protected]>
> Sent: Thursday, November 17, 2005 10:32 AM
> Subject: [CTJUG Forum] JDBC Sql deadlock Error
> 
> 
> >
> >
> > Hi there
> >
> > Can anyone help me with the following problem.  I am running a
> Webwork(2.17)
> > application on tomcat 4.31 with SQL Server 2000 with serive 
> pack 4 on a XP
> > machine.  I am getting the following error in my tomcat logs.
> >
> > 2005-11-14 12:49:47,734 [TP-Processor3] INFO
> > com.opensymphony.xwork.ActionSupport - Invalid User or Password
> > 2005-11-14 12:51:38,125 [TP-Processor1] ERROR
> > com.opensymphony.xwork.ActionSupport - 
> [Microsoft][SQLServer 2000 Driver
> for
> > JDBC][SQLServer]Transaction (Process ID 51) was deadlocked on lock
> resources
> > with another process and has been chosen as the deadlock 
> victim. Rerun the
> > transaction.java.sql.SQLException: [Microsoft][SQLServer 
> 2000 Driver for
> > JDBC][SQLServer]Transaction (Process ID 51) was deadlocked on lock
> resources
> > with another process and has been chosen as the deadlock 
> victim. Rerun the
> > transaction.
> > at 
> com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
> > at 
> com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
> > at 
> com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown
> > Source)
> > at 
> com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown
> > Source)
> > at
> com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyTok
> en(Unknown
> > Source)
> > at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown
> Source)
> > at
> > 
> com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.sendCursorFe
> tch(Unknown
> > Source)
> > at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.getRow(Unknown
> Source)
> > at
> >
> com.microsoft.jdbc.sqlserver.SQLServerImplResultSetServerSideC
> ursor.position
> > Cursor(Unknown Source)
> > at com.microsoft.jdbc.base.BaseResultSet.next(Unknown Source)
> > at za.co.q3.pro_GMS.dao.TaskDAO.listTaskData(TaskDAO.java:736)
> > at za.co.q3.pro_GMS.dao.TaskDAO.listTask(TaskDAO.java:220)
> > at
> >
> za.co.q3.pro_GMS.action.AppMenuAction.buildTaskList(AppMenuAct
> ion.java:243)
> > at
> > 
> za.co.q3.pro_GMS.action.AppMenuAction.displayForm(AppMenuActio
> n.java:223)
> > at 
> za.co.q3.pro_GMS.action.AppMenuAction.execute(AppMenuAction.java:196)
> > at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invokeAction(De
> faultActionInv
> > ocation.java:283)
> > at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
> ctionInvocatio
> > n.java:166)
> > at
> >
> com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.
> intercept(Defa
> > ultWorkflowInterceptor.java:55)
> > at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
> ctionInvocatio
> > n.java:164)
> > at
> >
> com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
> (AroundInterce
> > ptor.java:35)
> > at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
> ctionInvocatio
> > n.java:164)
> > at
> >
> com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
> (AroundInterce
> > ptor.java:35)
> > at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
> ctionInvocatio
> > n.java:164)
> > at
> >
> com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
> (AroundInterce
> > ptor.java:35)
> > at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
> ctionInvocatio
> > n.java:164)
> > at
> >
> com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
> (AroundInterce
> > ptor.java:35)
> > at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
> ctionInvocatio
> > n.java:164)
> > at
> >
> com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
> (AroundInterce
> > ptor.java:35)
> > at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
> ctionInvocatio
> > n.java:164)
> > at
> >
> com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
> (AroundInterce
> > ptor.java:35)
> > at
> >
> com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
> ctionInvocatio
> > n.java:164)
> > at
> >
> com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActio
> nProxy.java:11
> > 6)
> > at
> >
> com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceA
> ction(ServletD
> > ispatcher.java:272)
> > at
> >
> com.opensymphony.webwork.dispatcher.ServletDispatcher.service(
> ServletDispatc
> > her.java:237)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Application
> > FilterChain.java:247)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterCh
> > ain.java:193)
> > at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.ja
> > va:256)
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> > eNext(StandardPipeline.java:643)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
> > at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.ja
> > va:191)
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> > eNext(StandardPipeline.java:643)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
> > at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > at
> > 
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2422)
> > at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:180
> > )
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> > eNext(StandardPipeline.java:643)
> > at
> >
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve.
> > java:171)
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> > eNext(StandardPipeline.java:641)
> > at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:163
> > )
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> > eNext(StandardPipeline.java:641)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
> > at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java
> > :174)
> > at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> > eNext(StandardPipeline.java:643)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
> > at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > at 
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
> java:199)
> > at 
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:324)
> > at 
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:395)
> > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
> > at
> >
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSo
> cket.java:615)
> > at 
> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
> > at
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.jav
> > a:683)
> > at java.lang.Thread.run(Thread.java:534)
> >
> > Does anyone know how to solve this???
> >
> >
> > Mogammad Noordien
> >
> > Developer
> > Third Quarter Technologies
> >
> >
> 
> 
> 

Reply via email to