org.springframework.jdbc.CannotGetJdbcConnectionException:无法获得JDBC连接;

时间:2013-10-22 20:19:36

标签: java spring hibernate jdbc

我收到以下错误:

意外的数据访问错误:

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Co
nnection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot
 create JDBC driver of class 'com.sybase.jdbc3.jdbc.SybDriver' for connect URL '
${jdbc.url}'

$ {jdbc.url}'的定义如下:

jdbc.url=jdbc:sybase:Tds:mtc-lpsybdb202:6306/df_xur
jdbc.user=AYB_VV_XURVAPS
jdbc.password=wsefsfsfdfffsdfsd

我的datasource.xml包含以下代码。

  <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd">

    <bean id="xxxxxDataSource" class="org.apache.commons.dbcp.BasicDataSource">
        <property name="driverClassName" value="com.sybase.jdbc3.jdbc.SybDriver" />
        <property name="url" value="${jdbc.url}" />
        <property name="username" value="${jdbc.user}" />
        <property name="password" value="${jdbc.password}" />



        <property name="initialSize">
            <value>2</value>
        </property>
        <property name="maxActive">
            <value>10</value>
        </property>
        <property name="maxIdle">
            <value>2</value>
        </property>
    </bean>

</beans>

请帮助我解决问题的根本原因...,希望驱动程序classw和版本我猜

0 个答案:

没有答案