java调用mysql存储过程报权限方面错误

来源:互联网 发布:java 迭代器的实现 编辑:程序博客网 时间:2024/05/01 20:48

   在java中通过JDBC连接MySQL执行存储过程时报错:

    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.  

解决方式:

        配置文件hibernate.cfg.xml 链接数据库处添加 noAccessToProcedureBodies=true 

        <property name="connection.url">jdbc:mysql://192.168.11.104:3306/repeater?noAccessToProcedureBodies=true 
        </property>