mybatis 查询用户总个数时
报错

org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION eesy_mybatis.count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
### The error may exist in com/itheima/dao/IUserDao.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT count (id) FROM user
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION eesy_mybatis.count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manualat org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:77)at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:82)at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)at com.sun.proxy.$Proxy5.findUserCount(Unknown Source)at com.itheima.test.mybatis.testFindUserCount(mybatis.java:131)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)at org.junit.runners.ParentRunner.run(ParentRunner.java:300)at org.junit.runner.JUnitCore.run(JUnitCore.java:157)at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION eesy_mybatis.count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manualat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)at com.mysql.jdbc.Util.getInstance(Util.java:381)at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)at com.sun.proxy.$Proxy7.execute(Unknown Source)at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63)at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)... 34 more

原因:::

SELECT COUNT (id) FROM user

在SQL语句中 COUNT (id) count与(id)之间存在空格,去掉空格!!!!
即:

<select id="findUserCount" resultType="int">SELECT COUNT(id) FROM user</select>

解决!!

count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manu相关推荐

  1. FUNCTION xx.count does not exist. Check the ‘Function Name Parsing and Resolution‘ section in the Re

    今天项目查询总个数时报错 FUNCTION wx.count does not exist. Check the 'Function Name Parsing and Resolution' sect ...

  2. 1630 - FUNCTION XXXX.now does not exist. Check the 'Function Name Parsing and Resolution' section in

    1630 - FUNCTION ylxm2.now does not exist. Check the 'Function Name Parsing and Resolution' section i ...

  3. ERROR 1630 (42000): FUNCTION a.avg does not exist. Check the ‘Function Name Parsing and Resolution‘

    mysql查询语句在运行时报这个错误: 感觉不是语句的问题,但一直报错,查了一些其他方法,发现也没有用.最后仔细分析报错,说是不存在这个a.avg.然后继续摸索就发现是因为avg函数的问题. 需要给a ...

  4. >incorrect parameter count in the call to native function ‘updatexml‘

    此错误提示: >incorrect parameter count in the call to native function 'updatexml' 错误原因:在使用FIND_IN_SET时 ...

  5. 编译错误:In function `_sbrk_r‘:sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk‘

    问题描述: GCC编译过程中报错: In function `_sbrk_r': sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk' ...

  6. Incorrect parameter count in the call to native function ‘aes_decrypt‘

    背景 换了一个新的MySQL数据库,需要对原有的加密字段做解密操作,然后按照原来使用的解密函数做解密操作,但是一直提示上面的错误.因为MySQL数据库是8.0的版本,看了官方手册,说是需要在后面加一个 ...

  7. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:异常问题解析!

    首先遇到这样的问题,肯定是你的sql写错了,应该不用怀疑,虽然我把sql代码抽取出来在sql 单独运行了一遍,没有报错,但是还是sql语法的错误,下面先上错误的代码 <select id=&qu ...

  8. 异常记录:MyBatis(方法异常)FUNCTION xxx.sum does not exist

    异常信息为FUNCTION xxx.sum does not exist,意思为找不到sum()方法. 异常信息 java.sql.SQLSyntaxErrorException: FUNCTION ...

  9. SQLException错误码

    这里说的错误码是指SQLException.getErrorCode()返回的int类型错误码. 比如常见的有: // 1049 Unknown database // 1060 Duplicate ...

最新文章

  1. Web常见约定规范(精选)
  2. python 多进程——使用进程池,多进程消费的数据)是一个队列的时候,他会自动去队列里依次取数据...
  3. 量化策略研究员 - 工具篇
  4. Jboss7或者wildfly部署war包的问题
  5. Juice Extractor dp
  6. 演练 构造函数的显示调用与隐式调用 c# 1613715344
  7. 解决NVIDIA显卡驱动“没有找到兼容的图形硬件”的问题 [转]
  8. 用Jekyll生成网页部署的若干问题
  9. python爬取海量PPT模板,再也不用辛苦地找模板了
  10. Google 在遗忘权下删除了超过 17 万链接
  11. 国潮风彩色手绘年俗年画春节插画素材
  12. 小米手机3,小米手机4 官方移动稳定版最新 ROM V6.7.1.0.KXDCNCH
  13. word删除空白页面
  14. 校招:滴滴出行相关校招信息
  15. 笔记本电脑连接wifi显示无网络访问权限怎么办?
  16. 十年数据标注:缺席的独角兽与走不出的围城
  17. scala case语句中的中置表示法
  18. 永续合约系统开发功能亮点
  19. java实现以液晶字体显示当前时间
  20. 判断三个老师教哪门课命题c语言,语文教学论复习资料

热门文章

  1. 6-7 求链表的倒数第m个元素 (25 分)
  2. SMOTE/SMOTEEN 处理不平衡数据集
  3. HDU 6428 Problem C. Calculate(积性函数)
  4. ARC068C - Snuke Line
  5. CF455B A Lot of Games
  6. CF1592E Bored Bakry
  7. G List it all
  8. 牛客网【每日一题】4月21日题目精讲 糖糖别胡说,我真的不是签到题目
  9. 图中异色点对最短距离(最小生成树+线段树)
  10. [FFT/IFFT]快速傅里叶(逆)变化 + 递归和递推模板