yuyanjun340 2017-03-11 06:43 采纳率: 0%
浏览 1102

mybatis整合springmvc报数据库连接错误求解

oot cause

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))

The error may exist in cn/itcast/ssm/mapper/ItemsMapperCustom.xml

The error may involve cn.itcast.ssm.mapper.ItemsMapperCustom.findItemsList

The error occurred while executing a query

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))

org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
  • 写回答

2条回答 默认 最新

  • yuyanjun340 2017-03-11 06:45
    关注

    工程代码放在在虚拟机win10下跑没有问题,在我本机上一直报这个错误,数据库服务器连接的都是一样的地址

    评论

报告相同问题?