zoukankan      html  css  js  c++  java
  • Mybatis调用存储过程报错

    Mybatis调用存储过程

    贴码

    1
    2
    3
    4
    5
    6
    Error querying database.  Cause: java.sql.SQLException: User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with "noAccessToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.
    The error may exist in resources/mapper/AgentStatisDao.xml
    The error may involve com.jiaxincloud.gw.statistics.dao.statist 大专栏  Mybatis调用存储过程报错ics.AgentStatisDao.callAgentVisitorManualStatisProcedure
    The error occurred while executing a query
    SQL: {CALL PRO_AGENT_VISITOR_MANUAL_STATIS(?,?,?)}
    Cause: java.sql.SQLException: User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with "noAccessToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.

    总结

    跟着这个错误在网上找了一下,原来是该用户没有调用存储过程的权限,所以只要赋予proc的权限即可,亲测成功。在MySql中执行如下命令,授予权限。(user@host 是连接数据库的用户名,修改成连接数据库的用户名就行)

    grant select on mysql.proc to user@host;
    flush privileges;
    
  • 相关阅读:
    Spark Streaming自定义接收器
    between-flink-and-storm-Spark
    Java class loader 类加载器
    Spark 学习文章
    英文读音
    分布式系统论文
    git 常用命令
    CPU Cache
    elasticsearch 索引延迟 一致性问题等
    spark join
  • 原文地址:https://www.cnblogs.com/lijianming180/p/12256368.html
Copyright © 2011-2022 走看看