I recently inherited maintenance/support of CAS 3.4.12 for my organization. I 
have no experience with CAS or even Spring really.  I've been reading the docs 
to try to get up to speed and haven't come across a solution to this particular 
problem. 

The scenario is this - the connection to the database goes down, CAS tries to 
connect and fails.  Connection to database comes back up.  CAS continues to 
fail until it is restarted.

In the logs I get: No more data to read from socket; nested exception is 
java.sql.SQLRecoverableException: No more data to read from socket

The connection setup in deployerConfigContext:

<bean id="productDataSource" class="org.apache.commons.dbcp.BasicDataSource">
      <property name="driverClassName">
        <value>${product.jdbc.driver.classname}</value>
      </property>
      <property name="url">
        <value>${product.jdbc.url}</value>
      </property>
      <property 
name="username"><value>${product.jdbc.username}</value></property>
      <property 
name="password"><value>${product.jdbc.password}</value></property>
    </bean>

product.jdbc.driver.classname = oracle.jdbc.driver.OracleDriver
product.jdbc.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=whatever)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=whatever)))

In my dev environment I tried changing it to:
<bean
    id="productDataSource"
    class="com.mchange.v2.c3p0.ComboPooledDataSource"
    p:driverClass="${product.jdbc.driver.classname}"
    p:jdbcUrl="${product.jdbc.url}"
    p:user="${product.jdbc.username}"
    p:password="${product.jdbc.password}"
    p:preferredTestQuery="select 1 from dual"
  />

I get the same behavior.


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to