I am working on Apex 5, want to run bi publihser report with apex. I created instance in Manage Instance>Report Printing of apex Host Address : localhost Port:7001 Print Server: /xmlpserver/convert
Now created report query but when i click "Test Report Query" it shows me error ORA-20001: The printing engine could not be reached because either the URL specified is incorrect or a proxy URL needs to be specified.
My BI configure components are Configure Components
Oracle Enterprise Manager
http://naeemshahzad-PC:7001/em
Business Intelligence Enterprise Edition
naeemshahzad-PC:9704/analytics
Business Intelligence Publisher
naeemshahzad-PC:9704/xmlpserver
Please help me.
The reason of this error :
ORA-20001: The printing engine could not be reached because either the URL specified is incorrect or a proxy URL needs to be specified.
is because by default, the ability to interact with network services is disabled in Oracle Database 12c
. Therefore, if you are running Oracle Application Express 5.0
with Oracle Database 12c
, you must use the new DBMS_NETWORK_ACL_ADMIN
package to grant connect privileges to any host for the APEX_050000
database user.
Therefore you should grant connect privilages to APEX_050000
Solution:
Connect to database where Oracle Application Express is installed as SYS
specifying the SYSDBA
role. (connect to sqlplus by sys as sysdba user)
Then run following plsql:
DECLARE
ACL_PATH VARCHAR2(4000);
BEGIN
-- Look for the ACL currently assigned to '*' and give APEX_050000
-- the "connect" privilege if APEX_050000 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_050000',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'APEX_050000', TRUE, 'connect');
END IF;
EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'APEX_050000', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;
after that run:
DECLARE
ACL_PATH VARCHAR2(4000);
BEGIN
-- Look for the ACL currently assigned to 'localhost' and give APEX_050000
-- the "connect" privilege if APEX_040200 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_050000',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'APEX_050000', TRUE, 'connect');
END IF;
EXCEPTION
-- When no ACL has been assigned to 'localhost'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
'ACL that lets users to connect to localhost',
'APEX_050000', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;