1. adfemg
  2. ADFEMG-37

calling toString() on a ViewCriteriaRow causes SQLException


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Labels:



      Please consider the blog post by Frank Nimphius, "How-to dynamically filter model-driven LOV"

      Using JDeveloper I created an example application that tries to use the code suggested in the blog post

      The happy-day scenario (sc1) and a question (q1) are subject of the forum post
      "dynamically filter model-driven LOV : search-values visible"

      While reviewing the behaviour of the code I added some System.out.println() statements.
      One specific println() statement caused the sample code to fail:

      System.out.println("SecondTryFilter.onSecondTryInputListOfValuesLaunchPopup() : vcr = " + vcr.toString());

      This statement includes a call to the toString() method on the ViewCriteriaRow variable "vcr".

      For the following scenario (sc2) I see some unexpected behaviour:

      • (sc2-a) run the "index" view on adfc-config.xml in JDeveloper
      • (sc2-b) click the "do goSecondTryFilter" link
      • (sc2-c) on the secondTryFilter page click the LOV search icon for DepartmentId
      • (sc2-d) notice the "Search and Select: DepartmentId" LOV dialog shows up with the message "No rows to display" in the table
      • (sc2-e) click the Search button, resulting in a dialog with the message "Missing IN or OUT parameter at index:: 1"

      Because this failing scenario (sc2) is using similar code than the successful scenario (sc1), with the one specific println() statement being the only difference, this suggests that the call to the toString() method on the ViewCriteriaRow somehow changes the state of the ViewCriteriaRow resulting in SQLExceptions.

      • (q2) Should (implicity) calling the toString() method on a ViewCriteriaRow instance change the state of the ViewCriteriaRow instance?

      Note that after step (sc2-c) the "IntegratedWebLogicServer - Log" already shows a stacktrace like:

      java.sql.SQLException: Missing IN or OUT parameter at index:: 1
      	at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(
      	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(
      	at oracle.jbo.server.QueryCollection.buildResultSet(
      	at oracle.jbo.server.QueryCollection.executeQuery(
      	at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(
      • (q3) Why is there no message "Missing IN or OUT parameter at index:: 1" when the LOV search icon is clicked (after step (sc2-c)), as it seems to be eaten by the framework, while there is such a message when the Search button is clicked (at step (sc2-e))?

      many thanks
      Jan Vervecken

        Issue Links


          Jan Vervecken created issue -
          Jan Vervecken made changes -
          Field Original Value New Value
          Link This issue is related to ADFEMG-36 [ ADFEMG-36 ]
          Jan Vervecken made changes -
          Link This issue is related to ADFEMG-38 [ ADFEMG-38 ]
          chriscmuir made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]


            • Assignee:
              Jan Vervecken
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: