项目开发的时候遇到一个错误:
org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: java.sql.SQLException: ORA-06550: 第 8 行, 第 4 列:
PLS-00103: 出现符号 ";"在需要下列之一时:
. ( ) , * @ % & = - + < / >
at in is mod remainder not rem =>
<> or != or ~= >= <= <> and or like like2 like4 likec between
|| indicator multiset member submultiset
符号 ")" 被替换为 ";" 后继续。
### The error may exist in file [D:\Program Files\Workspaces\MyEclipse for Spring 2014\salesmanb2b\WebRoot\WEB-INF\classes\sqlmap\ProductMapper.xml]
### The error may involve com.salesmanb2b.mapper.ProductMapper.getProductsProc-Inline
### The error occurred while setting parameters
### SQL: {call GET_PRODUCTS ( ?, ?, ?, ?, ? }
### Cause: java.sql.SQLException: ORA-06550: 第 8 行, 第 4 列:
PLS-00103: 出现符号 ";"在需要下列之一时:
. ( ) , * @ % & = - + < / >
at in is mod remainder not rem =>
<> or != or ~= >= <= <> and or like like2 like4 likec between
|| indicator multiset member submultiset
符号 ")" 被替换为 ";" 后继续。
; bad SQL grammar []; nested exception is java.sql.SQLException: ORA-06550: 第 8 行, 第 4 列:
PLS-00103: 出现符号 ";"在需要下列之一时:
. ( ) , * @ % & = - + < / >
at in is mod remainder not rem =>
<> or != or ~= >= <= <> and or like like2 like4 likec between
|| indicator multiset member submultiset
符号 ")" 被替换为 ";" 后继续。
原来是映射文件出错
{call GET_PRODUCTS
(
#{proid,jdbcType=INTEGER, mode=IN},
#{product1,javaType=ResultSet,jdbcType=CURSOR,resultMap=product,mode=OUT},
#{product2,javaType=ResultSet,jdbcType=CURSOR,resultMap=product,mode=OUT},
#{product3,javaType=ResultSet,jdbcType=CURSOR,resultMap=product,mode=OUT},
#{product4,javaType=ResultSet,jdbcType=CURSOR,resultMap=product,mode=OUT}
)
}
call后面 右括号 忘了写
这是一个小细节
PS:
对于Oracle存储过程
建议 用navicat 编写好之后运行 成功再去编写代码
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有