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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

X-APEX-FORWARD/X-ORDS-FORWARD: URL is not permitted because it lies outside the context path of

Rumburak 9000Aug 25 2020 — edited Aug 25 2020

Hello,

i wanted to redirect from an ords-POST-Request to another URL by setting the X-ORDS-FORWARD-Variable but I got an http-500:

SEVERE: Handler for: POST /ords/bla/blupp/import/test1 attempted to forward request to: http://server1/blabla which is not permitted because it lies outside the context path of: http://server1/ords/bla/

Aug 25, 2020 3:08:20 PM

SEVERE: null

InternalServerException [statusCode=500, reasons=[]]

        at oracle.dbtools.http.forwarding.ForwardingFilter.doFilter(ForwardingFilter.java:137)

        at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)

Is the redirect only possible for urls in the ords-context?

Bye,

Rumburak

This post has been answered by EJ-Egyed on Aug 25 2020
Jump to Answer

Comments

sb92075
912342 wrote:
Hi,

I'm trying to make heterogeneus connection, but when edited listener.ora return this error:

TNS-01201: Listener cannot find executable /app/oracle/product/11.2.0/db_home2/bin/oracle for SID ORCL

Any suggestions?
(PROGRAM=dg4odbc)
give fully qualified pathname for PROGRAM

PROGRAM=/u01/app/oracle/whatever/dg4odbc
Zakr
* (PROGRAM= /opt/progress/datadirect/Connect_for_ODBC_70/dg4odbc)*


[root@localhost admin]# lsnrctl start

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 13-FEB-2012 10:14:51

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Starting /home/oracle/app/oracle/product/11.2.0/dbhome_2/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                13-FEB-2012 10:14:51
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW)))
The listener supports no services
The command completed successfully
The listener supports no services
this is normal?

Edited by: 912342 on 13/02/2012 10:20

Edited by: 912342 on 13/02/2012 10:20

Edited by: 912342 on 13/02/2012 10:20
Pierre Forstmann
Yes, you may need to wait up to 1 minute for database instance automatic registration. If you don't want to wait, you need to run for each database instance:
alter system register;
Richard Harrison .
Hi,
What is your ORACLE_HOME?

is it

/home/oracle/app/oracle/product/11.2.0/dbhome_2

or

/app/oracle/product/11.2.0/dbhome_2

????

The listener log implies the first one but the parameter file implies the 2nd one?

Cheers,
Harry
Zakr
[root@localhost admin]# echo $ORACLE_HOME 
/home/oracle/app/oracle/product/11.2.0/dbhome_2

[root@localhost admin]# lsnrctl status

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 13-FEB-2012 11:10:36

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                13-FEB-2012 11:08:14
Uptime                    0 days 0 hr. 2 min. 21 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 2 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
I changed the oracle_home on listener ... but the service postgresql does not appear yet.
Richard Harrison .
Hi again,
The top comment line of your listener.ora implies it is located in db_home1 but you are starting the listener from dbhome2. If there is no config at all then a default config will be started up. This looks like what might be happening make sure the listener.ora is located in the correct ORACLE_HOME.

Cheers,
Harry
Zakr
thanks all... this solved..

create public database link pt connect to "postgres" identified by "postgres" using 'PG_SERVICE';

but now.. when create the dblink.. and try select.. return this error.
missing some lib?


select * from table_x@pt
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-28541: Error in HS init file on line 18.
ORA-02063: preceding 2 lines from PT


initPOSTGRESQL.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC

# HS init parameters
#
HS_FDS_CONNECT_INFO = "PostgreSQL Wire Protocol"
HS_FDS_TRACE_LEVEL = ON
HS_LANGUAGE = "BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1"
HS_NLS_DATE_FORMAT = "DD/MM/YYYY HH24:MI:SS"
HS_OPEN_CURSORS = 200
HS_FDS_SHAREABLE_NAME = /opt/Connect_for_ODBC_70/lib/libodbc.so
#
# ODBC specific environment variables
#
set ODBCINI=/opt/Connect_for_ODBC_70/odbc.ini
set ODBCINSTINI=/opt/Connect_for_ODBC_70/odbcinst.ini
set LD_LIBRARY_PATH = /opt/Connect_for_ODBC_70/lib:
/home/oracle/app/oracle/product/11.2.0/dbhome_2/lib:
/lib:/usr/lib:/etc)
set PATH=/opt/Connect_for_ODBC_70/lib:/home/oracle/app/oracle/product/11.2.0/dbhome_2/lib:
/lib:/usr/lib
#
# Environment variables required for the non-Oracle system
#
#set [envvar]=[value]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
Richard Harrison .
Hi again,
Is LD_LIBRARY_PATH all on one line or spread over 3 lines it looks like it is 3 lines that should all be joined together?

Cheers,
Harry
1 - 8

Post Details

Added on Aug 25 2020
2 comments
1,489 views