14 Replies Latest reply on Jul 15, 2019 6:26 PM by Brian Lester

    Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration

    PhilMan2

      Hello,

      I'm using XE 18C on a Windows platform.  I installed Apex 18.2 and then installed ORDS 18.4.  I followed the instructions in section 1.3.4.1 in the install guide https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/18.3/aelig/installing-REST-data-services.html#GUID-… 

      When I was prompted for "Enter the Apex static resource location" I responded with C:\app\product\apex\images

      The install went without an error.  I looked at all the logs in C:\Users\(my_username).  Not a single mention of "error" or "warning".

      In the Apex install guide, section 4.6 it instructs to copy the Apex images folder to ORDS.  I copied C:\app\product\apex\images to C:\app\product\ords.  Then I ran @apex_rest_config.sql from SQL Plus.  It seemed to complete OK.

      When I attempt to access Apex through a browser (localhost:9090/ords/apex) I receive a popup error: "There are issues with the configuration of the Static Files in your environment.  Please consult "Configuring Static File Support" section in the Application Express Install Guide."

      If I click OK on the prompt I can continue on to the Apex logon screen.  I'm able to login and get to the first screen.  However I want to address the error before proceeding further.

      Any ideas why I'm getting this error?  Thanks for looking at this.

        • 1. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
          PhilMan2

          The text in the APEX install guide for static images has a link to the ORDS install guide. Therefore, I assume that this problems belongs in this forum?

          When I installed APEX 18.2 I extracted all the files and then from SQL PLUS (SYS as SYSDBA) I ran the statements:

          @apexins SYSAUX SYSAUX TEMP /i/ ;

          @apxchpwd ;

          This has always worked with prior releases.

          • 2. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
            PhilMan2

            The standalone.properties file is located in C:\app\product\ords\standalone\  The contents are:

            #Mon Mar 11 08:12:28 EDT 2019

            jetty.port=9090

            standalone.context.path=/ords

            standalone.doc.root=C\:\\app\\product\\ords\\standalone\\doc_root

            standalone.scheme.do.not.prompt=true

            standalone.static.context.path=/i

            standalone.static.path=C\:\\app\\product\\apex\\images

             

            The ords_params.properties file is located in C:\app\product\ords\params\  The contents are:

            #Mon Mar 11 08:29:24 EDT 2019

            db.hostname=localhost

            db.password=@050510D5358B1110271AE4D146732250E287C531C06E5CCC75

            db.port=1521

            db.servicename=xe

            db.username=APEX_PUBLIC_USER

            migrate.apex.rest=false

            plsql.gateway.add=true

            rest.services.apex.add=true

            rest.services.ords.add=true

            schema.tablespace.default=SYSAUX

            schema.tablespace.temp=TEMP

            standalone.http.port=9090

            standalone.mode=true

            standalone.static.images=C\:/app/product/apex/images

            standalone.use.https=false

            user.apex.listener.password=@054247259E5C23B3751882AA4823469E12080B2EF3B6A20443

            user.apex.restpublic.password=@05F639A1327882C7A085CDF30D1FF12B74919DFD7EBECDDB74

            user.public.password=@051BB210309DB85FE6BB267A86DCB611CB20279CAF86EA9F12

            user.tablespace.default=SYSAUX

            user.tablespace.temp=TEMP

            Is there anything wrong with the contents of these files?

            • 3. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
              Thompson

              I am by far no expert of APEX and ORDS (my disclaimer especially since I will be opening my own issue here today).  Nonetheless I have also had issues with the standalone.properties file.  I've typed things in there that didn't work and I've also seen changes in there (I watched the timestamp).

               

              Try working around this file at first by using some switches like this:

               

              java -jar ords.war standalone --apex-images C:\app\product\apex\images

               

              It might be worth trying to run the standalone command and adding in each parameter by hand too.  It's a lot to type or paste but it eliminates that properties file as the source of your problems.

               

              java -jar ords.war standalone

               

               

              Other helpful info:  java -jar ords.war help standalone

              • 4. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
                PhilMan2

                Hello user12094070.  Thanks for looking at this.

                I tried your suggestion and got the same result.  at C:\app\product\ords\ I input the following:

                java -jar ords.war standalone --port 9090 --apex-images c:/app/producdt/apex/images --context-path /ords --static-context-path /i

                I still get the warning message.  I can continue on to Apex Admin where the screens appear normal, but the warning concerns me and I hate to proceed further.  I fear the problem will show up later on.

                Do you have other suggestions?

                • 6. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
                  PhilMan2

                  Hello JeffSmith,

                  Thanks for responding.  I hadn't seen that link, so this is very helpful.  I started following it, but ran into a problem.  When I run @apex_rest_config.sql I get an error similar to one that was reported in January 2019.  Apex 18.2 - GetConsoleMode failed, LastError=|6| while running @apex_rest_config.sql for ORDS

                  I indicated that I have the same question in that post.  Any idea why we're getting the error: GetConsoleMode failed, LastError=|6|

                  Thanks for looking at this.

                  Phil

                  • 7. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
                    Thompson

                    I didn't look at your documentation links.  However I did install APEX in its own home directory (i.e. E:\apex182 )and I also installed ORDS  (E:\ORDS ) in its own home directory.  I know that seems like it shouldn't be done but the reason is that if I upgrade the Oracle 18c ,I do not overwrite the ORDS or APEX installs within it.  Folks on this forum seem to feel this is a good practice.  Maybe its worth trying that? 


                    Second - rename that .properties file to something like .old and trying running things again.    Don't reference it when you start up ORDS the first time.  I know I mentioned that but that file can be troublesome.  Try to get it to run without it until its up and running.

                     

                    I did not need to manually create the APEX_LISTENER or APEX_REST_PUBLIC_USER accounts.  I'm using Oracle 18c as my database.  If you are using Oracle 12 maybe they are not there by default?  I can't recall.

                     

                    Another useful script that you may find yourself using at some point is reset_image_prefix.sql.

                    • 8. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
                      Thompson

                      By the way apex_rest_config.sql creates the APEX_LISTENER and APEX_REST_PUBLIC_USER.  You should not need to do that using APEX 18.2.  I just looked at the .sql file.  If you are using pluggable databases make sure you ran it in the correct place.

                      • 9. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
                        Thompson

                        Sorry I had to correct that in my original post after looking at my documentation.  You probably read it before I finished editing it. 

                        • 10. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
                          Thompson

                          I pointed it to the images directory under E:\apex182 not the oracle db home.  In my case it was E:\apex182\apex\images

                          • 11. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
                            PhilMan2

                            Hello,

                            I have my Oracle components in the following folders:

                            C:\app\product\18.0.0

                            C:\app\product\apex

                            C:\app\product\ords

                            C:\app\product\sqldeveloper

                            Is there anything inherently wrong with this folder structure?

                            I installed the components in this order

                            XE 18C

                            Apex 18.2 (using SQLPLUS> @apexins SYSAUX SYSAUX TEMP /i/ 

                            Once installed, using SQLPlus I executed:

                            • @apxchpwd
                            • alter session set "_ORACLE_SCRIPT"=true;
                            • ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
                            • ALTER USER APEX_PUBLIC_USER IDENTIFIED BY new_password;
                            • @apex_rest_config.sql
                            • @apex_epg_config.sql C:/app/product (This accesses the subordinate APEX/IMAGES directory)
                            • Alter User Anonymous Account Unlock;

                            From File Explorer I used Extract All on ords.3.0.7.253.09.40.zip to the folder C:\app\product\ords

                            From and elevated command prompt I ran java -jar ords.war install advanced

                            • When prompted for Configuration Data I supplied C:\app\product\ords
                            • The install program responded with:
                            • Your database connection is to a CDB.  ORDS common user ORDS_PUBLIC_USER will be created in the CDB.  ORDS schema will be installed in the PDBs.
                            • Root CDB$ROOT - create ORDS common user
                            • PDB PDB$SEED - install ORDS 18.4.0.r3541002 (mode is READ ONLY, open for READ/WRITE)
                            • PDB XEPDB1 - install ORDS 18.4.0.r3541002
                            • I started in standalone mode, changed the port to 9090
                            • When prompted for the Apex Static Resources Location I responded with C:\app\product\apex\images

                            It seems that ORDS_PUBLIC_USER is created in the CDB and the ORDS schema is created in the PDB.  I don't seem to have much control over that choice.  Would you change any of the installation steps I used?

                            Thanks again for looking at this.

                            • 12. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
                              Thompson

                              These were the steps I took.

                               

                              create a tnsnames.ora entry for the pluggable database.
                              test the pluggable tnsnames.ora entry OUTSIDE of the server using the SYS account.
                              XE 18C
                              sqlplus / as sysdba
                              alter session set container=pluggable_db_name
                              e:\apex18.2\apex directory -  using SQLPLUS> @apexins SYSAUX SYSAUX TEMP /i/
                              Verify apex install:
                              select status from dba_registry where comp_id='APEX';
                              @apxchpwd.sql
                              ALTER USER APEX_PUBLIC_USER IDENTIFIED BY password ACCOUNT UNLOCK;
                              ALTER USER anonymous ACCOUNT UNLOCK;
                              ALTER USER xdb ACCOUNT UNLOCK;
                              ALTER USER flows_files ACCOUNT UNLOCK;
                              Rem  ALTER system SET shared_servers=5 scope=both;
                              @apex_rest_config.sql
                              @apex_epg_config.sql E:\apex182  (apex installation home - my images are at: E:\apex182\apex\images)
                              commit; (may or may not be needed)
                              create the ords.war file at this point.

                              Good practice is to install the ORDS in its own home (E:\ords for example).
                              I see a lot of folks on this forum that recommend this approach.

                              Test out all of your accounts used/unlocked too.
                              Note that I did an alter session set container before I ran all of  .sql scripts
                              above.  Use the pluggable passwords in the
                              ORDS.WAR INSTALL ADVANCED command.


                              You can also validate the ords install and look for any  issues:

                               

                              java  -jar E:\ords\ords.war validate

                              • 13. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
                                PhilMan2

                                Thanks very much Thompson.  It's now working perfectly.  I had not set the container to XEPDB1 prior to installing APEX.  That made all the difference.  It seems that the users associated with APEX and ORDS must be in the same PDB container (e,g, XEPDB1).  The install documentation for Apex 18.2 doesn't show the statement alter session set container=XEPDB1 as an example or option.  I got an error with @apex_rest_config when I had the APEX and other installs set to the default container (CDB$ROOT).

                                Just like you suggested, after installing Apex 18.2 from the same SQLPlus (set to container=XEPDB1) I ran:

                                @apex_rest_config.sql

                                @apex_epg_config.sql C:\app\product

                                When I installed ORDS I used

                                Configuration Data = C:\app\product

                                Database Service Name = XEPDB1

                                Apex Static Resource Location = C:\ app\product\ apex\images

                                I should mention that after installing XE 18C I adjusted the TNSNAMES.ORA file:

                                XEPDB1 =

                                  (DESCRIPTION =

                                    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

                                    (CONNECT_DATA =

                                      (SERVER = DEDICATED)

                                      (SERVICE_NAME = xepdb1)

                                    )

                                  )

                                 

                                Thanks again for all your help!

                                • 14. Re: Receive "Issues with the configuration of the Static Files" error after ORDS 18 install and configuration
                                  Brian Lester

                                  I've tried to figure this out for 2 months. This worked perfectly; thank you!