tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Nix" <Jeremy....@sfsltd.com>
Subject Problems setting up JDBCStore
Date Mon, 08 Nov 2004 20:40:21 GMT
I'm having a little difficulty setting up the JDBCStore session
persistence layer.  Has anybody had a similar problem?  Or do you see
anyting wrong in my configuration.  Here's the error that I'm getting:

2004-11-08 15:32:11 JDBCStore[/test]: The database connection is null or
was found to be closed. Trying to re-open it.

My server.xml looks like this:

<Server port="8005" shutdown="SHUTDOWN" debug="0">

  <!-- Uncomment these entries to enable JMX MBeans support -->
  <Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>

	<!-- Global JNDI resources -->
	<GlobalNamingResources>

		<!-- Editable user database that can also be used by
		UserDatabaseRealm to authenticate users -->
		<Resource name="UserDatabase" auth="Container"
	
type="org.apache.catalina.UserDatabase"
					description="User database that
can be updated and saved">
		</Resource>
		<ResourceParams name="UserDatabase">
			<parameter>
				<name>factory</name>
	
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
			</parameter>
			<parameter>
				<name>pathname</name>
				<value>conf/tomcat-users.xml</value>
			</parameter>
		</ResourceParams>
	</GlobalNamingResources>
  
	<!-- Define the Tomcat Stand-Alone Service -->
	<Service name="Catalina">

		<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port
80 -->
		<Connector
className="org.apache.coyote.tomcat5.CoyoteConnector"
					address="10.0.2.130" port="80" 
					maxThreads="150"
minSpareThreads="25" maxSpareThreads="75"
					enableLookups="false"
redirectPort="443" acceptCount="100"
					debug="0" scheme="http"
connectionTimeout="20000"
					disableUploadTimeout="true" />

		<!-- Define a SSL Coyote HTTP/1.1 Connector on port 443
-->
		<Connector
className="org.apache.coyote.tomcat5.CoyoteConnector"
					address="10.0.2.130" port="443" 
					maxThreads="150"
minSpareThreads="25" maxSpareThreads="75"
					enableLookups="false"
redirectPort="443" acceptCount="100"
					debug="0" scheme="https"
secure="true" connectionTimeout="20000"
					disableUploadTimeout="true">
			<Factory
className="org.apache.coyote.tomcat5.CoyoteServerSocketFactory"
						clientAuth="false"
protocol="TLS"
	
keystoreFile="certs/phoenix.keystore"
						keystorePass="alpine" />
		</Connector>

		<!-- Define the top level container in our container
hierarchy -->
		<Engine name="Standalone" defaultHost="10.0.2.130"
debug="9" jvmRoute="tomcat1">

			<!-- This Realm uses the UserDatabase configured
in the global JNDI
				  resources under the key
"UserDatabase".  Any edits
				  that are performed against this
UserDatabase are immediately
				  available for use by the Realm.  -->
			<Realm
className="org.apache.catalina.realm.UserDatabaseRealm"
						debug="0"
resourceName="UserDatabase"/>

			  <!-- Global logger unless overridden at lower
levels -->
			  <Logger
className="org.apache.catalina.logger.FileLogger"
					  directory="logs"
prefix="catalina_log." suffix=".txt"
					  timestamp="true"
verbosity="4"/>

			<!-- Define the default virtual host -->
			<Host name="10.0.2.130" debug="0"
appBase="webapps"
						unpackWARs="true"
autoDeploy="false">
				<Alias>testphoenix.sfsltd.com</Alias>

				<!--Log stdout/stderr of host and
applications-->
				<Logger
className="org.apache.catalina.logger.FileLogger"
							directory="logs"
prefix="phoenix_log." suffix=".txt"
							timestamp="true"
verbosity="4"/>
				
				<!-- Log Access to host site -->
				<Valve
className="org.apache.catalina.valves.AccessLogValve"
							directory="logs"
prefix="phoenix_access_log." suffix=".txt"
							pattern="%t %a
--> %A:%p%U%q" resolveHosts="false"/>

				<!-- Root Context -->
				<Context path="" docBase="ROOT"
debug="0"/>
			</Host>
		</Engine>
	</Service>
</Server>

I have a context specified to test the JDBCStore.  It looks like this:

<Context path="/test" docBase="${catalina.home}/webapps/test" debug="0">
	<Manager
className="org.apache.catalina.session.PersistentManager" debug="0"
saveOnRestart="true">
		<Store className="org.apache.catalina.session.JDBCStore"
			driverName="com.inet.tds.TdsDriver"
	
connectionURL="jdbc:inetdae7a:hazeltine:1433?database=test&amp;appname=A
pacheTomcat&amp;user=ApacheTomcat&amp;password=tomcat123"
			sessionTable="tomcat_sessions"
			sessionAppCol="app_name"
			sessionIdCol="session_id"
			sessionDataCol="session_data"
			sessionValidCol="valid_session"
			sessionMaxInactiveCol="max_inactive"
			sessionLastAccessedCol="last_access"
			checkInterval="60"
			debug="99" />
	</Manager> 
</Context>

_________________________________
Jeremy Nix
Senior Application Developer
Southwest Financial Services, LTD.
(513) 621-6699 x1158
www.sfsltd.com



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message