首页 > 代码库 > [TROUBLESHOOTING]奇怪的【索引中丢失 IN 或 OUT 参数】
[TROUBLESHOOTING]奇怪的【索引中丢失 IN 或 OUT 参数】
JDeveloper版本11.1.2.0.0
1,现象
1)ADF Viewobjct中定义变量bvSuperUser,查询中Where子句如下:
WHERE :bvSuperUser = 'Y'
部分错误信息如下:
<2014-9-12 下午04时34分05秒 CST> <Warning> <oracle.adf.controller.faces.lifecycle.Utils> <BEA-000000> <ADF: Adding the following JSF error message: 索引中丢失 IN 或 OUT 参数:: 1 java.sql.SQLException: 索引中丢失 IN 或 OUT 参数:: 1 at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1890) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3747) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3806) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667) at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:135) at oracle.jbo.server.ViewObjectImpl.getQueryHitCount(ViewObjectImpl.java:4840) at oracle.jbo.server.ViewObjectImpl.getQueryHitCount(ViewObjectImpl.java:4751) at oracle.jbo.server.QueryCollection.getEstimatedRowCount(QueryCollection.java:4011)
... ... <span> </span>at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
2,解决方案检查ViewObject的XML文件,对比发现变量定义有一个属性Kind被默认设置为viewcriteria,为何如此还未知。
<Variable
Name="bvUserId"
Kind="where"
Type="java.lang.Integer">
</Variable>
<Variable
Name="bvSuperUser"
Kind="viewcriteria"
Type="java.lang.String"/>
将Kind修改为where后,程序运行正常。
[TROUBLESHOOTING]奇怪的【索引中丢失 IN 或 OUT 参数】
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。