Skip to Main Content

ORDS, SODA & JSON in the Database

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!

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

PhilMan2Mar 3 2019 — edited Jul 15 2019

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.

This post has been answered by Thompson on Mar 15 2019
Jump to Answer

Comments

odie_63
Answer

I don't think it's possible using XSD 1.0, which is the version you're probably using given your recent posts.

If you can, I suggest redesigning this part.

For example :

<where>

  <condition alias1="T1" col1="COL_1" operator="=" value="10.5" valueType="number"/>

  <condition alias1="T1" col1="COL_2" operator="&lt;" value="2020-02-22" valueType="date"/>

  ...

</where>

Schema fragment :

<xs:simpleType name="valueTypeEnum">

  <xs:restriction base="xs:string">

    <xs:enumeration value="number" />

    <xs:enumeration value="date" />

    <xs:enumeration value="string" />

  </xs:restriction>

</xs:simpleType>

<xs:element name="where" minOccurs="0">

  <xs:complexType>

    <xs:sequence>

      <xs:element name="condition" maxOccurs="unbounded">

        <xs:complexType>

          <xs:attribute type="xs:string" name="alias1" use="required"/>

          <xs:attribute type="xs:string" name="col1" use="required"/>

          <xs:attribute type="xs:string" name="operator" use="required"/>

          <xs:attribute type="xs:string" name="value" use="required"/>

          <xs:attribute type="valueTypeEnum" name="valueType" use="required"/>

        </xs:complexType>

      </xs:element>

    </xs:sequence>

  </xs:complexType>

</xs:element>

or, something a little more complicated using an extended abstract complexType, which allows type validation :

<where>

  <condition xsi:type="numberConditionType" alias1="T1" col1="COL_1" operator="=" value="10.5" />

  <condition xsi:type="dateConditionType" alias1="T1" col1="COL_2" operator="&lt;" value="2020-02-22" />

  <condition xsi:type="stringConditionType" alias1="T1" col1="COL_3" operator="=" value="ABC" />

</where>

corresponding schema fragment :

<xs:complexType name="conditionType" abstract="true">

  <xs:attribute type="xs:string" name="alias1" use="required"/>

  <xs:attribute type="xs:string" name="col1" use="required"/>

  <xs:attribute type="xs:string" name="operator" use="required"/>

</xs:complexType>

<xs:complexType name="numberConditionType">

  <xs:complexContent>

    <xs:extension base="conditionType">

      <xs:attribute name="value" type="xs:decimal" use="required"/>

    </xs:extension>

  </xs:complexContent>

</xs:complexType>

<xs:complexType name="dateConditionType">

  <xs:complexContent>

    <xs:extension base="conditionType">

      <xs:attribute name="value" type="xs:date" use="required"/>

    </xs:extension>

  </xs:complexContent>

</xs:complexType>

<xs:complexType name="stringConditionType">

  <xs:complexContent>

    <xs:extension base="conditionType">

      <xs:attribute name="value" type="xs:string" use="required"/>

    </xs:extension>

  </xs:complexContent>

</xs:complexType>

<xs:element name="where">

  <xs:complexType>

    <xs:sequence>

      <xs:element name="condition" type="conditionType" maxOccurs="unbounded"/>

    </xs:sequence>

  </xs:complexType>

</xs:element>

Marked as Answer by Rajneesh S-Oracle · Sep 27 2020
Rajneesh S-Oracle

Thank you, I guess below is also option with XSD 1.1, then I need to get rid of XML 1.0 and use 1.1 version:

<xs:element name="where" maxOccurs="1" minOccurs="0">

          <xs:complexType>

            <xs:sequence>

              <xs:element name="condition" maxOccurs="unbounded" minOccurs="1">

                <xs:complexType>

                  <xs:simpleContent>

                    <xs:extension base="xs:string">

                      <xs:attribute type="xs:string" name="alias1" use="required"/>

                      <xs:attribute type="xs:string" name="col1" use="required"/>

                      <xs:attribute type="xs:string" name="operator" use="required"/>

                      <xs:attribute type="xs:string" name="string" use="optional"/>

                      <xs:attribute type="xs:string" name="number" use="optional"/>

                      <xs:attribute type="xs:string" name="date" use="optional"/>

                      <xs:assert test="exists(@string | @number | @date)"/>

                    </xs:extension>

                  </xs:simpleContent>

                </xs:complexType>

              </xs:element>

            </xs:sequence>

          </xs:complexType>

        </xs:element>

odie_63

Rajneesh Shukla-Oracle wrote:

Thank you, I guess below is also option with XSD 1.1, then I need to get rid of XML 1.0 and use 1.1 version:

If you're working inside the database, it won't be possible.

Oracle XML DB only supports XML Schema 1.0.

You'll need a third-party validator, for example Xerces2, possibly published in the db using a java stored procedure.

Rajneesh S-Oracle

Hi odie_63,

Yes you are correct.

Encounterd below error , when I tried to register xsd with assert as below:

ORA-30937: No schema definition for 'assert' (namespace 'http://www.w3.org/2001/XMLSchema') in parent '/schema/element[1]/complexType/sequence/element[4]/complexType/sequence/element[1]/complexType/simpleContent/extension'

ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 72

ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 33

<xs:element name="where" maxOccurs="1" minOccurs="0">

          <xs:complexType>

            <xs:sequence>

              <xs:element name="condition" maxOccurs="unbounded" minOccurs="1">

                <xs:complexType>

                  <xs:simpleContent>

                    <xs:extension base="xs:string">

                      <xs:attribute type="xs:string" name="alias1" use="required"/>

                      <xs:attribute type="xs:string" name="col1" use="required"/>

                      <xs:attribute type="xs:string" name="operator" use="required"/>

                      <xs:attribute type="xs:string" name="string" use="optional"/>

                      <xs:attribute type="xs:string" name="number" use="optional"/>

                      <xs:attribute type="xs:string" name="date" use="optional"/>

                      <xs:assert test="exists(@string | @number | @date)"/>

                    </xs:extension>

                  </xs:simpleContent>

                </xs:complexType>

              </xs:element>

            </xs:sequence>

          </xs:complexType>

        </xs:element>

1 - 4

Post Details

Added on Mar 3 2019
14 comments
12,615 views