zoukankan      html  css  js  c++  java
  • Could not get JDBC Connection; nested exception is java.sql.SQLException: ${jdbc.driver}

    在一个SSM分布式项目中一个服务报错:

    ### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: ${jdbc.driver}
    ### The error may exist in com/pinyougou/mapper/TbGoodsMapper.xml
    ### The error may involve com.pinyougou.mapper.TbGoodsMapper.selectByPrimaryKey
    ### The error occurred while executing a query
    ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: ${jdbc.driver}
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
        ... 16 more

    获取不到数据池连接,其他service都好好的。最后发现是数据库配置文件没有读取的原因

    <!-- 加载配置文件 -->
        <context:property-placeholder location="classpath*:properties/*.properties" />
  • 相关阅读:
    win 8.1右键引起资源管理器重启
    lodash学习笔记之Array方法
    window下Ionic环境安装
    Ionic angular-ui-router小案例
    NPOI SetColumnHidden隐藏列不起作用的原因
    关于js隐式转换的有趣例子
    oracle中between and闭合性
    Javascript有那些奇技淫巧?
    PowerDesigner逆向工程连接服务器端oracle过程
    openlayers 添加 arcgis rest feature server 使用 vue cli+jsonp
  • 原文地址:https://www.cnblogs.com/zeussbook/p/11492530.html
Copyright © 2011-2022 走看看