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!

apex.server.process fails: "apex is not defined"

A. OlsenMar 20 2019 — edited Mar 20 2019

I'm building an applikation that uses javascript in 18.2, running using Tomcat.

The other day I was doing apex.server.process(etc...) to retrieve database data using AjAX.

Today the function stopped working, and I can catch a "apex is not defined" javascript exception.

So it seems like my application has stopped loading certain javascript libraries.

- Any idea as for what might have gone wrong?

- Which user is actually responsible for loading javascript libraries? (my APEX_PUBLIC_USER and ORDS_PUBLIC_USER are "Open")

Here is an example I've made to show the problem in action.

You cannot reproduce it, as your apex probably loading the entire apex namespace.

But if anyone has an idea on where to look for the suddenly missing libs, I'd be glad to hear it.

___

Code involved:

a. Ajax Callback process

type: PL/SQL

Location: Local Database

Name: test_value

PL/SQL Code:

begin

-- Response:

htp.p('abc');

end;

______

b. Region, static content:

<script>

function getData(){

apex.server.process( "test_value", {

x01: "test"

}, {

success: function( data )  {

    document.write("Doing ok");

},

error: function( jqXHR, textStatus, errorThrown ) {

    document.write(textStatus + ": " + errorThrown);

}

});

}

document.write("Staring...<br>");

try {

getData();

}

catch(err) {

document.write ("Problem detected: " + err.message);

}

document.write("<br>Done.");

</script>

_______

Process(AJAX).PNG

Region(JS).PNG

CapturePage.PNG

This post has been answered by Franck N on Mar 20 2019
Jump to Answer
Comments
Post Details
Added on Mar 20 2019
4 comments
2,160 views