4 Replies Latest reply on Apr 11, 2020 6:31 PM by pcpaasche

    ORDS - support two Apex installations on different version

    pcpaasche

      I am running Apex in Oracle Express Edition (XE) version 18C on Windows 10 professional.

       

      In my database I have two PDBs:

      1. XEPDB1: Oracle Apex version 19.2

      2. XEPDB2: Oracle Apex version 19.1

       

      I have one ORDS, running standalone, which is configured to serve both my Apex installations.

       

      I can connect to both Apex installations on these paths:

      XEPDB1:  https://localhost:8443/ords

      XEPDB2:  https://localhost:8443/ords/xepdb2/

       

      (I havent mapped XEPDB1 to a new path)

       

      I installed XEPDB1/Apex 19.2 first and copied the images folder from ....\apex_19.2_en\apex\images to ....\ords-19.1.0.092.1545\images

       

      My issue:

      For Apex 19.1 on XEPDB2, I can access the login page, but it displays this message:

       

      There is a problem with your environment because the Application Express files are not up-to-date! The files for version 19.2.0.00.18 have been loaded, but 19.1.0.00.15 is expected. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide.

       

      I have not copied  the images for Apex 19.1 to ORDS-folders.

       

      Question:

      What should I do to have both Apex installations get the images folder they should have?

      Is there any config I am missing in any of the ORDS config files?

       

      Please let me know if you need more information.

       

      Thanks in advance for any help!

       

       

        • 1. Re: ORDS - support two Apex installations on different version
          jariola

          You should have APEX 19.1 and 19.2 images in different folders.

          But you can define two static files location for ORDS standalone.

           

          Place images e.g. /opt/oracle/apex/191 and /opt/oracle/apex/192

          Set ORDS static images location to /opt/oracle/apex/.

          Change APEX installations static images location:

          E.g. if you set in ORDS standalone.static.context.path=/i,

          then APEX 19.1 set static image location /i/191/ and to APEX 19.2  /i/192/.

          You can do that by running script reset_image_prefix.sql found from APEX install files.

           

          Or install Tomcat and deploy ORDS there so you can serve both APEX version static files.

          Also you need then configure different image path for APEX installations.

           

          Or for workaround use static files from Static Resources on Content Delivery Network

          • 2. Re: ORDS - support two Apex installations on different version
            pcpaasche

            Thanks for your answer.

             

            I have been working on it, but I am not able to get it to work.

             

            I have done the following:

            Copied image files for apex 19.1 and 19.2 respectively to these two locations:

            • C:\app\Per\product\apex\191
            • C:\app\Per\product\apex\192

             

            "C:\app\Per\product\ords-19.1.0.092.1545\config\ords\standalone\standalone.properties"  look like this:

            #Sat Apr 11 09:46:21 CEST 2020

            jetty.secure.port=8443

            ssl.cert=

            ssl.cert.key=

            ssl.host=localhost

            standalone.context.path=/ords

            standalone.doc.root=C\:\\app\\Per\\product\\ords-19.1.0.092.1545\\config\\ords\\standalone\\doc_root

            standalone.scheme.do.not.prompt=true

            standalone.static.context.path=/i

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

             

            Stopped ORDS.

             

            In XEPDB2 (apex 19.1) I have run  @reset_image_prefix.sql and given /i/191/ as Application Express image prefix.

             

            Started ORDS: java -jar ords.war

             

            When ORDS is started, I can see that "C:\app\Per\product\ords-19.1.0.092.1545\params\ords_params.properties" has been updated and it looks like this:

            #Sat Apr 11 10:46:02 CEST 2020

            db.hostname=localhost

            db.password=@05A73DD9A72257A7F8F9798742AC4758AA2C7BCF37FA26BFEA

            db.port=1521

            db.servicename=XEPDB2

            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.https.port=8443

            standalone.mode=true

            standalone.ssl.host=localhost

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

            standalone.use.https=true

            standalone.use.ssl.cert=false

            user.apex.listener.password=@059331A06761379AD1A068523B50F3C1E16A8258F85E32B77A

            user.apex.restpublic.password=@057485655EF3BA3AA4467707BC8D764F615F0C34EE1459E93E

            user.public.password=@05F64DD1A9E65F8C96482CE907B46666B23BEAF8EC98D418E6

            user.tablespace.default=USERS

            user.tablespace.temp=TEMP

             

            When having done the above steps, I would expect that XEPDB2 (apex 19.1) would work with regards to images and XEPDB1 (apex 19.2) would not work since I still haven't run @reset_image_prefix.sql in XEPDB1.

             

            However, none of the two apex instances work. They give these error messages when started:

             

            XEPDB2 (apex 19.1):

            There is a problem with your environment because the Application Express files have not been loaded. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide. In addition, please verify that your image prefix path is correct. Your current path is /i/191/ (it should contain both starting and ending forward slashes, such as the default /i/). Use the SQL script reset_image_prefix.sql if you need to change it.

             

             

            XEPDB1 (apex 19.2):

            There is a problem with your environment because the Application Express files have not been loaded. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide. In addition, please verify that your image prefix path is correct. Your current path is /i/ (it should contain both starting and ending forward slashes, such as the default /i/). Use the SQL script reset_image_prefix.sql if you need to change it.

             

            Are you able to see what I am doing wrong?

            • 3. Re: ORDS - support two Apex installations on different version
              jariola

              What is output if you open browser and go

              http://<host>:<port>/i/191/apex_version.txt
              

              or

              http://<host>:<port>/i/192/apex_version.txt
              

               

              Also when you go to APEX, see is there any errors on browser console

              • 4. Re: ORDS - support two Apex installations on different version
                pcpaasche

                I have found the reason why what I first did not work.

                 

                I had copied to the image files to:

                C:\app\Per\product\apex\191\images

                C:\app\Per\product\apex\192\images

                 

                I should have copied to:

                C:\app\Per\product\apex\191

                C:\app\Per\product\apex\192

                 

                So for the record, these changes were done to support image files for two different apex versions in one ORDS-instance:

                 

                Stop ORDS

                 

                In C:\app\Per\product\ords-19.1.0.092.1545\config\ords\standalone\standalone.properties:

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

                 

                In XEPDB2 (apex 19.1):

                @reset_image_prefix.sql

                /i/191/

                 

                In XEPDB1 (apex 19.2):

                @reset_image_prefix.sql

                /i/192/

                 

                Start ORDS: java -jar ords.war

                 

                Both Apex instances should now work.