Wednesday, August 5, 2009

LOV criteria bug.

Some times after using search criteria inside an LOV we get a strange exception:

java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: vc_temp_2
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:11158)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:815)
at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:4617)
at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3807)
at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:18278)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:1035)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:815)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:5892)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1021)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:889)


It is not easy to reproduce but when it happens you cannot open the LOV again and you cannot set a value to the LOV field, even from diferent row or from diferent session.

I managed to reproduce it in a simple test case of Employees form with simple Department LOV.
The steps to reproduce are:


1.Select an existing department

2.open department LOV add a criterion and press search.


3.Close LOV without selecting row and type a non existing value and press Tab. LOV automatically opens and even though it doesnt have values in criteria only the previus results are visible.


4.Press cancel again and type an existing value and press Tab. Then the error apears

It seems that LOVs Love bugs.

3 comments:

  1. Hi,
    Thanks for the info. Is there any work around for this. Cant I use LOV at all with Search criteria ? I would like to change the search region that is opened by LOV. it seems ADF LOV is so rigid

    ReplyDelete
  2. Hello Michael,

    Have you found a workaround for this bug yet?

    ReplyDelete
  3. This is an old bug and hard to reproduce. We are at least 2 versions of jdeveloper ahead now and we dont meet this bug. I will try to reproduce it in 11.1.1.3 and see if still exist

    ReplyDelete