Question regarding Tomcat's JDBCStore

From: Xocomil (xocomil_1_at_hotmail.com)
Date: 06/30/04


Date: 30 Jun 2004 10:22:16 -0700

I am trying to implement Tomcat's JDBCStore to get some session
persistance across three servers that I am load-balancing. I am
running Tomcat 4.1 and Oracle 9i. My connection context in server.xml
is:

<Context path="" docBase="myDocBase..." debug="0">
        <Manager className="org.apache.catalina.session.PersistentManager"
                debug="999" saveOnRestart="true" maxActiveSessions="-1"
                minIdleSwap="-1" maxIdleSwap="-1" maxIdleBackup="1">
                        <Store className="org.apache.catalina.session.JDBCStore"
                        driverName="oracle.jdbc.driver.OracleDriver"
                        connectionURL="myConnectionString..."
                        sessionTable="tomcat$sessions"
                        sessionIdCol="id"
                        sessionDataCol="data"
                        sessionValidCol="valid"
                        sessionMaxInactiveCol="maxinactive"
                        sessionLastAccessedCol="lastaccess"
                        sessionAppCol="appname"
                        checkInterval="60"
                        debug="999"
                        />
        </Manager>
</Context>

Tomcat seems to connect just fine, but when trying to store my
sessions to the database I get the following errors in my log (or
something similar):

2004-06-30 10:29:32 PersistentManager[]: writeObject() storing session
C3B86F0980DE63689A8D296AF0161D41
2004-06-30 10:29:32 PersistentManager[]: storing attribute 'CARS'
with value 'com.ucoast.model.beans.CarBeanCollection@1706eb7'
2004-06-30 10:29:33 PersistentManager[]: storing attribute
'CARFINDERS' with value
'com.ucoast.model.beans.CarFinderBeanCollection@1fe4169'
2004-06-30 10:29:35 JDBCStore[]: SQL Error java.sql.SQLException: No
more data to read from socket
2004-06-30 10:29:35 JDBCStore[]: Saving Session
B86F0980DE63689A8D296AF0161D41 to database tomcat$sessions
2004-06-30 10:30:32 JDBCStore[]: SQL Error java.sql.SQLException: No
more data to read from socket

After this happens, I get a java.sql.SQLException: Io exception:
Broken pipe every time Tomcat tries to write to the database. Is there
something glaringly wrong with my set-up? Has anyone run into this
problem before that could point me in a good direction to troubleshoot
this? The error logs aren't very descriptive or helpful.



Relevant Pages

  • Re: servlet problems with session attributes
    ... I use session attributes to to preserve data across the ... >> session and to comunicate across servlet objects. ... >> restarting the Tomcat container! ... > one or two jsps and one or two servlets. ...
    (comp.lang.java.programmer)
  • Re: [OT] Ping the network and/or /Java/Lazlo gurus.
    ... that the session has died and start a new one. ... In the tomcat conf directory there is a file called tomcat-users.xml ... The important bit is to define the rolename (admin and manager allow ... you the individual session between the browser and the app - that gets ...
    (uk.rec.motorcycles)
  • Re: How to Maintain Sessions in Tomcat 4.1?
    ... try to invalidate the session after a specific time interval can solve ... tomcat or in your web.xml in webapps u declare the time out. ... > keeping it from recognizing subsequent visits by the same browser as ...
    (comp.lang.java.developer)
  • Re: servlet problems with session attributes
    ... > Robert Klemme wrote: ... >> Pep wrote: ... >>> I have a servlet application running in Tomcat that uses jsp forms ... >>> across the session and to comunicate across servlet objects. ...
    (comp.lang.java.programmer)
  • Re: [OT] Ping the network and/or /Java/Lazlo gurus.
    ... terminate the session. ... Tomcat session ID? ... Or java session ID? ... whether sessions change, which might explain why it's only ...
    (uk.rec.motorcycles)