adfemg
  1. adfemg
  2. ADFEMG-37

calling toString() on a ViewCriteriaRow causes SQLException

    Details

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

      Description

      hi

      Please consider the blog post by Frank Nimphius, "How-to dynamically filter model-driven LOV"
      at https://blogs.oracle.com/jdevotnharvest/entry/how_to_dynamically_filter_model

      Using JDeveloper 11.1.1.6.0 I created an example application that tries to use the code suggested in the blog post
      at http://www.consideringred.com/files/oracle/2012/DynamicallyFilterMDLOVApp-v0.01.zip

      The happy-day scenario (sc1) and a question (q1) are subject of the forum post
      "dynamically filter model-driven LOV : search-values visible"
      at https://forums.oracle.com/forums/thread.jspa?threadID=2419959

      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(OraclePreparedStatement.java:1899)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3764)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823)
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671)
      	at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:1308)
      	at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:968)
      	at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:7178)
      [...]
      
      • (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

          Activity

          Jan Vervecken created issue -
          Jan Vervecken made changes -
          Field Original Value New Value
          Link This issue is related to ADFEMG-36 [ ADFEMG-36 ]
          Hide
          Jan Vervecken added a comment -

          related to ADFEMG-38, about the same blog post

          Show
          Jan Vervecken added a comment - related to ADFEMG-38 , about the same blog post
          Jan Vervecken made changes -
          Link This issue is related to ADFEMG-38 [ ADFEMG-38 ]
          Hide
          Jan Vervecken added a comment -

          Also (q2) remains in this JIRA issue.

          regards
          Jan Vervecken

          Show
          Jan Vervecken added a comment - about (q3) I noticed that at step (sc2-d) moving the LOV dialog makes a greyed out Error dialog visible, see also the screenshot at http://www.consideringred.com/files/oracle/img/2012/ADFEMG-37-move-LOV-shows-Error.png This does not look like intended behaviour, or have I missed something? Also (q2) remains in this JIRA issue. regards Jan Vervecken
          Hide
          duncanmills added a comment -

          The toString() method on the ViewCriteria is very simple and as far as I can see does nothing that would generate side effects - it just accesses the member variable that defines the name of the VC and the size of the underlying Vector.
          I assume you have the ADF source code so it may be simplest just to debug your sample and see what the actual problem is here.

          Show
          duncanmills added a comment - The toString() method on the ViewCriteria is very simple and as far as I can see does nothing that would generate side effects - it just accesses the member variable that defines the name of the VC and the size of the underlying Vector. I assume you have the ADF source code so it may be simplest just to debug your sample and see what the actual problem is here.
          Hide
          Jan Vervecken added a comment -

          Thanks for your reply Duncan.

          • about "The toString() method on the ViewCriteria is very simple ..."
            • The question (q2) is about the toString() method on a ViewCriteriaRow instance.
          • about "... so it may be simplest just to debug your sample ..."
            • For the moment I only have time to report the reproducible behaviour I observe.

          Do you think an Oracle bug should be filed for the possible ViewCriteriaRow instance state change when calling toString()?

          Any feedback on (q3), which is related but different?

          regards
          Jan Vervecken

          Show
          Jan Vervecken added a comment - Thanks for your reply Duncan. about "The toString() method on the ViewCriteria is very simple ..." The question (q2) is about the toString() method on a ViewCriteriaRow instance. about "... so it may be simplest just to debug your sample ..." For the moment I only have time to report the reproducible behaviour I observe. Do you think an Oracle bug should be filed for the possible ViewCriteriaRow instance state change when calling toString()? Any feedback on (q3), which is related but different? regards Jan Vervecken
          Hide
          duncanmills added a comment -

          Ah my mistake for misreading the class. That all makes sense then. There was a bug reported against 11.1.1.6 for this issue. Looking at the source in 11.1.1.7 I can see it's been fixed already and the fix is scheduled for the 11.1.2.3 patch as well.
          In the meantime, rather than calling toString() in your debugging just use:
          "ViewCriteriaRow '" + vcr.getName() + "' with " + vcr.getAttributeCount() + " attributes";
          where vcr is the ViewCriteriaRow reference
          This will emulate the new version of toString() on the class.
          The bug in question is not published but it is definitely the same issue

          Show
          duncanmills added a comment - Ah my mistake for misreading the class. That all makes sense then. There was a bug reported against 11.1.1.6 for this issue. Looking at the source in 11.1.1.7 I can see it's been fixed already and the fix is scheduled for the 11.1.2.3 patch as well. In the meantime, rather than calling toString() in your debugging just use: "ViewCriteriaRow '" + vcr.getName() + "' with " + vcr.getAttributeCount() + " attributes"; where vcr is the ViewCriteriaRow reference This will emulate the new version of toString() on the class. The bug in question is not published but it is definitely the same issue
          Hide
          Jan Vervecken added a comment -

          Thanks for your reply Duncan.

          • about "... There was a bug reported against 11.1.1.6 for this issue. ... The bug in question is not published but it is definitely the same issue"
            • Would you mind sharing the bug number for future reference?
          • Thank you for suggesting an alternative/workaround for calling the toString() method on a ViewCriteriaRow instance.
          • about (q3)
            • As pointed out before a greyed out Error dialog is visible behind (so after moving) the LOV dialog. (see ADFEMG-37-move-LOV-shows-Error.png )
            • So a related/rephrased question is:
              • (q4) Why is the Error dialog for message "Missing IN or OUT parameter at index:: 1" invisible behind the LOV dialog (after step (sc2-c))?

          regards
          Jan Vervecken

          Show
          Jan Vervecken added a comment - Thanks for your reply Duncan. about "... There was a bug reported against 11.1.1.6 for this issue. ... The bug in question is not published but it is definitely the same issue" Would you mind sharing the bug number for future reference? Thank you for suggesting an alternative/workaround for calling the toString() method on a ViewCriteriaRow instance. about (q3) As pointed out before a greyed out Error dialog is visible behind (so after moving) the LOV dialog. (see ADFEMG-37-move-LOV-shows-Error.png ) So a related/rephrased question is: (q4) Why is the Error dialog for message "Missing IN or OUT parameter at index:: 1" invisible behind the LOV dialog (after step (sc2-c))? regards Jan Vervecken
          Hide
          chriscmuir added a comment -

          I believe the bug number to be 13701868. A code fix is in place for this bug in12.1.2 but it has not yet been cleared by QA.

          Show
          chriscmuir added a comment - I believe the bug number to be 13701868. A code fix is in place for this bug in12.1.2 but it has not yet been cleared by QA.
          Hide
          Jan Vervecken added a comment -

          Thank you for the update Chris.

          • about "I believe the bug number to be 13701868."
            • Currently I am unable to find bug 13701868 on My Oracle Support.
              Has bug 13701868 been published on My Oracle Support? If not, is it possible to publish bug 13701868 on My Oracle Support?

          regards
          Jan Vervecken

          Show
          Jan Vervecken added a comment - Thank you for the update Chris. about "I believe the bug number to be 13701868." Currently I am unable to find bug 13701868 on My Oracle Support. Has bug 13701868 been published on My Oracle Support? If not, is it possible to publish bug 13701868 on My Oracle Support? regards Jan Vervecken
          Hide
          chriscmuir added a comment -

          The bug is not currently published. Please log a request with Support to see if the bug can be published, I'll draw the line here on personally asking for every non published bug/ER to be published as it's not the best use of my time. I'll try the best with my own bugs/ERs though.

          Note however it appears the bug was lodged against 11.1.1.6.2 which I believe (might be wrong) is an internal RUP release, and as such your request maybe denied as I believe by policy we don't publish bugs/ERs on internal releases. I know you might disagree, but this isn't something I'm willing to fight as it requires an organization change beyond my time to deal with.

          CM.

          Show
          chriscmuir added a comment - The bug is not currently published. Please log a request with Support to see if the bug can be published, I'll draw the line here on personally asking for every non published bug/ER to be published as it's not the best use of my time. I'll try the best with my own bugs/ERs though. Note however it appears the bug was lodged against 11.1.1.6.2 which I believe (might be wrong) is an internal RUP release, and as such your request maybe denied as I believe by policy we don't publish bugs/ERs on internal releases. I know you might disagree, but this isn't something I'm willing to fight as it requires an organization change beyond my time to deal with. CM.
          Hide
          Jan Vervecken added a comment -

          Thanks for your reply Chris.

          • about "... as it's not the best use of my time ..."
            I agree. But surely Oracle customers can also make better use of their time when having to find alternative ways to get information when running into an unpublished bug.
          • about "I'll try the best with my own bugs/ERs though."
            Thank you.

          And thank you for pointing out some inconvenient aspects of the current Oracle bug publishing policy.

          regards
          Jan Vervecken

          Show
          Jan Vervecken added a comment - Thanks for your reply Chris. about "... as it's not the best use of my time ..." I agree. But surely Oracle customers can also make better use of their time when having to find alternative ways to get information when running into an unpublished bug. about "I'll try the best with my own bugs/ERs though." Thank you. And thank you for pointing out some inconvenient aspects of the current Oracle bug publishing policy. regards Jan Vervecken
          Hide
          Jan Vervecken added a comment -

          fyi

          In the context of service request 3-6783624381 bug 13701868, "ORACLE.JBO.SQLSTMTEXCEPTION WHEN VCROW.TOSTRING IS CALLED DURING EXECUTEQUERY", has been published.
          It currently has "Product Version 11.1.1.6.2", "Status 80 - Development to QA/Fix Delivered Internal" and "Fixed in Product Version 12.1.2.0.0".

          Very few details are published in bug 13701868, so I don't know if it also covers (q4).

          regards
          Jan Vervecken

          Show
          Jan Vervecken added a comment - fyi In the context of service request 3-6783624381 bug 13701868, "ORACLE.JBO.SQLSTMTEXCEPTION WHEN VCROW.TOSTRING IS CALLED DURING EXECUTEQUERY", has been published. It currently has "Product Version 11.1.1.6.2", "Status 80 - Development to QA/Fix Delivered Internal" and "Fixed in Product Version 12.1.2.0.0". Very few details are published in bug 13701868, so I don't know if it also covers (q4). regards Jan Vervecken
          Hide
          chriscmuir added a comment -

          Tested in 12.1.2 and can't reproduce the issue. Jan, can you verify please and close the EMG issue if you're satisfied with the outcome.

          CM.

          Show
          chriscmuir added a comment - Tested in 12.1.2 and can't reproduce the issue. Jan, can you verify please and close the EMG issue if you're satisfied with the outcome. CM.
          Hide
          chriscmuir added a comment -

          As I haven't heard an update I'm going to assume the issue is complete. Closing issue.

          CM.

          Show
          chriscmuir added a comment - As I haven't heard an update I'm going to assume the issue is complete. Closing issue. CM.
          chriscmuir made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: