We've got the exact same issue in our environment at all.   Every time we
define a datasource, we have to restart Tomcat so that datasource can be
accessed.  Additionally, when using a traditional web server frontend, like
Apache or IIS, with mod_jk or mod_jk2, we have to restart the web server so
the mod_jk connector will restart and be able to use the datasources
available to the restarted Tomcat.   We were hoping using a web server
frontend with a mod_jk(2) connector would not require bouncing the web
server each time we bounced Tomcat but that's just not the case.   :(

Any ideas for solving this would be greatly appreciated.

Peace...

Tom



                                                                           
             "Chad Boyd"                                                   
             <[EMAIL PROTECTED]                                             
             .net>                                                      To 
                                       <[EMAIL PROTECTED]>    
             06/11/2004 12:38                                           cc 
             PM                                                            
                                                                   Subject 
                                       Database connection problems after  
             Please respond to         redeploying war                     
               "Tomcat Users                                               
                   List"                                                   
             <[EMAIL PROTECTED]                                             
              rta.apache.org>                                              
                                                                           
                                                                           




I'm having trouble accessing a database connection after war
redeployment.  I've read the documentation several times and went
through suggestions posted in the mailing lists, but nothing has worked.
I prefer the approach of having the context.xml file in the META-INF
directory in the war itself.  When I try this, I get the infamous
"Cannot create JDBC driver of class '' for connect URL 'null'" error
message.  When I put the <context> element back into the server.xml
file, everything is fine, except for the fact that I can't redeploy the
war file without restarting Tomcat.  This is very frustrating and
time-consuming.  Does anyone know why the context.xml file is not
working for me?  I've included the contents of this file below.  I'm
using Tomcat 5.0.19.

Thanks in advance.

Chad

<Context debug="0" docBase="h" path="/h" privileged="false"
reloadable="false">
<Logger className="org.apache.catalina.logger.FileLogger"
           prefix="localhost_h_log." suffix=".txt"
        timestamp="true"/>

        <Resource name="jdbc/myPool" auth="Container"
type="javax.sql.DataSource"/>

       <ResourceParams name="jdbc/myPool">
       <parameter>
         <name>factory</name>
         <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
       </parameter>
       <parameter>
         <name>maxActive</name>
         <value>100</value>
       </parameter>
       <parameter>
         <name>maxIdle</name>
         <value>30</value>
       </parameter>
       <parameter>
         <name>maxWait</name>
         <value>10000</value>
       </parameter>
       <parameter>
         <name>removeAbandoned</name>
         <value>true</value>
       </parameter>
       <parameter>
         <name>logAbandoned</name>
         <value>true</value>
       </parameter>
       <parameter>
         <name>username</name>
         <value>...</value>
         </parameter>
       <parameter>
         <name>password</name>
         <value>...</value>
         </parameter>
        <parameter>
         <name>driverClassName</name>
         <value>com.inet.tds.TdsDriver</value>
         </parameter>
        <parameter>
         <name>url</name>
         <value>...</value>
      </parameter>
       </ResourceParams>
</Context>



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

Reply via email to