Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 10305
  • Last Modified:

Tomcat 4.0 Cannot create JDBC driver of class 'com.microsoft.jdbc.sqlserver.SQLServerDriver'

I'm trying to set up a JNDI connection to SQL Server on tomcat but get the error
org.apache.jasper.JasperException: Cannot create JDBC driver of class 'com.microsoft.jdbc.sqlserver.SQLServerDriver' for connect URL 'jdbc:microsoft:sqlserver//localhost:1433/;databasename=TDMM'

I can't see what I've got set wrong....

))) using the following jsp code:
<%@ page import="javax.naming.*,javax.sql.*,java.sql.*,com.microsoft.jdbc.sqlserver.*" %>
<html><head><title>DB Test</title></head><body>
<table>
  <%
      String st = "";
      String rt = "";
      Connection conn = null;      
      Context ctx = new InitialContext();
      DataSource ds =
            (DataSource)ctx.lookup(
               "java:comp/env/jdbc/TDMM");
        conn = ds.getConnection();
          if(conn != null)  {
            Statement stmt = conn.createStatement();
            ResultSet rst =
                stmt.executeQuery("Select * from SEARCHREPLACE_ID");
            while(rst.next()) {
            st = rst.getString("Replace_Text");
            rt = rst.getString("Search_Text");
  %>        
<tr><td><%=st%></td><td><%=rt%></td></tr>
 <%
            }
          }
        }
            conn.close();
  %>
</table></body></html>
))) mssqlserver.jar is in \Tomcat\common\lib (I tried it in \TDMM\WEB-INF\lib too, same error)
))) TDMM is up and running, I can connect to it via windows.
))) server.xml:
<Context path="/TDMM" docBase="TDMM" debug="5" reloadable="true">
  <Logger className="org.apache.catalina.logger.FileLogger"
             prefix="localhost_MigrationManager_SQLSERVER_log." suffix=".txt"
             timestamp="true"/>
  <Resource name="jdbc/TDMM"
               auth="Container"
               type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/TDMM">
    <parameter>
      <name>factory</name>
      <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
      <name>maxActive</name>
      <value>10</value>
    </parameter>
    <parameter>
      <name>maxIdle</name>
      <value>3</value>
    </parameter>
    <parameter>
      <name>maxWait</name>
      <value>10000</value>
    </parameter>
    <parameter>
     <name>username</name>
     <value>tdmm</value>
    </parameter>
    <parameter>
     <name>password</name>
     <value>tdmm</value>
    </parameter>
    <parameter>
       <name>driverClassName</name>
       <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
    </parameter>
    <parameter>
      <name>url</name>
      <value>jdbc:microsoft:sqlserver//localhost:1433/;databasename=MigrationManager</value>
    </parameter>
  </ResourceParams>
</Context>

)))>web.xml:
    <resource-ref>
        <description>SQL Server Connection</description>
        <res-ref-name>jdbc/TDMM</res-ref-name>
        <res-type>com.microsoft.jdbc.sqlserver.SQLServerDriver</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>


0
rsalzmann
Asked:
rsalzmann
1 Solution
 
rsalzmannAuthor Commented:
Here is a debug log output when starting Tomcat:

2004-08-10 11:13:03 StandardContext[/TDMM]: Starting
2004-08-10 11:13:03 StandardContext[/TDMM]: Processing start(), current available=false
2004-08-10 11:13:03 StandardContext[/TDMM]: Configuring default Resources
2004-08-10 11:13:03 StandardContext[/TDMM]: Configuring non-privileged default Loader
2004-08-10 11:13:03 StandardContext[/TDMM]: Configuring default Manager
2004-08-10 11:13:03 StandardContext[/TDMM]: Processing standard container startup
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploying class repositories to work directory C:\Tomcat\work\Standalone\localhost\TDMM
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy class files /WEB-INF/classes to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\classes
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/TableViewer.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\TableViewer.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/commons-beanutils.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\commons-beanutils.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/commons-collections.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\commons-collections.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/commons-digester.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\commons-digester.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/commons-fileupload.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\commons-fileupload.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/commons-lang.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\commons-lang.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/commons-logging.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\commons-logging.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/commons-validator.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\commons-validator.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/cos.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\cos.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/fileupload.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\fileupload.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/jakarta-oro.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\jakarta-oro.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/jaxen-full.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\jaxen-full.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/jstl.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\jstl.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/msbase.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\msbase.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/msutil.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\msutil.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/saxpath.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\saxpath.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/standard.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\standard.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Deploy JAR /WEB-INF/lib/struts.jar to C:\Tomcat\bin\..\webapps\TDMM\WEB-INF\lib\struts.jar
2004-08-10 11:13:03 WebappLoader[/TDMM]: Reloading checks are enabled for this Context
2004-08-10 11:13:03 ContextConfig[/TDMM]: ContextConfig: Processing START
2004-08-10 11:13:03 StandardContext[/TDMM]: Setting deployment descriptor public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
2004-08-10 11:13:03 StandardContext[/TDMM]: Setting deployment descriptor public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Accumulating TLD resource paths
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Scanning <taglib> elements in web.xml
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/struts-logic.tld' for URI '/WEB-INF/struts-logic.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/tdmm_tiles.tld' for URI '/WEB-INF/tdmm_tiles'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/struts-html.tld' for URI '/WEB-INF/struts-html.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/struts-bean.tld' for URI '/WEB-INF/struts-bean.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Scanning TLDs in /WEB-INF subdirectory
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/struts-bean.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/struts-html.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/struts-logic.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/struts-nested.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/struts-template.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/struts-tiles.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/tdmm_tiles.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Scanning JARs in /WEB-INF/lib subdirectory
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/TableViewer.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/commons-beanutils.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/commons-collections.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/commons-digester.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/commons-fileupload.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/commons-lang.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/commons-logging.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/commons-validator.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/cos.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/fileupload.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/jakarta-oro.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/jaxen-full.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/jstl.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/msbase.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/msutil.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/saxpath.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/standard.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:    Adding path '/WEB-INF/lib/struts.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/commons-beanutils.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning TLD at resource path '/WEB-INF/tdmm_tiles.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/saxpath.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/TableViewer.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/jakarta-oro.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning TLD at resource path '/WEB-INF/struts-tiles.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning TLD at resource path '/WEB-INF/struts-template.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/standard.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/x-rt.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/c.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/x.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/fmt-rt.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/sql.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/fmt.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/scriptfree.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/sql-rt.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/c-rt.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/permittedTaglibs.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning TLD at resource path '/WEB-INF/struts-bean.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/commons-collections.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/cos.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/commons-validator.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/commons-fileupload.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/msutil.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/jstl.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/fileupload.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/msbase.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning TLD at resource path '/WEB-INF/struts-html.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/commons-lang.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning TLD at resource path '/WEB-INF/struts-logic.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/commons-logging.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/jaxen-full.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/commons-digester.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning TLD at resource path '/WEB-INF/struts-nested.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:  Scanning JAR at resource path '/WEB-INF/lib/struts.jar'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/tlds/struts-bean.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/tlds/struts-html.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/tlds/struts-logic.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/tlds/struts-nested.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/tlds/struts-template.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]:   Processing TLD at 'META-INF/tlds/struts-tiles.tld'
2004-08-10 11:13:03 ContextConfig[/TDMM]: Pipline Configuration:
2004-08-10 11:13:03 ContextConfig[/TDMM]:   org.apache.catalina.core.StandardContextValve/1.0
2004-08-10 11:13:03 ContextConfig[/TDMM]: ======================
2004-08-10 11:13:03 NamingContextListener[/Standalone/localhost/TDMM]: Creating JNDI naming context
2004-08-10 11:13:03 NamingContextListener[/Standalone/localhost/TDMM]:   Resource parameters for jdbc/TDMMDB = null
2004-08-10 11:13:03 NamingContextListener[/Standalone/localhost/TDMM]:   Adding resource ref jdbc/TDMMDB
2004-08-10 11:13:03 NamingContextListener[/Standalone/localhost/TDMM]:   ResourceRef[className=com.microsoft.jdbc.sqlserver.SQLServerDriver,factoryClassLocation=null,factoryClassName=org.apache.naming.factory.ResourceFactory,{type=description,content=SQL Server Connection},{type=scope,content=Shareable},{type=auth,content=Container}]
2004-08-10 11:13:03 NamingContextListener[/Standalone/localhost/TDMM]:   Resource parameters for jdbc/TDMM = ResourceParams[name=jdbc/TDMM, parameters={factory=org.apache.commons.dbcp.BasicDataSourceFactory, url=jdbc:microsoft:sqlserver//localhost:1433/;databasename=MigrationManager, password=tdmm, maxWait=10000, maxActive=10, driverClassName=com.microsoft.jdbc.sqlserver.SQLServerDriver, username=tdmm, maxIdle=3}]
2004-08-10 11:13:03 NamingContextListener[/Standalone/localhost/TDMM]:   Adding resource ref jdbc/TDMM
2004-08-10 11:13:03 NamingContextListener[/Standalone/localhost/TDMM]:   ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factoryClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shareable},{type=auth,content=Container},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFactory},{type=url,content=jdbc:microsoft:sqlserver//localhost:1433/;databasename=MigrationManager},{type=password,content=tdmm},{type=maxWait,content=10000},{type=maxActive,content=10},{type=driverClassName,content=com.microsoft.jdbc.sqlserver.SQLServerDriver},{type=username,content=tdmm},{type=maxIdle,content=3}]
2004-08-10 11:13:03 NamingContextListener[/Standalone/localhost/TDMM]:   Resource parameters for UserTransaction = null
2004-08-10 11:13:03 StandardManager[/TDMM]: Seeding random number generator class java.security.SecureRandom
2004-08-10 11:13:03 StandardManager[/TDMM]: Seeding of random number generator has been completed
2004-08-10 11:13:03 StandardContext[/TDMM]: Posting standard context attributes
2004-08-10 11:13:03 StandardContext[/TDMM]: Configuring application event listeners
2004-08-10 11:13:03 StandardContext[/TDMM]: Sending application start events
2004-08-10 11:13:03 StandardContext[/TDMM]: Starting filters
2004-08-10 11:13:03 StandardWrapper[/TDMM:default]: Loading container servlet default
2004-08-10 11:13:04 action: []: Verifying ModuleConfig for this application module
2004-08-10 11:13:04 action: []: Invalid className org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn for PlugInConfig
2004-08-10 11:13:04 action: []: Verification of ModuleConfig has been completed
2004-08-10 11:13:04 StandardContext[/TDMM]: Servlet /TDMM threw load() exception
javax.servlet.ServletException: Fatal module configuration error, see previous messages
      at org.apache.struts.plugins.ModuleConfigVerifier.init(ModuleConfigVerifier.java:212)
      at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
      at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
      at javax.servlet.GenericServlet.init(GenericServlet.java:256)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
      at org.apache.catalina.core.StandardService.start(StandardService.java:497)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
      at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
      at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
      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:203)

2004-08-10 11:13:04 StandardWrapper[/TDMM:invoker]: Loading container servlet invoker
2004-08-10 11:13:04 Parent class loader is: WebappClassLoader
  available:
    Extension[org.apache.commons.beanutils, implementationVendor=Apache Software Foundation, implementationVersion=1.6, specificationVendor=Apache Software Foundation, specificationVersion=1.6]
    Extension[org.apache.commons.collections, implementationVendor=Apache Software Foundation, implementationVersion=2.1, specificationVendor=Apache Software Foundation, specificationVersion=2.1]
    Extension[org.apache.commons.digester, implementationVendor="Apache Software Foundation", implementationVersion="1.5", specificationVendor="Apache Software Foundation", specificationVersion="1.5"]
    Extension[commons-fileupload, implementationVendor=Apache Software Foundation, implementationVendorId=, implementationVersion=1.0, specificationVendor=Apache Software Foundation, specificationVersion=]
    Extension[commons-lang, implementationVendor=Apache Software Foundation, implementationVersion=1.0.1, specificationVendor=Apache Software Foundation, specificationVersion=1.0]
    Extension[org.apache.commons.logging, implementationVendor=Apache Software Foundation, implementationVersion=1.0.3, specificationVendor=Apache Software Foundation, specificationVersion=1.0]
    Extension[org.apache.commons.validator, implementationVendor=Apache Software Foundation, implementationVersion=1.0.2, specificationVendor=Apache Software Foundation, specificationVersion=1.0]
    Extension[commons-fileupload, implementationVendor=Apache Software Foundation, implementationVendorId=, implementationVersion=1.0, specificationVendor=Apache Software Foundation, specificationVersion=]
    Extension[org.jaxen, implementationVendor= bob mcwhirter & James Strachan., implementationVersion=1.0 FCS, specificationVendor=bob mcwhirter & James Strachan., specificationVersion=1.0 FCS]
    Extension[org.saxpath, implementationVendor= werken digital., implementationVersion=1.0, specificationVendor=werken digital., specificationVersion=1.0 FCS]
    Extension[Struts Framework, implementationVendor=Apache Software Foundation, implementationVendorId=org.apache, implementationVersion=1.1, specificationVendor=Apache Software Foundation, specificationVersion=1.1]
  delegate: false
  repositories:
    /WEB-INF/classes/
  required:
----------> Parent Classloader:
StandardClassLoader
  available:
  delegate: true
  repositories:
    file:C:\Tomcat\shared\classes\
  required:
----------> Parent Classloader:
StandardClassLoader
  available:
    Extension[org.apache.tools.ant, implementationVendor=Apache Software Foundation, implementationVersion=1.5.1, specificationVendor=Apache Software Foundation, specificationVersion=1.5.1]
    Extension[org.apache.commons.collections, implementationVendor=Apache Software Foundation, implementationVersion=1.1-dev, specificationVendor=Apache Software Foundation, specificationVersion=1.0]
    Extension[org.apache.commons.dbcp, implementationVendor=Apache Software Foundation, implementationVersion=1.0, specificationVendor=Apache Software Foundation, specificationVersion=1.0]
    Extension[org.apache.commons.logging, implementationVendor=Apache Software Foundation, implementationVersion=1.0.2, specificationVendor=Apache Software Foundation, specificationVersion=1.0]
    Extension[org.apache.commons.pool, implementationVendor=Apache Software Foundation, implementationVersion=1.0.1, specificationVendor=Apache Software Foundation, specificationVersion=1.0]
    Extension[javax.net.ssl, implementationVendor=Sun Microsystems, Inc., implementationVendorId=com.sun, implementationVersion=1.0.3_01, specificationVendor=Sun Microsystems, Inc., specificationVersion=1.0]
    Extension[javax.net.ssl, implementationVendor=Sun Microsystems, Inc., implementationVendorId=com.sun, implementationVersion=1.0.3_01, specificationVendor=Sun Microsystems, Inc., specificationVersion=1.0]
    Extension[javax.net.ssl, implementationVendor=Sun Microsystems, Inc., implementationVendorId=com.sun, implementationVersion=1.0.3_01, specificationVendor=Sun Microsystems, Inc., specificationVersion=1.0]
    Extension[javax.mail, implementationVendor=Sun Microsystems, Inc., implementationVendorId=com.sun, implementationVersion=1.2, specificationVendor=Sun Microsystems, Inc., specificationVersion=1.2]
  delegate: true
  repositories:
    file:C:\Tomcat\common\classes\
    file:C:\Tomcat\common\endorsed\xercesImpl.jar
    file:C:\Tomcat\common\endorsed\xmlParserAPIs.jar
    file:C:\Tomcat\common\lib\activation.jar
    file:C:\Tomcat\common\lib\ant.jar
    file:C:\Tomcat\common\lib\commons-collections.jar
    file:C:\Tomcat\common\lib\commons-dbcp.jar
    file:C:\Tomcat\common\lib\commons-logging-api.jar
    file:C:\Tomcat\common\lib\commons-pool.jar
    file:C:\Tomcat\common\lib\jasper-compiler.jar
    file:C:\Tomcat\common\lib\jasper-runtime.jar
    file:C:\Tomcat\common\lib\jcert.jar
    file:C:\Tomcat\common\lib\jdbc2_0-stdext.jar
    file:C:\Tomcat\common\lib\jndi.jar
    file:C:\Tomcat\common\lib\jnet.jar
    file:C:\Tomcat\common\lib\jsse.jar
    file:C:\Tomcat\common\lib\jta.jar
    file:C:\Tomcat\common\lib\mail.jar
    file:C:\Tomcat\common\lib\msbase.jar
    file:C:\Tomcat\common\lib\mssqlserver.jar
    file:C:\Tomcat\common\lib\msutil.jar
    file:C:\Tomcat\common\lib\naming-common.jar
    file:C:\Tomcat\common\lib\naming-factory.jar
    file:C:\Tomcat\common\lib\naming-resources.jar
    file:C:\Tomcat\common\lib\servlet.jar
    file:C:\Tomcat\common\lib\tools.jar
  required:
----------> Parent Classloader:
sun.misc.Launcher$AppClassLoader@e80a59



2004-08-10 11:13:04 Scratch dir for the JSP engine is: C:\Tomcat\work\Standalone\localhost\TDMM
2004-08-10 11:13:04 IMPORTANT: Do not modify the generated servlets
2004-08-10 11:13:04 StandardContext[/TDMM]: Starting completed
0
 
rama_krishna580Commented:
Hi,

Try out the changes as below...

<Resource name="jdbc/TestDB" auth="container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/TestDB">
<parameter>
<name>driverClassName</name>
<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:microsoft:sqlserver://brad:1433</value>
</parameter>
<parameter>
<name>username</name>
<value>TestDB</value>
</parameter>
<parameter>
<name>password</name>
<value>password</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>foo.bar.Driver</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30000</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>100</value>
</parameter>
</ResourceParams>

and here is the web.xml file:

<resource-ref>
<description>
Resource reference to a factory for java.sql.Connection
instances that may be used for talking to a particular
database that is configured in the server.xml file.
</description>
<res-ref-name>jdbc/TestDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

i hope it may help you...
best of luck...

R.K
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Simple Misconfiguration =Network Vulnerability

In this technical webinar, AlgoSec will present several examples of common misconfigurations; including a basic device change, business application connectivity changes, and data center migrations. Learn best practices to protect your business from attack.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now