I'm upgrading from tomcat 4.1.24 to tomcat 5.5.12 on WinXP. I have three 
applications that are deployed from this 
server, two of which work fine with tomcat 5.5.12, however the third which uses 
an oracle 9i database gives me the 
following error "javax.servlet.ServletException: Cannot create JDBC driver of 
class '' for connect URL 'null' ". 
Basically I've included the same details form the Tomcat4 server.xml file into 
the tomcat 5.5 server.xml, rediting 
where necessary.

Things I have tried..

Placing the context into fragment files located either inside the applications 
META-INF folder or under 
tomcat\conf\Catalina\localhost. Neither of these seemd to work for me as Tomcat 
could not find the apps, so I've 
left the context back in server.xml.
Rewriting the Resource params <parameter> as elements 
i.e.factory="com.ora.jsp.sql.DataSourceFactory"
Checked changed location of the JDBC jar file. classes12.jar 
catalina_home\common\lib\ AND 
catalina_home\webapps\[appname]\WEB-INF\lib
Checked changed the server.xml service-name and engine name to match previous 
TC4 server.xml version.
Added a Resourcelink element to the context - this is not present on the TC4 
version
Checked Tomcat logs.

I think that Tomcat is not able to read the <ResourceParams> element, which is 
why the URL and driverClass are 
NULL. 

Which When I checked the Tomcat log files shows ...

16-Aug-2007 09:25:46 org.apache.catalina.core.ApplicationContext log
SEVERE: action: Cannot create JDBC driver of class '' for connect URL 'null'

Background info 
Using Apache 2.0 with mod_JK to serve pages on port 80
Java version 1.5

**** server.xml ****

<!-- Tomcat 5.5 Example Server Configuration File -->

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

  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" 
debug="0"/>
  <Listener 
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" 
debug="0"/>
 
  <!-- Global JNDI resources -->
  <GlobalNamingResources>

    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>


    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml" ></Resource>

        
  </GlobalNamingResources>


  <Service name="Catalina">
   
    <Connector port="8009" 
               enableLookups="true" redirectPort="8443" protocol="AJP/1.3" />

    <Engine name="Catalina" defaultHost="opp-online" debug="0">

      
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
                         
          
      <Host name="opportunities-online" debug="0" appBase="webapps" >
      

        <Context path="/staff" docBase="oponline/staff" cookies="true" 
reloadable="true">
          <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="staff_access_log." suffix=".txt"
                 pattern="combined" resolveHosts="false"/>
                                 
          <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="oponline_log." suffix=".txt" 
timestamp="true"/> 
          
           <ResourceParams name="jdbc/oponline"
                     factory="com.ora.jsp.sql.DataSourceFactory"
                         user="myuser"
                         password="mypassword"
                         
dataSourceClassName="oracle.jdbc.pool.OracleConnectionCacheImpl"
                         
URL="jdbc:oracle:thin:@sas-test.myserver.ac.uk:1521:MYTE"
                         maxLimit="5" />
                  
             <!-- global resource for application's context. -->
             <!-- <ResourceLink name="/jdbc/oponline" global="/jdbc/oponline"
                        type="org.apache.catalina.UserDatabase"/> -->
                                    
        </Context>
        
      </Host>

    </Engine>

  </Service>

</Server>

*** end server.xml ***


*** App web.xml except ***

 <resource-ref>
    <description>
      JNDI DataSource for [appname] database.
      (From Oreilly "JavaServer Pages", Bergsten, 2nd Ed., page 485)
    </description>
    <res-ref-name>jdbc/oponline</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>

*** end web.xml ***


Thanks

Ian

-- 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to