在尝试测试java中的可调用过程时,我在尝试调用报告给定输入参数符号的存储过程时遇到错误(int)
CallableStatement cstmt = con.prepareCall("{CALL sign(?,"+testVal+")}");
cstmt.registerOutParameter(1, Types.INTEGER);
stacktrace读取:
java.sql.SQLException: [Cloudera][JDBC](11420) Error, parameter metadata not populated.
at com.cloudera.hiveserver2.exceptions.ExceptionConverter.toSQLException(Unknown Source)
at com.cloudera.hiveserver2.jdbc.common.SPreparedStatement.<init>(Unknown Source)
at com.cloudera.hiveserver2.jdbc.common.SCallableStatement.<init>(Unknown Source)
at com.cloudera.hiveserver2.jdbc.common4.C4SCallableStatement.<init>(Unknown Source)
at com.cloudera.hiveserver2.jdbc.jdbc41.S41CallableStatement.<init>(Unknown Source)
at com.cloudera.hiveserver2.jdbc.jdbc41.JDBC41ObjectFactory.createCallableStatement(Unknown Source)
at com.cloudera.hiveserver2.hive.jdbc41.HiveJDBC41ObjectFactory.createCallableStatement(Unknown Source)
at com.cloudera.hiveserver2.jdbc.common.SConnection.prepareCall(Unknown Source)
at TestMethods.callableStatement(TestMethods.java:263)
at HiveJdbcGeneralTest.testTableCreation(HiveJdbcGeneralTest.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at