ORDS 5.0.1 on Tomcat
I see that APEX 5.0.3 and ORDS 3.0.5 are now available so I would like to upgrade to the latest versions. Upgrading APEX shouldn't be an issue but the ORDS 3.0.5 readme says that scripts option is deprecated. I am not sure what the recommended upgrade path is, the documentation doesn't really mention any specific steps. I am not a big fan of GUI or even CLI wizards, I prefer to edit config files for unattended installs/upgrades.
Here is what I am planning to do
1. Apply the APEX 5.0.3 patch
2. Copy the images folder from the 5.0.3 distribution to the appropriate location on the Tomcat server
3. Download ORDS 3.0.5 as apex.war
4. Stop Tomcat
5. Copy apex.war to /webapps
6. java -jar apex.war configdir <my current ORDS 3.0.1 configdir>
7. Start Tomcat
Can someone please advise if this is sufficient?
Yes, this is sufficient, I guess as this is what ORDS 3.0 documentation says about upgrade:
When you use a new release of Oracle REST Data Services, upgrade will occur automatically when you specify the simple or advanced installation command. If Oracle REST Data Services is already installed or upgraded, a message displays the Oracle REST Data Services schema version, and you will not be prompted for information.
Wow, I thought this would be a routine upgrade but no such luck...
Patching 5.0.1 to 5.0.3 had a little hiccup. One of the APEX packages failed to compile with package body WWV_FLOW_PLUGIN_UTIL compile errors with [Error] PLS-00302 (2111: 70): PLS-00302: component 'CLOB_TYPE' must be declared
Next issue - Static files (including those used by plugin files) were not served up by ORDS (3.0.1). This could be related to Issue 22588461 listed on the 5.0.3 Known Issues page.
So I downloaded ords.war from the ORDS 3.0.5 distribution and followed the steps above to point to my existing configdir.
This fixed the issue with static files but now my REMOTE_USER is not getting set correctly to my Windows username. I am using IIS to authenticate the user and it forwards the authenticated HTTP request to Tomcat as described here.
When I do APEX > Help > About, I see that REMOTE_USER is set to APEX_PUBLIC_USER but Tomcat /logs/localhost_access_log.2016-06-01.txt does show the correct authenticated user so I am not sure why ORDS is not setting REMOTE_USER (and APP_USER) correctly. All this was working fine with APEX 5.0.1 and ORDS 3.0.1 yesterday and, except for the steps described above, no other changes have been made.
10.222.11.74 - mydomain\username [01/Jun/2016:10:01:45 -0400] "GET /apex/f?p=4350:9:12852524352098:::::&p_dialog_cs=FNLKxV3bNt5JtQBxHUSIKt_Ej0Y HTTP/1.1" 200 11799
I am stumped. Help?
I created a Priority 1 SR with Oracle Support but they are not able to figure it out. Is anyone else seeing this issue with REMOTE_USER not being propagated to ORDS/APEX?
I am seeing the same issue. REMOTE_USER CGI variable is set correctly, but APEX still reports APEX_PUBLIC_USER. Did you ever get an answer?
One thing I have noticed is that APEX seems to refer to the HTTP Header variable, not the CGI variable.
While some places use them interchangablly, they are not the same. Tomcat via SPNEGO sets the CGI variable. (which you can see in a request.getRemoteUser() jsp call. (and also in the tomcat access logs) but not the HTTP Header. (long threads abound about why tomcat should not set header variables, and why your apps should not rely on them)
To upgrade you have to execute java -jar ords.war install using the new ords.war, after that, copy ords.war to Tomcat's webapp/
Hope this helps.
Yes, Oracle logged that bug after several back-and-forth with me, I see them listed in the bug report. Hope they fix it soon.