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. window下搭建python开发环境

    搭建一个python开发环境比较简单,所以就稍微记录一下. 1.下载python然后安装 2.配置环境变量 3.在eclipse添加PyDev插件 1.下载python 官网:https://www. ...

  2. 修改jquery.automeplete,使其支持value匹配

    原生只会去匹配label,可在实际使用中,可能需要匹配的值并不需要显示在label中,经过添加一个matchType属性解决 1.加入matchType选项,并默认为原生匹配 $.widget(&qu ...

  3. Java基础 - 面向对象 - 类方法传参

    调用方法时可以给该方法传递一个或多个值,传给方法的值叫实参,在方法内部,接收实参的变量叫做形参,形参的声明语法与变量的声明语法一样.形参只在方法内部有效. Java中方法的参数主要有3种,分别为值参数 ...

  4. 简述 Python3 文件处理

    1.文件处理 找到文件 --> 打开文件 --> 操作:读.写 --> 保存 --> 关闭 1.1.1 写文件 (只要牵扯到文件操作,都是字符串:写文件的时候需要把写的数字转换 ...

  5. django博客项目7

    ................

  6. 分布式计算hadoop三大组件

    设计原则:移动计算,而不是移动数据 计算层:Map/Reduce调度层:YARN数据层:HDFS 这三层之间没有必然的依赖性,只是经常这么搭配,而且都是hadoop那个包里一起安装的,三层都可以独立运 ...

  7. win10下的linux一些问题

    1.文件位置在: C:\Users\用户名\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\Loc ...

  8. MySQL之存储引擎(Day39)

    一 什么是存储引擎 mysql中建立的库=====>文件夹 库中建立的表=====>文件 现实生活中我们用来存储数据的文件应该有不同的类型:比如存文本用txt类型,存表格用excel,存图 ...

  9. python2 跟3的区别

    1----python2:1 臃肿 , 源码的重复量很多2:语法不清晰,掺杂着 c,pyp,java,的一些陋习 python3: 几乎是重构后的源码,规范 清晰 优美 2.python的分类 分为编 ...

  10. CodeMatic动软自动生成Nhibernate

    前两天调查了下自动生成工具MyGeneration和codesmith前一个版本已经不更新了后面一个太高级生成 的代码包含了太多东西,没整明白.不过生成的xmlmapping很强大.所以干脆整合一下c ...