Monday, November 07, 2011

APEX PDF Printing II and ORA-20001 "Printing Engine"

If you use APEX PDF printing with an 11G database, make sure you configure the acl. 11G does NOT allow alless to the www by default!
When you run into 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

Then, try this:
BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => 'www.xml',
description => 'ACL for ApEx Printing',
principal => 'APEX_040100'
is_grant => true,
privilege => 'connect');

DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl => 'www.xml',
principal => 'APEX_040100',
is_grant => true,
privilege => 'resolve');

DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl => 'www.xml',
host => 'your.FOP.host.here');
END;
/
COMMIT;

12 comments:

  1. Thanks for excellent post.

    ReplyDelete
  2. Hello, I'm using oracle 10.2.0.4... That's why I dont need ACL privileges. But I'm still getting the same error. Why, Do you have any idea?

    ReplyDelete
  3. Hello again,
    it was due to wrong port of bi publisher...the default ise 9704, but with the trial edition it gets up with port 7001...

    ReplyDelete
  4. @Meltem: thanks for the feedback! Appreciate it. Hopefully it will help others to look at the port#, too.

    ReplyDelete
  5. ora-44416 -invalid acl:unresolved principle apex_040100

    ReplyDelete
  6. ora-44416 has to do with an illegal user or role, while defining the ACL.
    Check your syntax.

    ReplyDelete
  7. Cheers, fantastic post. Got my error resolved and I had to add localhost in host parameter.

    ReplyDelete
  8. it's work.
    But if i do it from: shared components->report queries -> test report

    if i do it from application it's not working!

    ReplyDelete
  9. Nice sharing,thanks thats have been helping me

    ReplyDelete
  10. connect by sys

    run below command

    BEGIN
    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => 'www.xml',
    description => 'ACL for ApEx Printing',
    principal => 'APEX_040200',
    is_grant => true,
    privilege => 'connect');

    DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl => 'www.xml',
    principal => 'APEX_040200',
    is_grant => true,
    privilege => 'resolve');

    BEGIN
    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl => 'www.xml',
    host => 'localhost',
    lower_port => 7001);
    END;


    END;
    /

    principal => 'APEX_040200', It will be Apex version which is installed in your machine .

    Hostname will be name of machine on which bi is installed.

    after this works for me i am able to print pdf by apex.

    thanks



    ReplyDelete
  11. First of all, this post is over 5 years old. Secondly: how is your solution different in any way from what is not mentioned above?

    ReplyDelete
  12. First of all, this post is over 5 years old. Secondly: how is your solution different in any way from what is not mentioned above?

    ReplyDelete