码迷,mamicode.com
首页 > 其他好文 > 详细

[TROUBLESHOOTING]奇怪的【索引中丢失 IN 或 OUT 参数】

时间:2014-09-12 17:08:13      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   java   ar   strong   for   

JDeveloper版本11.1.2.0.0


1,现象

1)ADF Viewobjct中定义变量bvSuperUser,查询中Where子句如下:

 WHERE :bvSuperUser = 'Y'


2)部署运行报错:索引中丢失  IN 或 OUT 参数

部分错误信息如下:

<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 参数】

标签:style   blog   http   color   io   java   ar   strong   for   

原文地址:http://blog.csdn.net/luyushuang/article/details/39232137

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!