Tomcat 5 on the connection pool configuration, that was it

2010-05-15  来源:本站原创  分类:Java  人气:196 

Goes to the company not want to work overtime to do so took them back home to do a demo project, put a good SQLSERVER2005, import the project, with the company's existing connection pool configuration xml files you renamed in change ready to start, did not think Tomcat startup actually reported wrong:

Cannot create JDBC driver of class''for connect URL 'null'

xml configuration files used in the company's Haohao De ah, online to find a solution, there is said to change server.xml, there are said to change references in the web.xml inside Canada, there are said to be in the META-INF folder Construction context.xml, and all tried again, still reported the same error. Later, according to an article that, in Tomcat's Admin page in with the data source, then modify the server.xml, in the localhost folder, press articles added to the sample project xml file, also web.xml Riga reference, start Tomcat, actually become. Carefully checked and found examples of the localhost folder of xml and xml using different company:

Company:

<Context docBase="Y:\MyEclipse 6.6\workspace\aaaaaaa\docroot" path="/aaaaaaa" reloadable="false">
        <Resource name="com.dayang.datasource.imam" auth="Container" type="javax.sql.DataSource"/>
        <ResourceParams name="com.dayang.datasource.imam">
           <parameter>
             <name>username</name>
             <value>sa</value>
           </parameter>
           <parameter>
             <name>password</name>
             <value>aaaa</value>
           </parameter>
           <parameter>
             <name>driverClassName</name>
             <value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value>
           </parameter>
           <parameter>
             <name>url</name>
             <value>jdbc:sqlserver://127.0.0.1:1433;DatabaseName=bbbbb;SelectMethod=cursor</value>
           </parameter>
        </ResourceParams>
</Context>

Examples:

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="Y:\MyEclipse 6.6\workspace\aaaaaaa\docroot" path="/aaaaaaa" reloadable="false">
    <Resource
      name="com.dayang.datasource.dyusermanager"
      type="javax.sql.DataSource"
      driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
      url="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=bbbbb;SelectMethod=cursor"
      password="aaaa"
      username="sa"/>
    </Context>

The difference is that the company's data source configuration properties written in <ResourceParams>, the sample was directly as <Resource> properties.

Server.xml file and then tried to <GlobalNamingResources> deleted in the data source configuration, web.xml in the data source reference to be deleted, META-INF context.xml inside also deleted, as the company's environment on did these things, restart Tomcat, actually can be used normally. It seems the data source only works in localhost established under the corresponding xml file on the line, but must pay attention to the data source property should be written in the Resource element.

Do not know why the company's xml file at home, not take, it may be that the local Mo configuration on it, and now the method may not Guifan, regardless of the first, Neng up Jiu-line at home Pao:)

相关文章
  • Tomcat 5 on the connection pool configuration, that was it 2010-05-15

    Goes to the company not want to work overtime to do so took them back home to do a demo project, put a good SQLSERVER2005, import the project, with the company's existing connection pool configuration xml files you renamed in change ready to start, d

  • Tomcat 5.0-5.5 Connection Pool Configuration Guide 2010-09-16

    In this paper, the most popular MySQL, for example, explain the Tomcat connection pool through the basic steps to connect MySQL database, if you know MySQL can skip the first step. Tomcat connection pool configuration before making first unzip mysql-

  • How to connect sql server database connection pool configuration Tomcat 2010-02-24

    How to connect SQL Server database (Tomcat connection pool configuration) (reproduced) Source: http://www.blogjava.net/guming123416/articles/28002.html Version is relatively new, on-line many are saying is Tomcat 4, this is 5.0. How to connect SQL Se

  • Tomcat connection pool configuration and connection failure problem solving 2010-05-07

    In the tomcat's conf directory, add file context.xml, the configuration of this file will take effect in all applications. Add a JNDI connection pool configuration to mysql as an example: <Resource name="jdbc/gamehall2" auth="Container&q

  • tomcat connection pool configuration 2010-10-27

    # Tomcat6.0 connection pool configuration 1. Configuration under tomcat context.xml under the conf file, add the connection pool configuration in between: <Resource name = "jdbc / oracle" auth = "Container" type = "javax.sql.Da

  • Tomcat + mysql connection pool configuration and testing 2011-09-14

    [Share Please indicate the source] Dragon Alliance: Internet Patrol Tomcat + mysql connection pool configuration and testing Environment: Tomcat6.0.18 Mysql: 5.1.36 Windwos XP sp2 Recently needed to use Tomcat + mysql connection pool configuration, a

  • Tomcat 6 through JDBC connection pool to connect SQL Server 2000 and MySQL 5 settings 2010-05-27

    SQL Server 2000 connection pool configuration is as follows according to the order operation 1. Download SQL Server 2000 JDBC Driver on \ Tomcat6 \ lib, I am now using msbase.jar, mssqlserver.jar, msutil.jar these three documents 2. In Tomcat 6.0 \ w

  • java Access connection pool configuration 2010-06-09

    System is a small system, then use the Access database. For nowadays the most common database, Oracle, SQL Server, Mysql, Access database, the first three have provided JDBC driver, but Access was not provided, to date, though no official announcemen

  • spring in the connection pool configuration 2011-04-30

    In the default configuration, generated by myeclipse, spring using the dbcp connection pool apache <Bean class = "org.apache.commons.dbcp.BasicDataSource"> <Property name = "driverClassName" value = "com.mysql.jdbc.Driver

  • tomcat6 database connection pool configuration in detail 2011-09-08

    tomcat6 database connection pool configuration in detail I first explain the configuration of the environment under tomcat version is apache-tomcat-6.0.33 non-installation version, the path is D: \ Java \ apache-tomcat-6.0.33, tomcat does not affect

  • Hibernate connection pool configuration 2009-02-27

    Hibernate connection pool configuration <! - Jdbc -> <property name="connection.driver_class"> oracle.jdbc.driver.OracleDriver </ property> <property name="connection.url"> jdbc: oracle: thin: @ 10.203.14.132:15

  • Hibernate support package DBCP database connection pool configuration 2009-04-09

    Hibernate support package DBCP database connection pool configuration. A brief description of the configuration process: (Just a personal feeling, if questions are welcome to show) Required packages: Commons-Pool (download Address: http://jakarta.apa

  • C3P0 connection pool configuration in detail 2009-02-23

    C3P0 connection pool configuration in detail Hibernate 2009-10-08 11:12:12 Read 10 Comments 0 Adjust Font Size: <c3p0-config> <default-config> "! - When the connection pool exhaustion when the c3p0 connection to obtain the number of conne

  • Using spring + hibernate configuration dbcp connection pool configuration exception parsing 2009-04-08

    Using spring + hibernate configuration dbcp connection pool configuration exception occurred parsing the first imported spring, hibernate's jar package hibernate-distribution-3.3.2.GA-dist spring-framework-2.5.6.SEC01-with-dependencies The establishm

  • Several database connection pool configuration and implementation 2010-03-24

    <resource-ref> <res-ref-name>jdbc/JDBCTEST</res-ref-name> <res-type>javax.sql.DataSource</res-type> <init-param driver-name="com.microsoft.jdbc.sqlserver.SQLServerDriver"/> <init-param url="jdbc:micros

  • Weblogic access oracle database connection pool configuration (change) 2010-03-29

    Sql Code Weblogic access oracle database connection pool can be used three kinds of ways to configure JDBC One in the weblogic console in accordance with the following configuration to establish connection pool, and modify the file startWeblogic.cmd

  • Weblogic access the oracle database connection pool configuration (change) 2010-03-29

    Sql Code Weblogic access the oracle database connection pool can be configured in three ways JDBC One in the weblogic console in accordance with the following configuration to establish connection pool, and modify startWeblogic.cmd file 1 weblogic wa

  • hibernate connection pool configuration proxool 2010-04-20

    I have been using proxool the connection pool to sun drying out, huh, huh. Here is the code hibernate configuration file: <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration D

  • Weblogic access the oracle database connection pool configuration 2010-04-20

    Weblogic access the oracle database connection pool configuration in Weblogic access oracle database JDBC connection pool in three ways you can configure one in the weblogic console in accordance with the following configuration to establish connecti

  • java tomcat connection pool configuration of specific operational meaning? 2010-07-30

    Want to understand, the use of the data source and connection pool meaning of the specific operation . Did not find a lot of information described in detail, would like to ask you some questions about the next . As : One way : In the tomcat's context