11 Replies Latest reply on May 19, 2015 6:44 PM by Patrick Wolf-Oracle

    How to configure *application and workspace* static files after upgrade from 4.2 to 5.0?

    Skip - Absolute

      Hi.

       

      I just upgraded from 4.6 to 5.0 on Windows 7 64-bit.  Running ORDS 2 and Tomcat.  Both APEX and my application run.  APEX images are OK.

       

      Problem: Application and workspace images do not display.

       

      Here are the different paths:

      • C:\apache-tomcat-7.0.59\webapps\i  
      • C:\APEX\images

      I copied the contents of the APEX images directory to the tomcat webapps\i directory. 

       

      I ran both flavors of the image load script, and each completed without errors.

      • SQL> @apxldimg.sql c:
      • SQL> @apex_epg_config.sql c:

       

      I am able to log on to APEX admin or developer mode, and everything looks all right and works all right. 

       

      I'm able to log in to my application, and it works, but the images, such as the logo, are not displaying.  The application's CSS file is not being used.

       

      The page source shows this in the <head>, where "pva" is the workspace name:

      <link rel="shortcut icon" href="pva/static-files-not-configured/files/static/v4Y/eprentise_favicon-32x.png" type="image/x-icon" />
      <link rel="stylesheet" href="pva/static-files-not-configured/files/static/v4Y/epr_4_6.css" type="text/css" />

       

      This is the logo in the <body> <hgroup>

         <a href="f?p=520:1:1212525121720" id="uLogo"><img src="pva/static-files-not-configured/files/static/v4Y/eprentise_default-logo.png" alt="eprentise demo" title="eprentise demo" height="50" /></a>

       

      #WORKSPACE_IMAGES#  = pva/static-files-not-configured/files/static/v4Y/ , which is seen in the above locations.


      #APP_IMAGES# = pva/static-files-not-configured/520/files/static/v2Y/, where the application_id is 520.  These images don't display either


      My understanding is that the workspace and app images are not stored in the file system in the \i directory.


      Any advice or pointer to documentation on how to configure the static files for application and workspace images and for the application's CSS file?


      Thanks,

      Skip

        • 1. Re: How to configure static files after upgrade from 4.2 to 5.0?
          Kiran Pawar

          Hi Skip - Absolute,

          Skip - Absolute wrote:

           

          I just upgraded from 4.6 to 5.0 on Windows 7 64-bit.  Running ORDS 2 and Tomcat.  Everything looks fine but the application's images are not displaying.

          Here are the different paths:

          • C:\apache-tomcat-7.0.59\webapps\i  
          • C:\APEX\images

          I copied the contents of the APEX images directory to the tomcat webapps\i directory.

              Have you copied the contents of apex\images directory to webapps\i or the apex\images directory to webapps\i?

              If you have copied apex\images directory to webapps\i, then your end result will be webapps\i\images which will not work with Oracle APEX. It expects the same contents as apex\images.

              Refer : http://docs.oracle.com/cd/E37099_01/doc.20/e25066/install.htm#AELIG7227

          I ran both flavors of the image load script, and each completed without errors.

          • SQL> @apxldimg.sql c:
          • SQL> @apex_epg_config.sql c:

          I am able to log on to APEX admin or developer, and everything looks all right.

          I'm able to log in to my application, but the images, like the logo are not displaying.  The application's CSS file is not being used.

              As you are using ORDS deployed to Apache Tomcat, this is absolutely unnecessary. The apxldimg.sql and apex_epg_config.sql are meant to load images in the XDB, which is used by Embedded PL/SQL Gateway (internal mod_plsql/Oracle XMLDB HTTP Server).

           

              Hope this helps!

           

          Regards,

          Kiran

          1 person found this helpful
          • 2. Re: Re: How to configure static files after upgrade from 4.2 to 5.0?
            Skip - Absolute

            Hi Kiran,

             

            I have edited my post to make more clear what the problem is.  It is ONLY about how to configure APEX so it will properly display both workspace images and application images.  It is not about the display of APEX's static image and references to APEX's CSS files.

             

            First, thanks for pointing out that running the apxldimg.sql and apex_epg_config.sql scripts are unnecessary.  Am I correct that you mean unnecessary for APEX to access its static images and CSS?

             

            When I log into APEX, here's what I get, in two steps.  First I get a warning:

            Application Express - Sign In - 2015-04-20 10_17_00.png

            Then when I click OK:

            Application Express - Sign In - 2015-04-20 10_17_56.png

            After signing in, there are no other warnings or other indications APEX is not configured properly.

             

            When I try to log in to my application, here's what I see:

            Login - 2015-04-20 10_26_26.png

            The Logo image is not displaying.  Inspect Element shows:

            <img src="pva/static-files-not-configured/files/static/v4Y/eprentise_default-logo.png" title="eprentise Logo for Demo Login" alt="eprentise Logo">

             

            Why does the src= location include "static-files-not-configured" ?   Where does that come from?

             

            What should I see when #workspace_images# and #APP_IMAGES# are properly configured?

             

            Is this more clear now what the problem is?

             

            Thanks,

            Skip

            • 3. Re: Re: Re: How to configure static files after upgrade from 4.2 to 5.0?
              Kiran Pawar

              Hi Skip - Absolute,

              I have edited my post to make more clear what the problem is.  It is ONLY about how to configure APEX so it will properly display both workspace images and application images.  It is not about the display of APEX's static image and references to APEX's CSS files.

               

              First, thanks for pointing out that running the apxldimg.sql and apex_epg_config.sql scripts are unnecessary.  Am I correct that you mean unnecessary for APEX to access its static images and CSS?

                   No, I didn't mean that it is unnecessary for APEX to access its static files images/js/css, in fact they are necessary for proper working on Oracle APEX Application Builder GUI. I was just saying that if you are configuring ORDS + Apache Tomcat as web server, then running the apex_epg_config.sql/apxldimg.sql scripts is unnecessary, as those scripts are used to load images when you are configuring Embedded PL/SQL Gateway as your web server.

                   Refer : https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29143

                   The link above enlists the steps for configuring ORDS with Oracle APEX and it doesn't in any step asks you to run the apex_epg_config.sql/apxldimg.sql scripts.

               

                   I found this something unusual with the URL mentioned in the screenshots:

                   http://localhost:8090/ords/desk/f?p=520:LOGIN_DESKTOP

                   Usually when you configure ORDS based Oracle APEX installation the URL is:

                   http://<host>:<port>/ords/f?p=520:LOGIN_DESKTOP

                   I don't get how /desk comes into your URL. Have you done some custom configuration of ORDS?

               

              The Logo image is not displaying.  Inspect Element shows:

              <img src="pva/static-files-not-configured/files/static/v4Y/eprentise_default-logo.png" title="eprentise Logo for Demo Login" alt="eprentise Logo">

              Why does the src= location include "static-files-not-configured" ?   Where does that come from?

              What should I see when #workspace_images# and #APP_IMAGES# are properly configured?

                   For images loaded to #WORKSPACE_IMAGES# you should get following:

              <img title="Company Logo" alt="Company Logo" src="myworkspace/r/68756/files/static/v1Y/Companylogo.png">

                   For images loaded to #APP_IMAGES# you should get the following:

              <img title="Company Logo" alt="Company Logo" src="myworkspace/r/34514/files/static/v1Y/Companylogo.png">

                   Refer : Roels Blog: APEX 5 New Static File Features

                   Why don't you upload new images in workspace/application and check?

               

                   Hope this helps!

               

              Regards,

              Kiran

              • 4. Re: Re: Re: Re: How to configure static files after upgrade from 4.2 to 5.0?
                Skip - Absolute

                Kiran,

                 

                I appreciate your help. I think I get the concept that the scripts load the images for the Embedded PL/SQL Gateway, and that since ORDS/Tomcat configuation doesn't use the gateway, the script has no effect.  I didn't know that before. 

                 

                The /desk part of my APEX URLs directs ORDS to go to a specific database, in my case my desktop PC with Oracle XE.  One instance of ORDS can direct traffic to multiple databases and their APEXes.  My config also goes to two other remote servers, with /ah9 and /ah30.   So there's nothing unusual about that.

                 

                I already deleted and re-uploaded the images to see if that helped.  It didn't.

                 

                Thanks for showing the proper output of the img src HTML.

                 

                Maybe someone else who knows more than we do can comment on the source of the warning before the APEX logon page is displayed, and how to configure the app and workspace image files, and CSS, too.

                 

                Skip

                • 5. Re: Re: Re: Re: Re: How to configure static files after upgrade from 4.2 to 5.0?
                  Patrick Wolf-Oracle

                  Hi Skip,

                   

                  if you are using ORDS the following chapter in the ORDS part of the installation guide is of importance for you. https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29472

                  In particular the following note in 'About configuring RESTful Services'

                   

                  RESTful Services requires Oracle REST Data Services 2.0 or later. The configuration of RESTful Services is required when upgrading to Oracle Application Express release 5.0 and RESTful Services were not configured in a previous release.

                   

                  Regards

                  Patrick


                  Member of the APEX development team

                  • 6. Re: How to configure *application and workspace* static files after upgrade from 4.2 to 5.0?
                    faraz-dba

                    I have configured the RESTful Service using apex_config_rest ... succesfully. But still I am also encountering the same problem with the static files.

                    • 7. Re: How to configure static files after upgrade from 4.2 to 5.0?
                      unficyp

                      I had exactly the same problem.

                       

                      My plugin static files kept failing with, eg:

                      http://192.168.20.56:8080/apex/develop/r/200/files/plugin/13409032103808919/v1/select2.css

                      Failed to load resource: the server responded with a status of 503 (Service Unavailable)

                       

                      Patrick Wolfs Hint was very good, but unfortunately i had REST configured some time ago and forgot about it.

                      Including unlocking the Accounts APEX_LISTENER and APEX_REST_PUBLIC_USER.

                       

                      After unlocking them, my static files are working again, so my tips for faraz-dba:

                      - check your tomcat catalina.out log for errors

                      - check your apex_rt.xml and apex_al.xml config files

                      - check if apex_listener and apex_rest_public_user accounts are open.

                       

                      regards,

                      gw

                      1 person found this helpful
                      • 8. Re: How to configure static files after upgrade from 4.2 to 5.0?
                        Skip - Absolute

                        Hi Patrick,

                         

                        Thanks for pointing out APEX 5 will need RESTful Services.  I had not configured ORDS with them several months ago when I installed it. 

                         

                        It may be a while before I can get back to try that, but when I get it going I'll post a success msg back here.

                         

                        Your blog posts have been part of a well done, and long awaited APEX 5 launch. 

                         

                        Best regards,

                        Skip

                        • 9. Re: How to configure static files after upgrade from 4.2 to 5.0?
                          Skip - Absolute

                          gw,

                           

                          Thanks for letting me know.  When I looked at my config, I found I hadn't set up RESTful Services. 

                           

                          Best regards,

                          Skip

                          • 10. Re: How to configure *application and workspace* static files after upgrade from 4.2 to 5.0?
                            faraz-dba

                            unficyp schrieb:

                             

                            - check your apex_rt.xml and apex_al.xml config files

                             

                            regards,

                            gw

                             

                            Thanks a lot for the reply unficyp.

                             

                            Where are these xml files located and what I should check there?

                            • 11. Re: How to configure *application and workspace* static files after upgrade from 4.2 to 5.0?
                              Patrick Wolf-Oracle

                              The following thread might also help to find out why Static Files don't work. See the posting from Vlad for details. Theme roller generated CSS not found by ORDS

                               

                              Regards

                              Patrick


                              Member of the APEX development team