I am attempting to use JDBC Realm as described in the Apress
book by James Goodwill. My os is RH 8.0. I'm using MySQL
4.0.12 and Connector/J 3.06. I am using Tomcat 4.0.6. I set
up a tomcatusers database and a test user as per the book.

I dropped mysql-connector-java-3.0.6-stable-bin.jar into
$TOMCAT_HOME/common/lib

I modified the server.xml file as follows:
     <!-- <Realm className="org.apache.catalina.realm.MemoryRealm" />
     -->

     <!-- Replace the above Realm with one of the following to get a Realm
          stored in a database and accessed via JDBC -->

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost/tomcatusers?user=test;password=test"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name"



I then attempt to go to http://localhost:8080/apress/login.jsp in my mozilla browser. Nothing happens. I go to check for a clue in the logs. This is what I get:

----- Root Cause -----
java.sql.SQLException: Server configuration denies access to data source
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:392)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1511)
at com.mysql.jdbc.Connection.<init>(Connection.java:485)
at com.mysql.jdbc.Driver.connect(Driver.java:341)
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:548)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at org.apache.catalina.core.StandardService.start(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


Anyone got any ideas how I can fix this?

Thanks.

Dean Hoover






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to