Scott Edwards wrote:

>I have a JDBC Realm which is working fine as long as it is defined
>within the Engine. If I take that Realm definition and Cut-Paste it into
>the Context definition I get the contextConfig.missingRealm error logged
>out of ContextConfig.java.
>
>Is there some magic that needs to be imparted to the <Context> tag for
>the <Realm> tag to be recognized by the parser?
>
>Any help would be great.
>
>My server.xml looks like:
>
>  <!-- Define an Apache-Connector Service -->
>  <Service name="Tomcat-Apache">
>
>    <Connector
>className="org.apache.catalina.connector.warp.WarpConnector"
>     port="8008" minProcessors="5" maxProcessors="75"
>     enableLookups="true"
>     acceptCount="10" debug="0"/>
>
>    <!-- Replace "localhost" with what your Apache "ServerName" is set
>to -->
>    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
>     name="Apache" defaultHost="localhost" debug="0" appBase="webapps">
>
>      <!-- Global logger unless overridden at lower levels -->
>      <Logger className="org.apache.catalina.logger.FileLogger"
>              prefix="apache_log." suffix=".txt"
>              timestamp="true"/>
>
>            <Realm  className="org.apache.catalina.realm.JDBCRealm"
>debug="99"
>                   driverName="oracle.jdbc.driver.OracleDriver"
>               connectionName="tomcat"
>           connectionPassword="tomcat"
>
>connectionURL="jdbc:oracle:thin:@anakin.caresoft.com:1521:phdev1"
>                    userTable="users" userNameCol="user_name"
>userCredCol="password"
>                userRoleTable="user_roles" roleNameCol="user_role" />
>
>
>      <!-- Define the default virtual host -->
>      <Host name="localhost" debug="0" appBase="webapps"
>unpackWARs="true">
>
>
>
>        <!-- Access log processes all requests for this virtual host.
>By
>             default, log files are created in the "logs" directory
>relative to
>             $CATALINA_HOME.  If you wish, you can specify a different
>             directory with the "directory" attribute.  Specify either a
>relative
>             (to $CATALINA_HOME) or absolute path to the desired
>directory.
>        -->
>        <Valve className="org.apache.catalina.valves.AccessLogValve"
>                 directory="logs"  prefix="localhost_access_log."
>suffix=".txt"
>                 pattern="common"/>
>
>        <!-- Logger shared by all Contexts related to this virtual
>host.  By
>             default (when using FileLogger), log files are created in
>the "logs"
>             directory relative to $CATALINA_HOME.  If you wish, you can
>specify
>             a different directory with the "directory" attribute.
>Specify either a
>             relative (to $CATALINA_HOME) or absolute path to the
>desired
>             directory.-->
>        <Logger className="org.apache.catalina.logger.FileLogger"
>                 directory="logs"  prefix="localhost_log." suffix=".txt"
>
>         timestamp="true"/>
>
>        <!-- Define properties for each web application.  This is only
>needed
>             if you want to set non-default properties, or have web
>application
>             document roots in places other than the virtual host's
>appBase
>             directory.  -->
>
>        <!-- Explicit Phoenix Context -->
>        <Context path="" docBase="phoenix/" debug="99"
>reloadable="true"/>
>
>
>      </Host>
>
>    </Engine>
>
>If I move the Realm to within the Context like so:
>
>    <!-- Replace "localhost" with what your Apache "ServerName" is set
>to -->
>    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
>     name="Apache" defaultHost="localhost" debug="0" appBase="webapps">
>
>      <!-- Global logger unless overridden at lower levels -->
>      <Logger className="org.apache.catalina.logger.FileLogger"
>              prefix="apache_log." suffix=".txt"
>              timestamp="true"/>
>
>      <!-- Define the default virtual host -->
>      <Host name="localhost" debug="0" appBase="webapps"
>unpackWARs="true">
>
>
>
>        <!-- Access log processes all requests for this virtual host.
>By
>             default, log files are created in the "logs" directory
>relative to
>             $CATALINA_HOME.  If you wish, you can specify a different
>             directory with the "directory" attribute.  Specify either a
>relative
>             (to $CATALINA_HOME) or absolute path to the desired
>directory.
>        -->
>        <Valve className="org.apache.catalina.valves.AccessLogValve"
>                 directory="logs"  prefix="localhost_access_log."
>suffix=".txt"
>                 pattern="common"/>
>
>        <!-- Logger shared by all Contexts related to this virtual
>host.  By
>             default (when using FileLogger), log files are created in
>the "logs"
>             directory relative to $CATALINA_HOME.  If you wish, you can
>specify
>             a different directory with the "directory" attribute.
>Specify either a
>             relative (to $CATALINA_HOME) or absolute path to the
>desired
>             directory.-->
>        <Logger className="org.apache.catalina.logger.FileLogger"
>                 directory="logs"  prefix="localhost_log." suffix=".txt"
>
>         timestamp="true"/>
>
>        <!-- Define properties for each web application.  This is only
>needed
>             if you want to set non-default properties, or have web
>application
>             document roots in places other than the virtual host's
>appBase
>             directory.  -->
>
>        <!-- Explicit Phoenix Context -->
>        <Context path="" docBase="phoenix/" debug="99"
>reloadable="true">
>
>            <Realm  className="org.apache.catalina.realm.JDBCRealm"
>debug="99"
>                   driverName="oracle.jdbc.driver.OracleDriver"
>               connectionName="tomcat"
>           connectionPassword="tomcat"
>
>connectionURL="jdbc:oracle:thin:@anakin.caresoft.com:1521:phdev1"
>                    userTable="users" userNameCol="user_name"
>userCredCol="password"
>                userRoleTable="user_roles" roleNameCol="user_role" />
>  </Context>
>
>
>
>
>      </Host>
>
>    </Engine>
>
>Then the Realm is not recognized.
>
>Thanks,
>
>-Scott
>
>
>--
>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to