There's nothing really in my server.xml, but here it is:

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

  <!-- Define the Tomcat Stand-Alone Service -->
  <Service name="Tomcat-Standalone">

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="11009" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>

    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Standalone" defaultHost="localhost" debug="0">

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

      <!-- Because this Realm is here, an instance will be shared globally
-->

      <Realm className="org.apache.catalina.realm.MemoryRealm" />

      <!-- Define the default virtual host -->
      <Host name="localhost" debug="99" appBase="webapps" 
       unpackWARs="false" autoDeploy="true">

        <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="localhost_access_log."
suffix=".txt"
                 pattern="common"/>

        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
                timestamp="true"/>

      </Host>
    </Engine>
  </Service>
</Server>

If I use <Context path="/cct"...> in the file below - everything works fine
- it's only when I try to set my app as the root (default) context.

<Context path="/cct" docBase="cct" debug="99" >
    <Logger className="org.apache.catalina.logger.FileLogger" 
    prefix="cct_log." suffix=".txt" timestamp="true"/>
    <Realm className="org.apache.catalina.realm.JDBCRealm" 
        debug="99" driverName="oracle.jdbc.driver.OracleDriver" digest="SHA"

 
connectionURL="jdbc:oracle:thin:[EMAIL PROTECTED]:1521:cctprd" 
        userTable="user_sys_access" userNameCol="userid" 
        userCredCol="password" userRoleTable="user_role" 
        roleNameCol="role_name"/>
    <Resource name="jdbc/cctdb" auth="Container"
type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/cctdb">
        <parameter>
            <name>factory</name>
            <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
        </parameter>
        <!-- Maximum number of dB connections in pool. 
            Set to 0 for no limit. -->
        <parameter>
            <name>maxActive</name>
            <value>0</value>
        </parameter>
        <!-- Maximum number of idle dB connections to retain in pool.
            Set to 0 for no limit. -->
        <parameter>
            <name>maxIdle</name>
            <value>0</value>
        </parameter>
        <!-- Maximum time to wait for a dB connection to become available
             in ms, in this example 10 seconds. An Exception is thrown if
             this timeout is exceeded.  Set to -1 to wait indefinitely. -->
        <parameter>
            <name>maxWait</name>
            <value>10000</value>
        </parameter>
        <!-- Database username and password for connections  -->
        <parameter>
            <name>username</name>
            <value>cct_tool</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>password</value>
        </parameter>
        <!-- Class name for Oracle JDBC driver -->
        <parameter>
            <name>driverClassName</name>
            <value>oracle.jdbc.pool.OracleConnectionPoolDataSource</value>
        </parameter>
        <!-- The JDBC connection url for connecting to your db. -->
        <parameter>
            <name>url</name>
            <value>jdbc:oracle:thin:@10.31.41.14:1521:cctprd</value>
        </parameter>
        <parameter>
            <name>validationQuery</name>
            <value>SELECT 1 FROM DUAL</value>
        </parameter>
    </ResourceParams>
</Context>

> -----Original Message-----
> From: Filip Hanik [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 31, 2003 4:53 PM
> To: Tomcat Users List
> Subject: RE: [BUG?] Can't set my app as root app without errors
> 
> 
> are you sure this has to do with your ROOT context?
> This looks like an error with your JDBC driver. It tries to 
> load a class that isn't defined.
> 
> why don't you post your server.xml
> 
> Filip
> 
> -----Original Message-----
> From: Raible, Matt [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 31, 2003 3:43 PM
> To: [EMAIL PROTECTED]
> Subject: [BUG?] Can't set my app as root app without errors
> 
> 
> I can't seem to set my application (cct) as the root 
> application for Tomcat.
> If I use <Context path="" ...>, my app appears to load fine, 
> but then Tomcat
> seems to attempt to load it a second time, and I get the 
> following error:
> 
> WARN [main] JDBCExceptionReporter.logExceptions(35) | SQL Error: 0,
> SQLState: null
> ERROR [main] JDBCExceptionReporter.logExceptions(42) | Cannot 
> load JDBC
> driver class 'null'
> WARN [main] SessionFactoryImpl.<init>(163) | Could not obtain 
> connection
> metadata
> java.sql.SQLException: Cannot load JDBC driver class 'null'
> 
> From this, I assumed that Tomcat was trying to load my app 
> both at the root
> context path ("") and a context path that's the same as the directory
> ("/cct").  So I created a second xml file in webapps, and 
> named it cct2.xml
> and changed the path to "/cct".  I don't get the error above, 
> but the app
> does indeed load twice.  I was hoping I could turn off this
> load-the-second-one behavior by changing unpackWARs and/or 
> autoDeploy to
> false on my <Host> element, but no such luck.  Is there a way 
> to fix this?
> 
> I can successfully use the app at http://localhost/, but I'd 
> rather not see
> these errors, and I'd rather not see it load twice.  
> 
> I'm using Tomcat 4.1.18, JDK 1.4.1_01 on Win2K and RedHat 8.0.
> 
> I can enter a bug in bugzilla if this is indeed a bug.
> 
> Thanks,
> 
> Matt
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to