hello_test是我的存储过程的名字,在mapper.xml文件中是这么写的

<select id="getPageByProcedure" statementType="CALLABLE" databaseId="oracle">
{call hello_test(
#{start,mode=IN,jdbcType=INTEGER},
#{end,mode=IN,jdbcType=INTEGER},
#{count,mode=OUT,jdbcType=INTEGER},
#{emps,mode=OUT,jdbcType=CURSOR,javaType=ResultSet,resultMap=PageEmp}
)}
</select>

但是报错报了这样的错误:

java.sql.SQLException: ORA-06550: 第 1 行, 第 7 列:  PLS-00905: 对象 USER1.HELLO_TEST 无效 ORA-06550: 第 1 行, 第 7 列:

这就是存储过程写错了的情况,回到oracle中发现果然是这样的。仔细检查写存储过程的语句,然后改正,就可以正常运行了。

完整报错如下所示:

org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLException: ORA-06550: 第 1 行, 第 7 列:
PLS-00905: 对象 USER1.HELLO_TEST 无效
ORA-06550: 第 1 行, 第 7 列:
PL/SQL: Statement ignored

### The error may exist in EmployeeMapper.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: {call hello_test( ?, ?, ?, ? )}
### Cause: java.sql.SQLException: ORA-06550: 第 1 行, 第 7 列:
PLS-00905: 对象 USER1.HELLO_TEST 无效
ORA-06550: 第 1 行, 第 7 列:
PL/SQL: Statement ignored

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:77)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:82)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
at com.sun.proxy.$Proxy9.getPageByProcedure(Unknown Source)
at com.atguigu.mybatis.test.MyBatisTest.testProcedure(MyBatisTest.java:171)
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:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.sql.SQLException: ORA-06550: 第 1 行, 第 7 列:
PLS-00905: 对象 USER1.HELLO_TEST 无效
ORA-06550: 第 1 行, 第 7 列:
PL/SQL: Statement ignored

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1005)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4710)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
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:498)
at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
at com.sun.proxy.$Proxy10.execute(Unknown Source)
at org.apache.ibatis.executor.statement.CallableStatementHandler.query(CallableStatementHandler.java:67)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
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:498)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:127)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
at com.sun.proxy.$Proxy8.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
... 29 more

在mybatis中使用存储过程报错java.sql.SQLException: ORA-06550: 第 1 行, 第 7 列: PLS-00905: 对象 USER1.HELLO_TEST 无效 ORA-06550: 第 1 行, 第 7 列:的更多相关文章

  1. java中mysql查询报错java.sql.SQLException: Before start of result set

    异常:java.sql.SQLException: Before start of result set 解决方法:使用rs.getString();前一定要加上rs.next(); sm = con ...

  2. Mysql报错java.sql.SQLException:null,message from server:"Host '27,45,38,132' is not allowed to connect

    Mysql报错java.sql.SQLException:null,message from server:"Host '27,45,38,132' is not allowed to co ...

  3. 报错:java.sql.SQLException: The server

    报错:java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized 在IDEA运行是报出例如相识的错误时: ...

  4. Spring 连接MySQL报错java.sql.SQLException: Unknown system variable 'tx_isolation'

    先是报错255,这个时候需要把 jdbc:mysql://localhost:3306/projUse 写成 jdbc:mysql://localhost:3306/projUse?useUnicod ...

  5. Mybatis 报错java.sql.SQLException: No suitable driver found for http://www.example.com

    运行项目报错 Error querying database. Cause: java.sql.SQLException: No suitable driver found for http://ww ...

  6. 连接mysql数据库报错java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized...解决方法

    今天连接mysql数据库报错如下: java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or r ...

  7. 连接mysql报错java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized...解决方法

    报错内容: java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents mo ...

  8. NC57访问报错:java.sql.SQLException: Io 异常: Got minus one from a read call

    一.报错信息 1.  前端登录界面 2.  后台应用日志 报错信息一致为: $$callid= $$thread=[Service Monitor and Runtime Enroment] $$ho ...

  9. 连接mysql客户端报错: java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'

    报这个错可能是因为用了低版本的的客户端.驱动连接高版本的mysql服务器. 解决方式有三种:升级客户端版本.修改服务端认证方式和适应服务端认证方式. 我是通过升级客户端版本解决,参考一下链接: Upg ...

随机推荐

  1. 使用ADO如何获得SQLSERVER 2K的数据库名的列表

    打开数据库连接_ConnectionPtr m_pConn;_RecordsetPtr m_pRs;m_pConn.CreateInstance(__uuidof(Connection));m_pRs ...

  2. Taylor's theorem

    w https://en.wikipedia.org/wiki/Taylor_series

  3. 微信js获取地理位置

    1.绑定域名 先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”. 备注:登录后可在“开发者中心”查看对应的接口权限. 2.引入js文件 <script type=&q ...

  4. 字符串 (string)与字节数组(byte[])之间的转换

    string str = "abc" //字符串转成编码为GB2312的byte[] byte[] pData =System.Text.Encoding.GetEncoding( ...

  5. 用仿ActionScript的语法来编写html5——第六篇,TextField与输入框

    一,对比1,html5中首先看看在html5的canvas中的文字显示 var canvas = document.getElementById("myCanvas"); var ...

  6. 线性表 - C语言完整实现

    #include <stdio.h> #define false 0 #define true 1 #define MAXSIZE 20 typedef int bool; typedef ...

  7. Delphi 正则表达式之TPerlRegEx 类的属性与方法(3): Start、Stop

    Delphi 正则表达式之TPerlRegEx 类的属性与方法(3): Start.Stop //设定搜索范围: Start.Stop var   reg: TPerlRegEx; begin   r ...

  8. wechat多开

    右键wechat查看属性,找到目标(wechat的执行路径),复制 然后在桌面新建文档,输入下面命令,想多开几个就复制几行 start 复制的目标 另存为bat文件,所有文件类型 双击运行

  9. 75. Sort Colors(荷兰国旗问题 三指针)

      Given an array with n objects colored red, white or blue, sort them so that objects of the same co ...

  10. 什么是JIT?

    JIT是just in time,即时编译技术.使用该技术,能够加速java程序的执行速度.下面,就对该技术做个简单的讲解. 首先,我们大家都知道,通常javac将程序源代码编译,转换成java字节码 ...