文档章节

Parameter number X is not an OUT parameter

一路向北的兔斯基
 一路向北的兔斯基
发布于 2015/07/14 18:01
字数 578
阅读 203
收藏 0

开发过程中遇到这个问题,试着按网上的方式解决: http://blog.csdn.net/lutinghuan/article/details/9271311

只能说然并卵。

其实,有可能是连接mysql的用户没有procedure的执行权限导致的。 此次我碰到的问题就是这样,记录下来!

GRANT EXECUTE ON ichson_lore_source.* TO 'loresource_opr'@'%';
GRANT SELECT ON `mysql`.`proc` TO 'loresource_opr'@'%' 

没有授予EXECUTE的权限,也是报出如下的错误:

### Cause: java.sql.SQLException: Parameter number 2 is not an OUT parameter
; SQL []; Parameter number 2 is not an OUT parameter; nested exception is java.sql.SQLException: Parameter number 2 is not an OUT parameter
org.springframework.dao.TransientDataAccessResourceException: 
### Error querying database.  Cause: java.sql.SQLException: Parameter number 2 is not an OUT parameter
### The error may exist in file [/data/loresource-tomcat/work/Catalina/localhost/_/WEB-INF/classes/sql-mapping/sequence.xml]
### The error may involve com.ichson.loresource.repo.SequenceRepo.querySeq
### The error occurred while executing a query
### SQL: {call next_val(         ?,         ?,         ?,         ?         )}
### Cause: java.sql.SQLException: Parameter number 2 is not an OUT parameter
; SQL []; Parameter number 2 is not an OUT parameter; nested exception is java.sql.SQLException: Parameter number 2 is not an OUT parameter

如果不授予mysql.proc的权限,会报metadata没有权限的问题。

### Cause: java.sql.SQLException: User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configur
e connection with "noAccessToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.
; SQL []; User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with "noAcc
essToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.; nested exception is java.sql.SQLEx
ception: User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with "noAcce
ssToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.
org.springframework.dao.TransientDataAccessResourceException: 
### Error querying database.  Cause: java.sql.SQLException: User does not have access to metadata required to determine stored procedure parameter types. If rights ca
n not be granted, configure connection with "noAccessToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual pa
rameter types.
### The error may exist in file [/data/loresource-tomcat/work/Catalina/localhost/_/WEB-INF/classes/sql-mapping/sequence.xml]
### The error may involve com.ichson.loresource.repo.SequenceRepo.querySeq
### The error occurred while executing a query
### SQL: {call next_val(         ?,         ?,         ?,         ?         )}
### Cause: java.sql.SQLException: User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configur
e connection with "noAccessToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.
; SQL []; User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with "noAcc
essToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.; nested exception is java.sql.SQLEx
ception: 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.

© 著作权归作者所有

一路向北的兔斯基
粉丝 8
博文 67
码字总数 27256
作品 0
成都
高级程序员
私信 提问
oracle 性能优化 08_字典视图

性能查询相关视图 V$SYSMETRIC V$SYSMETRIC displays the system metric values captured for the most current time interval for both the long duration (60-second) and short duration ......

PeakFang-BOK
2018/10/15
0
0
ibatis/Mybatis 配备调用存储过程,jdbctype配置

ibatis 配置调用存储过程,jdbctype配置 数据库存储过程如下: procedure pprojectdetailsstat ( idatestart in varchar2, idateend in varchar2, irangestart in number, irangeend in numb......

0o清风徐来o0
2013/03/20
0
0
关于shell脚本的一些容易混淆的概念

$@和$*的区别 [lf@x201t~]$vim my_fun.sh #!/bin/bash # $@ and $* my_fun (){ echo "$#" } echo 'the number of parameter in "$@" is' $(my_fun "$@") echo 'the number of parameter in $......

xiguatian
2016/06/26
0
0
《Oracle PL/SQL开发指南》学习笔记30——源码调试——错误管理(第四部分,utl_call_stack包中的函数)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hpdlzu80100/article/details/84781760 utlcallstack包中的函数整理如下:...

预见未来to50
2018/12/03
0
0
Oracle process和sessions 解释

session: Because every login requires a session, this parameter effectively determines the maximum number of concurrent users in the system. You should always set this parameter......

lych528
2018/04/24
0
0

没有更多内容

加载失败,请刷新页面

加载更多

设计模式-简介

设计模式简介 设计模式(Design pattern)代表了最佳的实践,通常被有经验的面向对象的软件开发人员所采用。设计模式是软件开发人员在软件开发过程中面临的一般问题的解决方案。这些解决方案...

HOT_POT
16分钟前
0
0
SpringBoot版

使用外部Tomcat来启动程序,而不是用默认的Application的main()来启动。 因为,使用Application的main()来启动,修改页面的时候,刷新不会立即有反应。而是要make一下(Ctrl+F5) 而且还要加入...

流小文
20分钟前
0
0
Disable Autostart of MySQL Server on Ubuntu

OSC Markdown Editer 真香,笔记一篇,懒得转中文,如有表述问题,请不吝指出,先谢为敬! OS: Ubuntu 19.04 When the MySQL server is installed, it automatically started with the OS. I...

Iridium
42分钟前
2
0
OpenStack RDO + S3

Packstack(RDO) installation "sync db timeout" issue version: openstack-packstack-13.0.0-0.1.0rc1.el7.noarchopenstack-packstack-puppet-13.0.0-0.1.0rc1.el7.noarch add timeout =>......

Firxiao
44分钟前
2
0
java运算符的优先级

https://www.cnblogs.com/zjfjava/p/5996666.html

南桥北木
49分钟前
2
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部