Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: Could Not Start The Tomcat Server After Commenting Out Realm
in the server.xml For Using JDBCRealm

Tim Funk

2003-10-09

Replies:

If your realm declaration is:
> <Realm
> className="org.apache.catalina.realm.JDBCRealm"
>       debug="99"
> driverName="org.gjt.mm.mysql.Driver"
> connectionURL="jdbc:mysql://localhost/authority"
> connectionName="test" connectionPassword="test"
>   userTable="users" userNameCol="user_name"
>               userCredCol="user_pass"
> userRoleTable="user_roles" roleNameCol="role_name" />

Then tomcat will try to connect to localhost for the database "authority"
with the user id and password being test. (If I read the props above
correctly). If that connection fails when the Realm is created (which is at
tomcat startup) - then tomcat will not startup.

-Tim

Caroline Jen wrote:

> Tim, sorry, I do not understand "Since you didn't
> replace your connection information with the dummy
> JDBCRealm placeholder, the connection failed to the
> database."
>
> Now, I am testing the Tomcat using the existing code
> in the server.xml file by simply removing the
> surroundinging <!-- and -->. (I understand what you
> said about &amp;)
>
> I could not start the Tomcat server.
>
> 1) I put <!-- and --> around the UserDababaseRealm as
> shown below:
>
> <!--
> <Realm
> className="org.apache.catalina.realm.UserDatabaseRealm"
>        debug="0"
> resourceName="UserDatabase"/>
> -->
>
> 2) I removed the <!-- and --> around the JDBCRealm
> for MySql (I do not insert any of my code, I simply
> use the existing code in the server.xml). See below:
>
> <Realm
> className="org.apache.catalina.realm.JDBCRealm"
>       debug="99"
> driverName="org.gjt.mm.mysql.Driver"
> connectionURL="jdbc:mysql://localhost/authority"
> connectionName="test" connectionPassword="test"
>   userTable="users" userNameCol="user_name"
>               userCredCol="user_pass"
> userRoleTable="user_roles" roleNameCol="role_name" />
>
> I saved the file and I could not start the Tomcat
> server.
>
> -Caroline
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.