Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sql.exe always kicks off a "Java Runtime Environment" message, sql script does not...

User9976769-OracleJan 17 2020 — edited Jan 17 2020

I am running Windows 10.  I currently have Java 1.8.0_231 (64 bit) installed.  JAVA_HOME points to the JRE directory, and the JRE\bin is in my path.  Whenever I just run sql.exe at a command prompt, it displays This application requires a Java Runtime Environment 1.8.0_150 and kicks off a browser pointing to a Java download.  However, if I use Cygwin Bash to run the sql script it runs and I can run the sql script in the Ubuntu WSL without problem as well.  Any ideas on what I need to do to run sql.exe in Windows?

Comments

fac586
Answer

eaolson1 wrote:

I've just finished debugging a strange problem in a page process that was giving incorrect results because a page item had the wrong value. We discovered this page item value was getting set as soon as the user's session was created and even before he loaded that page. The V() function would return a value for this item even when there was no value in WWV_FLOW_DATA.

Eventually, I turned on session tracing and found this when V('P1_ITEM') was being called:

SELECT ATTRIBUTE_VALUE FROM WWV_FLOW_PREFERENCES$ WHERE USER_ID=:B3 AND SECURITY_GROUP_ID = :B2 AND PREFERENCE_NAME = 'PERSISTENT_ITEM_'||:B1

There was indeed a value in WWV_FLOW_PREFERENCES$ for PERSISTENT_ITEM_P1_ITEM. We don't really use preferences except for the usual built in report sorting and this "persistent_item" type of preference is new to me. Even when I deliberately set a preference (apex_util.set_preference), it does not add this prefix.

I can't find anything in the documentation on this. Does anyone know what this might be?

This is on Apex 5.1.2.

This is how values are persistently stored for page items where the Maintain Session State property is set to Per User.

This may have been set in error as it is an uncommon but occasionally useful feature.

Marked as Answer by Eric Olson 1 · Sep 27 2020
Eric Olson 1

That must have been what happened. It appears in 5.2 if the item is changed back to Per Session, the preferences remain, and the V() function can retrieve the preference rather than the page item value. As far as I can tell, this has been fixed in 18.2, at least in testing on apex.oracle.com.

1 - 2

Post Details

Added on Jan 17 2020
1 comment
936 views