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!

REST on ORDS 2.0.8 and DB 12.1.0.2 accessing PDB returns invalid username / password

Roel HartmanAug 5 2014 — edited Oct 9 2014

Yesterday I upgraded my database to 12.1.0.2.

Then I removed APEX from the container database and (re)installed it in a PDB (called apex42).

Downloaded and configured ORDS 2.0.8.

Now APEX runs just fine. Great!

Now I want to use the REST stuff again. So I ran the apex_rest_config.sql - which creates the APEX_REST_PUBLIC_USER and APEX_LISTENER users. I verified I can log in using SQLPlus with these users and passwords. Ran ORDS config again to store the passwords in the XML files.

But testing REST services returns this (after switching debug on):

    Error during evaluation of resource template: GET hr/employees/, SQL Error Code: 1,017, SQL Error Message: ORA-01017: invalid username/password; logon denied

Request Path passes syntax validation

Mapping request to database pool: PoolMap [_failed=false, _lastUpdate=1407103200000, _pattern=/demo/, _poolName=apex, _regex=null, _type=BASE_PATH, _workspaceIdentifier=DEMO, _serviceName=null]

Applied database connection info

Attempting to process with PL/SQL Gateway

Not processed as PL/SQL Gateway request

Attempting to process as a RESTful Service

hr/employees/ matches: hr/employees/ score: 0

Choosing: oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as current candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=3177324644782361|3177909187782428, uriTemplate=hr/employees/], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=NONE], originsAllowed=[], corsEnabled=true]

Determining if request can be dispatched as a Tenanted RESTful Service

Request path has one path segment, continuing processing

Tenant Principal already established, cannot dispatch

Chose oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as the final candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=3177324644782361|3177909187782428, uriTemplate=hr/employees/], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=NONE], originsAllowed=[], corsEnabled=true] for: GET hr/employees/

hr/employees/ is a public resource

Using generator: oracle.dbtools.rt.json.query.JSONQueryGenerator

Performing JDBC request as: DEMO

Error during evaluation of resource template: ORA-01017: invalid username/password; logon denied

These are the “db”-entries in the defaults.xml file.

<entry key="db.hostname">localhost</entry>

<entry key="db.password">@05D44DA435E3E78677DDE9C471942412B5</entry>

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

<entry key="db.servicename">apex42</entry>

contents of the apex_rt.xml file:

<entry key="db.password">@05ED7A07BBB7570F17EA7258C03F13673C</entry>

<entry key="db.username">APEX_REST_PUBLIC_USER</entry>

My assumption is that the REST service is trying to log into the CDB and not the PDB - but that assumption might be false …

What could I do to get this running ?

This post has been answered by Roel Hartman on Aug 6 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2014
Added on Aug 5 2014
7 comments
3,556 views