Skip to Main Content

APEX

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Apex 5 - Session Idle Timeout handling in Dynamic Action - JSON Error

klaceyMar 11 2016 — edited Mar 21 2016

Apex 5.0.2, Oracle 12.1.0.2, AIX 7.1, Universal Theme (42)

Afternoon.

I'm receiving JSON errors from a Dynamic Action when the session has breached the idle timeout.

"Error: parsererror - SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"

I've had a search on the forums and this seems to point towards not setting the appropriate datatype on the return of the called process - similar to info found in the following threads

But the process call options are set by Apex itself in the Dynamic Action (PL/SQL true action) rather than manually, so although these point towards a solution, I am unsure how to move forward.

Is it possible that *I* can set the appropriate dataType in the following scenario (if that would solve the issue) - or could it require an amendment to Apex by the dev team itself?

(or is there some other possibility - like have I blinkered myself to an obvious solution?!)

--------------

In an application with a page that contains a file browse button.

When a file is selected, a dynamic action trims the filepath and places the filename in another screen field - this then enables a "load" button (So the first bit of the DA is simple PL/SQL to set an item)

If the screen isn't used and the session idle timeout is breached, when the file browse button is used after idle timeout, you are not redirected to the Session Idle Timeout URL

Instead, you receive an error.

Firefox

daPLSQLtimeout04ff.png

Chrome

daPLSQLtimeout01.png

I've created a demo application on apex.oracle.com to illustrate this issue. Note: the application session idle timeout is set at 30 seconds!

Workspace: KELVIN

User: developer

Password: developer

Application ID: 93174

(FileBrowseSessionTimeout) https://apex.oracle.com/pls/apex/f?p=93174:LOGIN_DESKTOP::::::

I was expecting the application to redirect to page 3 - the Session Idle Timeout URL

Indeed, firebug shows that the session idle timeout URL (page 3) is being called - and the Response itself is the correct HTML for the session timeout page (I won't post the HTML)

daPLSQLtimeout05ff.png

Does this seem to be a problem with the dataType - or do I have this all wrong?

The Chrome error of the "wrong" token of < suggests that a return type of JSON could be being defaulted...

Anyone got any thoughts / workarounds / alternative options on session idle timeout in a dynamic action?

Regards

Kelvin

This post has been answered by Tom Petrus on Mar 21 2016
Jump to Answer

Comments

Jonathan Lewis

Which version of Oracle ?

What does v$session_wait_history show for that session.

What do you see as the state and event over a short set of queries to v$session for that sid ?

Regards

Jonathan Lewis


JustinCave

Sorry.

The database is 11.2.0.3 on AIX.

I'll take a look at gv$session_wait_history momentarily, we've killed the process and are restarting after giving the Access database a couple good kicks in the pants.

Justin

JustinCave

gv$session_wait_history is reporting events of

SQL*Net message to client

SQL*Net message from client

It does appear that the Access changes resolved the overall issue.  But while Access was chugging away, I was still seeing LAST_CALL_ET getting reset with no other obvious signs of activity.

Justin

Jonathan Lewis
Answer

JustinCave wrote:

gv$session_wait_history is reporting events of

SQL*Net message to client

SQL*Net message from client

It does appear that the Access changes resolved the overall issue.  But while Access was chugging away, I was still seeing LAST_CALL_ET getting reset with no other obvious signs of activity.

Justin

If it was changing between FROM and TO there must have been some message coming from Access and bouncing back without an error. Possibly some sort of OCI "ping" type call that didn't involve an SQL statement.

Update:  something like a "set context" or "set client identifier" perhaps; possibly a (non-SQL) rollback or commit


Regards

Jonathan Lewis

Marked as Answer by JustinCave · Sep 27 2020
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 18 2016
Added on Mar 11 2016
6 comments
2,878 views