> -----Original Message-----
> From: Stein, Eric [mailto:ste...@locustec.com]
> Sent: Tuesday, June 12, 2012 7:25 AM
> To: users@tomcat.apache.org
> Subject: FW: Quartz falling down on database restart
> 
> Sorry if this is a duplicate .. my email server was acting up yesterday so I 
> don't
> know if this went through.
> 
> Eric
> 
> -----Original Message-----
> From: Stein, Eric
> Sent: Monday, June 11, 2012 4:58 PM
> To: users@tomcat.apache.org
> Subject: Quartz falling down on database restart
> 
> I'm running a Quartz application in Tomcat 6.0.33. When my database
> bounces, Quartz starts throwing exceptions every time it tries a database
> operation. The common cause is:
> 
>     Caused by: java.sql.SQLException: Invalid state, the Connection object is
> closed.
>         at
> net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.ja
> va
> :1713) ~[jtds-1.2.4.jar:1.2.4]
>         at
> net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJ
> DB
> C2.java:2412) ~[jtds-1.2.4.jar:1.2.4]
>         at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
> ~[na:na]
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sor
> Impl.java:25) ~[na:1.6.0_23]
>         at java.lang.reflect.Method.invoke(Method.java:597)
> ~[na:1.6.0_23]
>         at
> org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java
> :
> 126) ~[tomcat-jdbc.jar:na]
>         at $Proxy0.prepareStatement(Unknown Source) ~[na:na]
>         at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
> ~[na:na]
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sor
> Impl.java:25) ~[na:1.6.0_23]
>         at java.lang.reflect.Method.invoke(Method.java:597)
> ~[na:1.6.0_23]
>         at
> org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandl
> er.invoke(AttributeRestoringConnectionInvocationHandler.java:73)
> ~[quartz-2.1.5.jar:na]
>         at $Proxy10.prepareStatement(Unknown Source) ~[na:na]
>         at
> org.quartz.impl.jdbcjobstore.StdJDBCDelegate.countMisfiredTriggersInStat
> e(StdJDBCDelegate.java:413) ~[quartz-2.1.5.jar:na]
>         at
> org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreS
> upport.java:3176) ~[quartz-2.1.5.jar:na]
>         ... 2 common frames omitted
> 
> 
> 
> In my [CATALINA_HOME]/conf/context.xml file, I've configured the
> datasource that Quartz is using:
> 
>          <Resource name="jdbc/MyResource"
>                    auth="Container"
> 
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>                    type="javax.sql.DataSource"
>                    driverClassName="net.sourceforge.jtds.jdbc.Driver"
> 
> url="jdbc:jtds:sqlserver://ms-sql-database:1433/MyDatabase"
>                    username="some_user"
>                    password="some_password"
>                    maxActive="20"
>                    maxIdle="10"
>                    maxWait="-1"
>                    validationQuery="select 1" />
> 

Eric, is testOnBorrow set to true?

-Brooke Hedrick

> 
> 
> I was told on the Quartz forum that the validationQuery was what quartz
> used "to trigger recovery of the connections", but that isn't happening.
> Is there some other tomcat-side configuration that I need for the validation
> queries? Alternately, is there some way to figure out what's going on?
> 
> Thanks,
> Eric Stein
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to