有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java组织。springframework。jdbc。CannotGetJdbcConnectionException:无法获取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

我的数据源。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>

请帮我找出问题的根本原因。。。,我想是W和版本


共 (0) 个答案