This discussion is archived
5 Replies Latest reply: Nov 17, 2012 10:18 PM by Hasan Al Mamun RSS

Error in ODF printing in Apex 4.1, in 11g r2 database.

Hasan Al Mamun Newbie
Currently Being Moderated
Hi there,

I have installed BI Publisher 10 in my PC. which runs fine in http://<pc_name>:9704/xmlpserver. Then logging into the database Oracle 11g R2 as sysdba I have run the following script in to allow acl for Apex_040100 user:

DECLARE
ACL_PATH VARCHAR2(4000);
ACL_ID RAW(16);
BEGIN
-- Look for the ACL currently assigned to '*' and give APEX_040100
-- the "connect" privilege if APEX_040100 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;
-- Before checking the privilege, ensure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'APEX_040100'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--
SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;
DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_040100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'APEX_040100', 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_040100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;

No error was found.
------------------

In Apex Logged in as admin user.

and changed the setting as follows:

Print Server     : Oracle BI Publisher
Print Server Protocol     : HTTP
Print Server Host Address     : mamun-pc
Print Server Port           : 9704
Print Server Script     : /xmlpserver/convert


I have created a report query. When try to test the report query which is supposed to come in pdf format, does not work instead it gives following error:

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.

Now I am stuck here. Please suggest what can I do.


Hasan Al Mamun
Programmer
Bangladesh
  • 1. Re: Error in ODF printing in Apex 4.1, in 11g r2 database.
    Kofi Journeyer
    Currently Being Moderated
    Hi Hasan,
    Can you access BI publisher from the DB Server, or at least other PCs? Is there a firewall setting that could block access to your BI publisher PC?
    Kofi
  • 2. Re: Error in ODF printing in Apex 4.1, in 11g r2 database.
    Hasan Al Mamun Newbie
    Currently Being Moderated
    I have done it in my laptop, with configuration Core i5, Ram 6 GB, OS: Windows 7 64bit. Database 11g r2 64 bit. You mentioned a good point ,I did not test it from other computer whether I can access http://mamun-pc:9704/xmlpserver. Did not check firewall status as well. I will try with it.

    Thanks


    Hasan Al Mamun
  • 3. Re: Error in ODF printing in Apex 4.1, in 11g r2 database.
    Hasan Al Mamun Newbie
    Currently Being Moderated
    I have tried it every way But it's not working any way. Gone through all documents and helps found in the web tried that all but no way.. same old
    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.



    Hasan Al Mamun

    Edited by: 913230 on Nov 16, 2012 10:40 PM
  • 4. Re: Error in ODF printing in Apex 4.1, in 11g r2 database.
    Hasan Al Mamun Newbie
    Currently Being Moderated
    Finally I got success. I have run the script for local machine. Which I ignored earlier though that running the script for all hosts will do. Finally I have run following script and it worked.

    DECLARE
    ACL_PATH VARCHAR2(4000);
    BEGIN
    -- Look for the ACL currently assigned to 'localhost' and give APEX_040200
    -- 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_040200',
    'connect') IS NULL THEN
    DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
    'APEX_040200', 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_040200', TRUE, 'connect');
    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
    END;
    /
    COMMIT;


    Hasan Al Mamun
    Programmer
    Bangladesh Bank
    Dhakla, Bangladesh
  • 5. Re: Error in ODF printing in Apex 4.1, in 11g r2 database.
    Hasan Al Mamun Newbie
    Currently Being Moderated
    I am running Oracle database, Apex 4.2, Web-tier 11 and BI publisher in my laptop but I have ignored initially the script for local host to have network access. Finally I did it and it worked.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points