remmons wrote:
>
> I am trying to use HSQLDB for container authentication in Tomcat. When
> I start Tomcat, I get this message in the catalina.YYYY-MM-DD.log:
>
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
> Aug 2, 2007 3:10:29 PM org.apache.catalina.realm.JDBCRealm start
> SEVERE: Exception opening database connection
> java.sql.SQLException: The database is already in use by another
> process: [EMAIL PROTECTED]
> =\\localhost\data\Auth.lck, exists=false, locked=false, valid=false, fl
> =null]: java.io.FileNotFoundException: \\localhost\data\Auth.lck (The
> network path was not found)
>
> Apparently, Tomcat cannot find my database files. Without success, I
> have located them in various places:
>
> webbapps/MyApp/WEB-INF/data
> webbapps/MyApp/WEB-INF/classes/data
> webbapps/MyApp/WEB-INF/lib/data
> webapps/data
>
> I am using the following connectionURL:
>
> connectionURL="jdbc:hsqldb://localhost/data/Auth"
>
> where Auth is the name of my HSQLDB database with the following files:
>
> data/Auth.log
> data/Auth.properties
> data/Auth.script
>
> I setup my realm in server.xml as follows:
>
> <Realm className="org.apache.catalina.realm.JDBCRealm"
> driverName="org.hsqldb.jdbcDriver"
> connectionURL="jdbc:hsqldb://localhost/data/Auth"
> connectionName="SA" connectionPassword=""
> userTable="USER" userNameCol="USERNAME"
> userCredCol="PASSWORD"
> userRoleTable="USER_ROLE" roleNameCol="ROLENAME" />
>
> Can someone tell me where to put the database files so Tomcat can find
> them? I am using Tomcat 5.5.
>
> --
> Robert Emmons, P.E., Aurigen Inc.
> [EMAIL PROTECTED], http://www.aurigen.com
> Computer Programming and Consulting
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: [email protected]
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
In case anyone is interested, I found the secrets to getting Tomcat to use
my HSQLDB database for container authentication:
* Locate hsqldb.jar in %CATALINA_HOME%/common/lib
* Locate the HSQLDB database files in webapps/myApp/data
* Use the following Realm element in server.xml:
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="org.hsqldb.jdbcDriver"
connectionURL="jdbc:hsqldb:data/Auth"
connectionName="SA" connectionPassword=""
userTable="USER" userNameCol="USERNAME" userCredCol="PASSWORD"
userRoleTable="USER_ROLE" roleNameCol="ROLENAME" />
That is the same Realm element as I used above, except for the
connectionURL:
* Correct: connectionURL="jdbc:hsqldb:data/Auth"
* Incorrect: connectionURL="jdbc:hsqldb:/localhoast/data/Auth"
--
View this message in context:
http://www.nabble.com/Using-HSQLDB-for-Authentication-tf4208687.html#a12293244
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]