ERR-1013 when viewing APEX page

Hey all,
I setup a security policy on one of our data tables to limit the data based on the user that is logged into the APEX application. The users click on a tab to take them to our main query screen (which queries the secure table) and receive this error:
"Error ERR-1013 No privilege for attempted operation by user MONDSHDB. Requires role 5938220274789078, please contact your application administrator."
When they click "Ok" on the error screen, then click the same tab that gave them the error then the page loads correctly.
It seems to happen randomly, but it could just be something that I don't understand. The error can't be recreated consistently, but it is happening. Today I witnessed 8 different users get the error, but then it went away.
The parsing schema of the application is APPL_USER.
Here is the policy function_
FUNCTION DOCUMENT_TABLE_POLICY (object_schema IN VARCHAR2 DEFAULT NULL
,object_name IN VARCHAR2 DEFAULT NULL)
RETURN VARCHAR2 IS
v_nt_seq NUMBER;
BEGIN
IF user IN ('APPL_USER','CR_USER') OR INSTR(user, 'ITFC_') = 1 THEN
RETURN NULL;
END IF;
IF V('APP_USER') IS NOT NULL THEN
IF V('F_NT_SEQ') IS NOT NULL THEN
v_nt_seq := V('F_NT_SEQ');
ELSE
BEGIN
SELECT NT_SEQ
INTO v_nt_seq
FROM APPL_USERS
WHERE UPPER(NT_ID) = UPPER(V('APP_USER'));
EXCEPTION
WHEN OTHERS THEN
IF user IN ('APPL_USER','CR_USER') OR INSTR(user, 'ITFC_') = 1 THEN
RETURN NULL;
ELSE
RETURN '1=0';
END IF;
END;
END IF;
RETURN '(DOCUMENT_TYPE, MANAGED_BY_ELEMENT, PROGRAM_CODE, CONTRACT_NUMBER) IN (SELECT DISTINCT R.DOCUMENT_TYPE, USL.ELEMENT, USL.PROGRAM_CODE, USL.CONTRACT_NUMBER FROM APPL_USERS_SECURITY_LINK USL, APPL_SECURITY_ROLES R WHERE R.SECURITY_ROLE_SEQ = USL.SECURITY_ROLE_SEQ AND USL.NT_SEQ = ' || TO_CHAR(v_nt_seq) || ')';
END IF;
--UNAUTHORIZED USERS CAN SEE NO DATA
RETURN '1=0';
END;
I applied the policy to the table by doing_
BEGIN
DBMS_RLS.ADD_POLICY(
object_schema => 'APPL_USER'
,object_name => 'APPL_DOCUMENT'
,policy_name => 'APPL_DOCUMENT_POLICY'
,function_schema => 'APPL_USER'
,policy_function=> 'APPL_SECURITY.DOCUMENT_TABLE_POLICY'
END;
Any idea what this error means or what is causing it?
Can I change my policy function to prevent this?
Thanks,
Jonathan Hart
APEX 3.1.1
Oracle DB 10.2.0.3.0

Hey all,
I setup a security policy on one of our data tables to limit the data based on the user that is logged into the APEX application. The users click on a tab to take them to our main query screen (which queries the secure table) and receive this error:
"Error ERR-1013 No privilege for attempted operation by user MONDSHDB. Requires role 5938220274789078, please contact your application administrator."
When they click "Ok" on the error screen, then click the same tab that gave them the error then the page loads correctly.
It seems to happen randomly, but it could just be something that I don't understand. The error can't be recreated consistently, but it is happening. Today I witnessed 8 different users get the error, but then it went away.
The parsing schema of the application is APPL_USER.
Here is the policy function_
FUNCTION DOCUMENT_TABLE_POLICY (object_schema IN VARCHAR2 DEFAULT NULL
,object_name IN VARCHAR2 DEFAULT NULL)
RETURN VARCHAR2 IS
v_nt_seq NUMBER;
BEGIN
IF user IN ('APPL_USER','CR_USER') OR INSTR(user, 'ITFC_') = 1 THEN
RETURN NULL;
END IF;
IF V('APP_USER') IS NOT NULL THEN
IF V('F_NT_SEQ') IS NOT NULL THEN
v_nt_seq := V('F_NT_SEQ');
ELSE
BEGIN
SELECT NT_SEQ
INTO v_nt_seq
FROM APPL_USERS
WHERE UPPER(NT_ID) = UPPER(V('APP_USER'));
EXCEPTION
WHEN OTHERS THEN
IF user IN ('APPL_USER','CR_USER') OR INSTR(user, 'ITFC_') = 1 THEN
RETURN NULL;
ELSE
RETURN '1=0';
END IF;
END;
END IF;
RETURN '(DOCUMENT_TYPE, MANAGED_BY_ELEMENT, PROGRAM_CODE, CONTRACT_NUMBER) IN (SELECT DISTINCT R.DOCUMENT_TYPE, USL.ELEMENT, USL.PROGRAM_CODE, USL.CONTRACT_NUMBER FROM APPL_USERS_SECURITY_LINK USL, APPL_SECURITY_ROLES R WHERE R.SECURITY_ROLE_SEQ = USL.SECURITY_ROLE_SEQ AND USL.NT_SEQ = ' || TO_CHAR(v_nt_seq) || ')';
END IF;
--UNAUTHORIZED USERS CAN SEE NO DATA
RETURN '1=0';
END;
I applied the policy to the table by doing_
BEGIN
DBMS_RLS.ADD_POLICY(
object_schema => 'APPL_USER'
,object_name => 'APPL_DOCUMENT'
,policy_name => 'APPL_DOCUMENT_POLICY'
,function_schema => 'APPL_USER'
,policy_function=> 'APPL_SECURITY.DOCUMENT_TABLE_POLICY'
END;
Any idea what this error means or what is causing it?
Can I change my policy function to prevent this?
Thanks,
Jonathan Hart
APEX 3.1.1
Oracle DB 10.2.0.3.0

Similar Messages

  • Why do i lose my session  in apex 4.1 when viewing (public) page in iframe?

    Hi,
    When i view another apex page in an iframe from my current page using "0" session or leaving the session blank (new session) , i will lose my session and i am redirected to the login page.
    This doesn't seem right?
    Is there a workaround for this behaviour as this is really messing up the functionality of my application.
    In 4.0 everything was working fine.
    example:
    http://apex.oracle.com/pls/apex/f?p=27227:1
    demo/demo
    thanks

    Hi behteam,
    the only workaround which would come into my mind would be to
    1) put the pages you call in your iFrame into a separate application
    2) Go to shared components > authentication and specify a unique name for the cookie name
    This will make sure that your main application and your lookup application will use different session cookies and will not overwrite each other when a new session is created.
    Question: Why don't you include all the necessary page items into the URL when you call the page in the iframe, so that a refresh will set the correct session state again?
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • No scrolling when viewing man pages with Gnome terminal?

    Hi all,
    I have just installed Oracle Solaris 11 on x86. For a long time I've used Solaris 9 on SPARC. I like the new OS, but I'm having a problem viewing man pages with Gnome terminal. When I view a long man page, e.g., "man newfs", I don't get a functional scroll bar on the right hand side of the window. And although the space bar works to advance the page, when I reach the end, it doesn't return to the command prompt. It just beeps, prints "END", and I can only exit by closing the window. Can anyone tell me how to fix this? Suggestions would be much appreciated.
    Many thanks,
    Chris Tidy

    It does sound like you're using "less" instead of more. When you see the "(END)" prompt you can simply type "q" and it will exit back to the command line prompt making it unnecessary to close the window. See the "less" manual page for more detail on the less command. Under Solaris 9 the paging was done with the "more" command. If you set the PAGER environment variiable to "more" the man page will use more and revert to the behavior you'd be used to with Solaris 9. Less erases the text you've already read when you type that final "q" which is a behavior I don't like. I didn't bother to determine if there is a way to fix that with less, I just went back to more. The choice between "more" and "less" is a personal preference.

  • Is it possible to ignore the cover page of a document when viewing two pages at a time.

    when viewing a document with two pages up at a time, I want to ignore the very first page/cover page in the document so that all subsequent pages line up correctly. I can't find how to do this, is it possible. I cannot extract or delete the first page b/c the document is protected. I don't want to modify the document in any way. This document is a catalog that has information spread across two pages. So, when the cover page is included in the two page scroll viewing option, all the corresponding pages are offset by one page. I want the cover page to be at the top, by itself and the rest of the pages to show side by side.

    Show - Page Display - tick Show Cover Page in Two Page View.
    On Fri, Aug 15, 2014 at 4:55 PM, lost in acrobat <[email protected]>

  • Why there is a difference in a "class" attribute value of html tag when viewed in "Page Source" and using "Inspector", I am refering to new Microsoft site?

    While inspecting the new Microsoft site source, I observed that the "class" attribute value of the "html" tag when seen in Page Source the value given by Tools/Web Developer/Inspect tool. Value with the tool indicates class="en-in js no-flexbox canvas no-touch backgroundsize cssanimations csstransforms csstransforms3d csstransitions fontface video audio svg inlinesvg" while that is given in Page Source is class="en-us no-js"
    The question is why different values are shown?

    Inspector is showing you the source after it's been modified by Javascript and such.
    To see the same thing in the source viewer, press '''Ctrl+A''' to select everything on the page, then right-click the selection and choose '''View Selection Source'''.

  • TS1367 Fix for when viewing a page in Safari, the computer flips back to the Finder page, sometimes quickly sometimes it gives me a little time to view before flipping back to the Finder page

    I need a fix for when I'm viewing a page in Safari, the computer flips back to the Finder page, sometimes quickly, sometimes it gives me some time to view before flipping back

    http://support.apple.com/kb/ht4137

  • GTX 560 Ti Twin frozor II/oc driver stops responding when viewing web pages

    Bios Version:70.24.21.00.00
    Driver Version: 285.62
    Windows 7 64 Bit
    PC gets the Driver failed to respond and was restarted problem. I have tried rolling back driver to the 275 series same problem used clean install and driver sweeper from safe mode. Then i noticed that it only seem to happen when browsing the web and randomly. Its fine when idle with me doing nothing and fine when running any games. So i'm thinking P0 state and P12 state are okay and maybe the voltage in the P8 state is a little low. Is There an updated Bios for this card or should i up the P8 voltage a little?

    I have the exact same problem. The browser i use is Firefox. I have this problem only after i updated my drivers to latest ones, 285.62. I went back to 280.26 after i did a clean uninstall, driver sweeper , etc but the problem is still there. 

  • View the html source code of an apex page

    Hi everyone,
    I search to how I can view the html source code of an apex page and to be able to modify it. That's why viewing the html source code from the browser when the application is running doesn't arrange me.
    Has anyone an idea how it can this be possible?
    Best regards,

    Khadija Khalfallah wrote:
    Hi everyone,
    I search to how I can view the html source code of an apex page and to be able to modify it. That's why viewing the html source code from the browser when the application is running doesn't arrange me. What do you mean?
    Do you want to be able to pull up the HTML source generated by Apex, modify that copy, and then feed it back into Apex with the chagnes you made? If so you can't. Apex generates the HTML through its tools and you have to modify the generation routines to get different HTML.
    Do you merely want to look at the generated HTML? In Internet Explorer all you have to do is right click on the page and choose View Source to open a window with the HTML source in an editor. I sometimes find it useful to save a page and manually edit the copy to immediately see the effects of certain changes to the underlying HTML and/or Javascript without permanantly making the change in Apex.

  • Acrobat X: Option to hide the dotted line in between pages when viewing in 2 page view?

    Acrobat X: Anyone know if there is an option to hide the dotted line in between pages when viewing in 2 page view?  So that the 2 pages can look seemlessly joined, with no gap and no dotted line?  This would be useful when viewing PDF magazines or books in which 2 pages join for a larger picture.

    Create a Page 0 item which will be available on all pages.OMG yes I can use items in page 0 ! I should have think of that :/ Shame on me.
    Application item values can be set from JavaScript using AJAX and an On-Demand Process.Yes I already tried ajax with ODP, my getappitem() function works but my setappitem() function won't assign value to application item, but it's not a problem now, I removed the ajax part and I will use page items :D
    Thank you fac586.
    Yann.

  • Problems when viewing page in IE but not in Firefox - Help

    Please help! I'm new to using tables in Dreamweaver. I built my page in Photoshop, sliced it and then opened it in Dreamweaver. It looks fine on my Mac but when viewed on a PC in IE it appears as though there are lines or gaps between the cells of my table. How do I fix this? How can I make sure this doesnt happen again? For reference, the problem can be viewed here: http://www.amscattle.com
    Thank you for any and all help!
    SC

    Please help! I'm new to using tables in Dreamweaver. I built my page in Photoshop, sliced it and then opened it in Dreamweaver.
    Bad news - that action alone accounts for some significant percentage of the posts here on the forum.  The truth of the matter is this - the code that any graphics application writes is not usable for anything other than rapid prototyping.  This means it's not suitable for any production work.  Read this to discover one of the several reasons why that is the case -
    http://www.apptools.com/rants/spans.php
    Your gaps are a definitive proof of the brittleness of such table layouts.
    A much better approach would be to use a graphics application for what it does best - make graphics.  Build the page in DW.  Read this to see a suggested method - http://www.apptools.com/examples/pagelayout101.php

  • PDF file pages missing when viewed in Adobe Reader XI

    Hi All,
    I have been made aware of a recent issue when viewing scanned PDF files in Adobe Reader XI. Pages are missing when the PDF file is viewed in Adobe Reader v.11.0.x though all pages are visible when file is viewed in Adobe Reader 10.1.5?
    I can confirm I have checked Show large images option under Preferences -> Page -> Display, though this doesn't appear to have made a difference. I have been able to replicate this same issue on several other machines.
    All machines checked and tested are running Windows 7 (64-bit).
    Any help on this issue would be greatly appreciated.
    Thank you.

    Never heard of such an issue.  Can you share such a PDF with the forum?  See http://forums.adobe.com/thread/1408375

  • PDF export from Pages results in jagged fonts when viewed in Preview

    Hi There,
    Since installing 10.5.5 I get the following strange behavior: When exporting a file in PDF from Pages certain fonts (such as Palatino) are not shown antialiased anymore when viewed in any Apple software (Preview/Safari). When viewed in Adobe Reader, the fonts appear smooth.
    The strange thing is that, when I view PDF files generated last year before updating to 10.5.5 they still show with antialiased (i.e. smooth) fonts in the current Preview/Safari.
    It gets even stranger: When exporting the files as .doc into (the resented and ridiculously slow and memory gulping) Word 2008, and then converting them into PDF via the Print command, this phenomenon does not occur, i.e. the fonts look smooth in Preview/Safari.
    I would appreciate if anyone had some constructive input to this problem. I would really like to be able avoiding using Word!
    Thanks much in advance!

    I had the exact same problem that you were describing. I'd create a document in Pages '08, then export it to PDF and I'd find that the text wouldn't be anti-aliased in the PDF.
    I was using one of the resumé templates that comes with Pages '08. The template by default sets the font size very low in certain areas of the page, as low a 7. I went through my document and bumped up font sizes that were below 9 and set them to 9. Now when I export to PDF the text looks great.
    It was far from obvious to me that the font sizes were linked to the anti-aliasing in my exported PDFs.

  • When i set page as template, set editable regions and try to view in browser IE 9 a download box com

    When I set page as template, set editable regions and try to view in browser IE 9 a download box comes up and when i click open it just opens the file again in DW.

    Use the Template to spawn a child page.  File > New > Page from Template...
    Save the child page as some_file.html and then preview that in your browsers.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • Indesign crashes when trying to view certain page

    Hi, I have a 150 page document that I am working on in Indesign CS5 using a Macbook Pro 10.7.5. I am able to view and adjust every page except page 132-133. Every time I try to view those pages I get the message "the connection was lost for file filename.indd or the file was modified by another process". When I export the page to PDF it looks just fine. However, there are some adjustments I'd like to make but I can't access the file without the error message popping up and the program crashing. I have tried accessing the page in all sorts of ways with no luck (links, jump to page, scrolling, etc) every time it crashes.
    All the files are on my home computer - there is no 'network' or another process that would interfere as far as i know.
    Any suggestions?
    Thanks

    Try exporting the file as IDML to remove the corruption.
    Open the file in InDesign.
    Export the file to IDML (InDesign CS4/CS5) or INX (InDesign CS3 and earlier) format:
    Choose File > Export.
    From the Save As Type menu, choose InDesign Markup, or InDesign Interchange.
    Give the file a name and location, and then click Save.
    Open the exported IDML or INX file back into InDesign.
    This process rewrites the data in the InDesign document and can repair damage within the original document.

  • Pages disappear when viewing and printing

    On our Windows 7 Professional (Service Pack 1) 64-bit computer, using the Reader application directly (not through a browser), we have been frustrated with blank pages appearing while viewing and printing.
    This happens in Adobe Reader 9.5.0, 9.5.3, and 11.0.06.  (We had been experiencing these problems with 9.5.3, so uninstalled and installed 9.5.0, then updated to 11.0.06.  Same problem appears in all versions, but now is exceptionally bad in 11.0.06.   At one time we had updated to Reader 10, but reverted to Reader 9 because Reader 10 would not center pages correctly when printed, especially when Fit to Page was used.)
    When we open a file, pages initially display correctly.  But when we begin to scroll back and forth from page to page, the page images start disappearing. When we print, pages may display correctly just before the print button is pressed, and then may disappear after pressing the print button. If it disappears before the print function has completed, blank pages are output.   If a multi page document, the first few pages may print correctly then blank pages. 
    Once a page goes blank while viewing or printing, it does not restore.  One must close the PDF file and open it again.
    We have over 200 documents of 30 to 50 pages each, which are printed on a frequent basis and then bound.  It is extremely annoying and costly to have blank pages output when there should be info on the page.    We have been printing these documents for eight years.  Two years ago started using a brand new Windows 7 computer for printing PDF files, but the blank page issue started surfacing about 6 to 9 months ago and is getting more frequent.

    The system has 4GB of memory.  The processor is Intel Core i5 - 2400.
    As per your suggestion, I updated the driver for the integrated graphics
    card (Intel Graphics HD 2000).  The new driver is dated January 2014.  The
    old driver was dated June 2011.
    I tried to replicate the blank pages situation, and none went blank.   Will
    continue to test over the next week or so, but this looks very promising.
    Many, many thanks, Pat!

Maybe you are looking for