你的jdbc.properties里写的是什么配置?

解决方案 »

  1.   

    #业务库 
    jdbc.biz.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
    jdbc.biz.url=jdbc:sqlserver://localhost:1433;databaseName=xxshop
    jdbc.biz.username=sa
    jdbc.biz.password=
    #连接池初始化连接数、连接池最小连接数、连接池最大连接数、连接池满时每次新建连接数
    jdbc.biz.initialPoolSize=1 
    jdbc.biz.minPoolSize=1
    jdbc.biz.maxPoolSize=30
    jdbc.biz.acquireIncrement=1
    #最大空闲时间、空闲连接测试间隔
    jdbc.biz.maxIdleTime=1200
    jdbc.biz.idleConnectionTestPeriod=600#会员卡
    jdbc.mbr.driver=com.sybase.jdbc3.jdbc.SybDriver
    jdbc.mbr.url=jdbc:sybase:Tds:192.168.1.100:5000/mbr?charset=cp936&language=us_english
    jdbc.mbr.username=sa
    jdbc.mbr.password=
    #连接池初始化连接数、连接池最小连接数、连接池最大连接数、连接池满时每次新建连接数
    jdbc.mbr.initialPoolSize=1 
    jdbc.mbr.minPoolSize=1
    jdbc.mbr.maxPoolSize=30
    jdbc.mbr.acquireIncrement=1
    #最大空闲时间、空闲连接测试间隔
    jdbc.mbr.maxIdleTime=1200
    jdbc.mbr.idleConnectionTestPeriod=600#储值卡
    jdbc.sav.driver=com.sybase.jdbc3.jdbc.SybDriver
    jdbc.sav.url=jdbc:sybase:Tds:192.168.1.100:5000/sav?charset=cp936&language=us_english
    jdbc.sav.username=sa
    jdbc.sav.password=
    #连接池初始化连接数、连接池最小连接数、连接池最大连接数、连接池满时每次新建连接数
    jdbc.sav.initialPoolSize=1 
    jdbc.sav.minPoolSize=1
    jdbc.sav.maxPoolSize=30
    jdbc.sav.acquireIncrement=1
    #最大空闲时间、空闲连接测试间隔
    jdbc.sav.maxIdleTime=1200
    jdbc.sav.idleConnectionTestPeriod=600
      

  2.   

    打成jar包放在D:\Program Files\Tomcat7.0.54\webapps\axis2\WEB-INF\lib,不过是另一个配置文件spring-config-biz.xml,部分内容
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:beans xmlns:xsd="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-3.2.xsd 
    http://www.springframework.org/schema/context  
         http://www.springframework.org/schema/context/spring-context-3.2.xsd 
         http://www.springframework.org/schema/aop  
         http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
         http://www.springframework.org/schema/tx 
         http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
    ">
    <!-- 配置业务库 -->
    <!-- "org.apache.commons.dbcp.BasicDataSource" -->
    <xsd:bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
    destroy-method="close">
    <xsd:property name="driverClass" value="${jdbc.biz.driver}" />
    <xsd:property name="jdbcUrl" value="${jdbc.biz.url}" />
    <xsd:property name="user" value="${jdbc.biz.username}" />
    <xsd:property name="password" value="${jdbc.biz.password}" />
    <xsd:property name="initialPoolSize" value="${jdbc.biz.initialPoolSize}" />
    <xsd:property name="minPoolSize" value="${jdbc.biz.minPoolSize}" />
    <xsd:property name="maxPoolSize" value="${jdbc.biz.maxPoolSize}" />
    <xsd:property name="acquireIncrement" value="${jdbc.biz.acquireIncrement}" />
    <xsd:property name="maxIdleTime" value="${jdbc.biz.maxIdleTime}" />
    <xsd:property name="idleConnectionTestPeriod" value="${jdbc.biz.idleConnectionTestPeriod}" />
    <xsd:property name="checkoutTimeout" value="3600" />
    <xsd:property name="acquireRetryAttempts" value="5" />
    <xsd:property name="automaticTestTable" value="C3P0TEST" />
    </xsd:bean>
    <!-- 配置mybatisFactory -->
      

  3.   

    别沉啊。而且之前貌似Tomcat6是没问题。
      

  4.   

    我刚才验证了一下tomcat6.0.41,是没问题的。
      

  5.   

    这个应该是你的属性文件没有读取到,${jdbc.biz.driver}无法解析导致的。
    可以把属性文件单独放到工程类路径下,单独解析试试。
      

  6.   

    莫名其妙的在WINXP上好了,但是WIN2003有问题