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!

500 Internal Server Error on apex File Browse page item for video blob content

PaulCOct 20 2015 — edited Feb 20 2016

Environment

Database:  12.1.0.2

Apex:   5.0.1

O/S:  Linux

Web server:  Ords 3 (standalone)

Error Message

ORACLE REST DATA SERVICES

500 Internal Server Error

An unexpected error with the following message occurred: video/mp4; charset=utf-8

Error Event

The above error is generated on clicking the standard “view” link for a File Browse page item in an Apex application for a page item based on a blob column, column contains video files (typically mp4).  The page item has been created using the standard Apex wizards.

The page has a standard Automatic Row Fetch on a table and the page item is defined as:-

 

  Page Item Type:  File Browse..

  Storage Type:      Blob Column Specified in Item Source Value

  Source:                 Database Column

The application previously worked without issue under Apex 4/11gr2/ords2 (standalone and with glassfish or weblogic) but has been migrated to the above environment and now generates the above message.   The database NLS is set up as:-


  NLS_RDBMS_VERSION               12.1.0.2.0

  NLS_NCHAR_CONV_EXCP          FALSE

  NLS_LENGTH_SEMANTICS         BYTE

  NLS_COMP                                   BINARY

  NLS_DUAL_CURRENCY               $

  NLS_TIMESTAMP_TZ_FORMAT               DD-MON-RR HH.MI.SSXFF AM TZR

  NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR

  NLS_TIMESTAMP_FORMAT       DD-MON-RR HH.MI.SSXFF AM

  NLS_TIME_FORMAT                    HH.MI.SSXFF AM

  NLS_SORT                                      BINARY

  NLS_DATE_LANGUAGE                              AMERICAN

  NLS_DATE_FORMAT                    DD-MON-RR

  NLS_CALENDAR                            GREGORIAN

  NLS_NUMERIC_CHARACTERS    .,

  NLS_NCHAR_CHARACTERSET    AL16UTF16

  NLS_CHARACTERSET                   AL32UTF8

  NLS_ISO_CURRENCY                   AMERICA

  NLS_CURRENCY                           $

  NLS_TERRITORY                           AMERICA

  NLS_LANGUAGE                           AMERICAN

A test using the Repository App P-Track in the same database, to check video blob content upload and viewing, produces the same error on clicking on the view option; so issue would appear to be infrastructure configuration rather than application coding errors. Video file uploads OK.


Tables holding Unicode data (e.g. Japanese) are not presenting any issues in text or textarea application page items (that are based on varchar2 or clob database columns), so issue would appear to be video and blob specific.


I am assuming it is an Ords 3.0 configuration issue but can not find any documentation or  threads detailing any non utf8 configuration requirements.    Should the ords default.xml file be set to a different encoding value?


The various logs and configuration files are detailed below (a few of the ip details etc have had to be blanked out).


Firebug console:-


"NetworkError: 500 Server Error - http://nnn.nn.nn.nn:8080/ords/apex_util.get_blob_file?a=1105088&s=6735512082810&p=23&d=59299402611089982&i=59297905754089977&p_pk1=100635&p_pk2=&p_ck=gQzF2WMbZ9vIYSg1cQFAsk5lcnYesh1hTHdn4ggmTXhVCYa92K7UFuPlw42bgSgVkYxcOlTjjneT6YL1fYIJ6Q&p_content_disposition=attachment"


Output from ords_listener.log:- 


==== Processing Request: ====

GET /ords/apex_util.get_blob_file?a=1105088&s=4179243183474&p=23&d=59299402611089982&i=59297905754089977&p_pk1=100635&p_pk2&p_ck=4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw&p_content_disposition=attachment

==== Headers in Request ====

Accept-Language: en-GB,en;q=0.5

Cookie: SSL_DISPLAY_HELP=N; ORA_WWV_APP_1105189=ORA_WWV-nqB6GXWpARE3N-clySx2tmxu; LOGIN_USERNAME_COOKIE=nnn;[cookie name changed]=ORA_WWV-pPuobFC9eIzfqj1NhPDdkuzU; ORA_WWV_REMEMBER_UN=TEST1:SIBYLLINE; ORA_WWV_USER_69430500808074=ORA_WWV-9A6PZ0X7ulyIXw2-kVMqhcfk

Host: nnn.n.n.nn:8080

Accept-Encoding: gzip, deflate

Referer: http://nnn.nn.n.n:8080/ords/f?p=1105088:23:4179243183474::NO:23:P23_COMPLIANCE_CODE_ID,P23_RETURN_PAGE,P23_PAGE_ACTION:100635,20,EDIT&cs=11DD9B7167B6822A8C92D27FA7F85B35F

User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0

Connection: keep-alive

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

==== Cookies in Request ====

SSL_DISPLAY_HELP =  N

ORA_WWV_APP_1105189 =  ORA_WWV-nqB6GXWpARE3N-clySx2tmxu

LOGIN_USERNAME_COOKIE =  nnn

(cookie name) =  ORA_WWV-pPuobFC9eIzfqj1NhPDdkuzU

ORA_WWV_REMEMBER_UN =  PCHESTER:SIBYLLINE

ORA_WWV_USER_69430500808074 =  ORA_WWV-9A6PZ0X7ulyIXw2-kVMqhcfk

SID: 361

isValidRequest(), procedure name: <apex_util.get_blob_file>

Validating: apex_util.get_blob_file

*** Total number of arguments: 11

Parse: 1 ms

-----

begin

apex_util.get_blob_file(p_content_disposition=>?,

d=>?,

p=>?,

a=>?,

p_ck=>?,

s=>?,

p_pk2=>?,

p_pk1=>?,

i=>?);

commit;

  end;

SSL_DISPLAY_HELP =  N

ORA_WWV_APP_1105189 =  ORA_WWV-nqB6GXWpARE3N-clySx2tmxu

LOGIN_USERNAME_COOKIE =  xxx

[cookie name removed] = ORA_WWV-pPuobFC9eIzfqj1NhPDdkuzU

ORA_WWV_REMEMBER_UN =  TEST1:SIBYLLINE

ORA_WWV_USER_69430500808074 =  ORA_WWV-9A6PZ0X7ulyIXw2-kVMqhcfk

SID: 361

isValidRequest(), procedure name: <apex_util.get_blob_file>

Validating: apex_util.get_blob_file

*** Total number of arguments: 11

Parse: 1 ms

-----

begin

apex_util.get_blob_file(p_content_disposition=>?,

d=>?,

p=>?,

a=>?,

p_ck=>?,

s=>?,

p_pk2=>?,

p_pk1=>?,

i=>?);

commit;

  end;

*** Total number of arguments: 11

{a=1105088, s=4179243183474, p=23, d=59299402611089982, i=59297905754089977, p_pk1=100635, p_pk2=, p_ck=4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw, p_content_disposition=attachment}

p_content_disposition= attachment

{a=1105088, s=4179243183474, p=23, d=59299402611089982, i=59297905754089977, p_pk1=100635, p_pk2=, p_ck=4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw, p_content_disposition=attachment}

d= 59299402611089982

{a=1105088, s=4179243183474, p=23, d=59299402611089982, i=59297905754089977, p_pk1=100635, p_pk2=, p_ck=4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw, p_content_disposition=attachment}

p= 23

{a=1105088, s=4179243183474, p=23, d=59299402611089982, i=59297905754089977, p_pk1=100635, p_pk2=, p_ck=4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw, p_content_disposition=attachment}

a= 1105088

{a=1105088, s=4179243183474, p=23, d=59299402611089982, i=59297905754089977, p_pk1=100635, p_pk2=, p_ck=4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw, p_content_disposition=attachment}

p_ck= 4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw

{a=1105088, s=4179243183474, p=23, d=59299402611089982, i=59297905754089977, p_pk1=100635, p_pk2=, p_ck=4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw, p_content_disposition=attachment}

s= 4179243183474

{a=1105088, s=4179243183474, p=23, d=59299402611089982, i=59297905754089977, p_pk1=100635, p_pk2=, p_ck=4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw, p_content_disposition=attachment}

p_pk2=

{a=1105088, s=4179243183474, p=23, d=59299402611089982, i=59297905754089977, p_pk1=100635, p_pk2=, p_ck=4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw, p_content_disposition=attachment}

p_pk1= 100635

{a=1105088, s=4179243183474, p=23, d=59299402611089982, i=59297905754089977, p_pk1=100635, p_pk2=, p_ck=4wHnyII4it8_pAsUJRcTewwVkV0rb4sScPulVhllXdldsotjVex83lDqE8FHoW6zZY2sHaPfdCkHmckRNBKJtw, p_content_disposition=attachment}

i= 59297905754089977

Exec: 37 ms

Got results length: 0

==== Headers from Results ====

==== Request Processed ====

The database column has been checked using SQLDeveloper and the blob column is correctly populated with an mp4 video file that can be downloaded via SQLDeveloper and played.

Ords configuration:-

default.xml file

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">

<properties>

<comment>Saved on Mon Aug 17 15:49:37 BST 2015</comment>

<entry key="apex.docTable">FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$</entry>

<entry key="apex.excel2collection">false</entry>

<entry key="apex.excel2collection.name"/>

<entry key="apex.excel2collection.onecollection">true</entry>

<entry key="apex.excel2collection.useSheetName">false</entry>

<entry key="apex.extensions"/>

<entry key="cache.caching">false</entry>

<entry key="cache.directory">/tmp/apex/cache</entry>

<entry key="cache.duration">days</entry>

<entry key="cache.expiration">7</entry>

<entry key="cache.maxEntries">500</entry>

<entry key="cache.monitorInterval">60</entry>

<entry key="cache.procedureNameList"/>

<entry key="cache.type">lru</entry>

<entry key="db.hostname">(xxxxxxxxx)</entry>

<entry key="db.port">nnnn</entry>

<entry key="db.servicename">dev12.xxxxxxxxx</entry>

<entry key="debug.debugger">true</entry>

<entry key="debug.output">console</entry>

<entry key="debug.printDebugToScreen">false</entry>

<entry key="error.keepErrorMessages">true</entry>

<entry key="error.maxEntries">50</entry>

<entry key="jdbc.DriverType">thin</entry>

<entry key="jdbc.InactivityTimeout">1800</entry>

<entry key="jdbc.InitialLimit">3</entry>

<entry key="jdbc.MaxConnectionReuseCount">1000</entry>

<entry key="jdbc.MaxLimit">10</entry>

<entry key="jdbc.MaxStatementsLimit">10</entry>

<entry key="jdbc.MinLimit">1</entry>

<entry key="jdbc.statementTimeout">900</entry>

<entry key="log.logging">false</entry>

<entry key="log.maxEntries">50</entry>

<entry key="misc.compress"/>

<entry key="misc.defaultPage">apex</entry>

<entry key="security.crypto.enc.password">Ck8OOBAE-AojvQGk9U9ZaA..</entry>

<entry key="security.crypto.mac.password">Ks_DET9uWq6ABgYh1BEHkA..</entry>

<entry key="security.disableDefaultExclusionList">false</entry>

<entry key="security.verifySSL">false</entry>

<entry key="security.maxEntries">2000</entry>

</properties>

Any pointers in the right direction gratefully accepted.

The post has been duplicated in both the Ords and Apex forum in case my assumption that it is an Ords configuration issue is incorrect.  I will maintain both threads as light is shed on the problem.

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 19 2016
Added on Oct 20 2015
6 comments
4,272 views