Hello,
I am using Jdev 12.2.1.1.0
I am getting below error only in production.
Attempt to set a parameter name that does not occur in the SQL : BindvarName
I have a viewObject where I have defined a view criteria as shown below. Please note that BindvarName is a view criteria level bind variable and there is no bind variable defined at sql level in my view object
<Variable
Name="BindvarName"
** Kind="viewcriteria"**
Type="java.lang.String"/>

I am calling below method to execute the view criteria
public Row findUserDetailsByNationalId(String nationalId) {
ViewObjectImpl userDetailsVO = this.getXxUserDetailsVO1();
ViewCriteria userDetailsVC = userDetailsVO .getViewCriteria("findByNationalId");
userDetailsVO .applyViewCriteria(userDetailsVC );
userDetailsVO .setNamedWhereClauseParam("BindvarName", nationalId);
userDetailsVO .executeQuery();
if (userDetailsVO != null) {
Row row = userDetailsVO .first();
userDetailsVO .clearViewCriterias();
return row;
}
userDetailsVO .clearViewCriterias();
return null;
}
This works perfectly most of the time however when there is huge traffic in my application i get the error Attempt to set a parameter name that does not occur in the SQL : BindvarName
Is perAllPeopleVO.clearViewCriterias(); can cause a problem?
when this method gets called multiple time. Is this a good practice.
Clearing viewCriteria gives me confident that we are not caching old values in view criteria and every time this method gets called, we have a fresh criteria with new bind parameter value
Please advice
Thanks,
Mozakkir