NutzCN Logo
问答 执行存储过程报错configure connection with "noAccessToProcedureBodies=true"
发布于 2386天前 作者 hanjieliao 2838 次浏览 复制 上一个帖子 下一个帖子
标签:
org.nutz.dao.DaoException: !Nutz SQL Error: 'CALL proc_game_videobet(0, 0, 0, 'cmkj_test01', '2018-06-10 16:00:00', '2018-06-11 16:00:00', 0, 0, 0, true, '', 14, 1, 4)'
PreparedStatement: 
'CALL proc_game_videobet(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'
CaseMessage=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.
        at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:104) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:159) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:126) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:93) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:82) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.impl.DaoSupport.execute(DaoSupport.java:236) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.impl.NutDao.execute(NutDao.java:1008) ~[nutz-1.r.65.jar:1.r.65]
        at org.cmkj.services.module.report.repository.ReportRepository.queryVideoBetting(ReportRepository.java:55) ~[game-services-2.0.jar:?]
        at org.cmkj.gateway.module.report.serviceImpl.ReportServiceImpl.queryGameResult(ReportServiceImpl.java:33) ~[game-gateway-2.0.jar:?]
        at org.cmkj.gateway.module.report.facade.ReportFacadeImpl.queryBetResult(ReportFacadeImpl.java:28) [game-gateway-2.0.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45]
        at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45]
        at org.cmkj.core.socket.server.invoker.GameInvoker.invoke(GameInvoker.java:94) [game-core-2.0.jar:?]
        at org.cmkj.gateway.socket.handler.GateWayMessageHandler$1.run(GateWayMessageHandler.java:131) [game-gateway-2.0.jar:?]
        at org.cmkj.common.executor.QueueTask.run(QueueTask.java:81) [game-common-2.0.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
Caused by: 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.
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.DatabaseMetaData.getCallStmtParameterTypes(DatabaseMetaData.java:1639) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.DatabaseMetaData.getProcedureOrFunctionColumns(DatabaseMetaData.java:4283) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.DatabaseMetaData.getProcedureColumns(DatabaseMetaData.java:4124) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.CallableStatement.determineParameterTypes(CallableStatement.java:846) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.CallableStatement.<init>(CallableStatement.java:627) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.JDBC4CallableStatement.<init>(JDBC4CallableStatement.java:47) ~[mysql-connector-java-5.1.20.jar:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_45]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_45]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_45]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_45]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.CallableStatement.getInstance(CallableStatement.java:523) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.ConnectionImpl.parseCallableStatement(ConnectionImpl.java:4019) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.ConnectionImpl.prepareCall(ConnectionImpl.java:4103) ~[mysql-connector-java-5.1.20.jar:?]
        at com.mysql.jdbc.ConnectionImpl.prepareCall(ConnectionImpl.java:4077) ~[mysql-connector-java-5.1.20.jar:?]
        at org.apache.commons.dbcp.DelegatingConnection.prepareCall(DelegatingConnection.java:308) ~[commons-dbcp-1.4.jar:1.4]
        at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareCall(PoolingDataSource.java:303) ~[commons-dbcp-1.4.jar:1.4]
        at org.nutz.dao.impl.sql.run.NutDaoExecutor._runExec(NutDaoExecutor.java:125) ~[nutz-1.r.65.jar:1.r.65]
        at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:68) ~[nutz-1.r.65.jar:1.r.65]

老大,这是啥原因,测试服可以,到正式服就不行了,我用mysql命令直连查询也可以

4 回复

mysql完整版本号多少, mysql驱动完整版本号多少

mysql版本信息 Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1
驱动 mysql-connector-java-5.1.20.jar

搞定,谢谢大佬

添加回复
请先登陆
回到顶部