You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Kevin Jackson <fo...@gmail.com> on 2008/12/15 10:28:48 UTC
tomcat-jdbc issue
Hi,
I'm using the new tomcat-jdbc connection pool with tomcat-6.0.18 on
windows server 2003 and SQL Server 2000 with the jtds driver
Sometimes when the db server is under heavy load, the following
exception is thrown:
root cause
java.lang.reflect.InvocationTargetException
sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:78)
$Proxy1.prepareStatement(Unknown Source)
This seems to be intermittent and I think it may be related to the
load on the db server (which we have problems with all the time).
Given that this is using reflection, I know it won't be as easy to add
logging etc to determine the cause, but is there a suggested tweak to
either this class or another class in the package that could aid in
confirming my suspicions that this is related to db load/network
timeouts etc.
Apart from this issue, this pool is as good as commons-dbcp and is a
great drop-in replacement
Thanks,
Kev
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: tomcat-jdbc issue
Posted by Kevin Jackson <fo...@gmail.com>.
Hi Filip,
> Are you sure that is all you see in your logs. We try to not swallow any
> error, and there should be more information.
Yes you were correct,
root cause
java.sql.SQLException: Invalid state, the Connection object is closed.
net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1634)
net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJDBC2.java:2328)
sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:78)
$Proxy1.prepareStatement(Unknown Source)
com.thehut.tabernus.service.SiteService.postPopulateBean(SiteService.java:75)
So it seems that the connection has been closed before the method is invoked
Kev
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: tomcat-jdbc issue
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
hi Kevin,
Are you sure that is all you see in your logs. We try to not swallow any
error, and there should be more information.
Adding logging is not an issue, we can do that fairly easily. However,
the trace you show us, is not the entire story, there is more,
you can ping me on email fhanik at apache dot org, if you want me to
deliver you a jar with logging enabled to track this down,
best
Filip
Kevin Jackson wrote:
> Hi,
>
> I'm using the new tomcat-jdbc connection pool with tomcat-6.0.18 on
> windows server 2003 and SQL Server 2000 with the jtds driver
>
> Sometimes when the db server is under heavy load, the following
> exception is thrown:
>
> root cause
>
> java.lang.reflect.InvocationTargetException
> sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:585)
> org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:78)
> $Proxy1.prepareStatement(Unknown Source)
>
> This seems to be intermittent and I think it may be related to the
> load on the db server (which we have problems with all the time).
>
> Given that this is using reflection, I know it won't be as easy to add
> logging etc to determine the cause, but is there a suggested tweak to
> either this class or another class in the package that could aid in
> confirming my suspicions that this is related to db load/network
> timeouts etc.
>
> Apart from this issue, this pool is as good as commons-dbcp and is a
> great drop-in replacement
>
> Thanks,
> Kev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org