ORA-28113 policy predicate has error when created VO with some tables

When I created a VO with just SQL statements(no EO), if the sql statements included some special tables or views such as:
hz_locations
oe_order_headers_v
when testing the validation of the sql statement, I encountered the following errors:
SQL Query Error Message: ORA-28113 policy predicate has error
and I can't continue to create this VO.
Does JDeveloper have some special rules to check some tables or views behind the scenes?
I used the apps/apps to connect and the following sql to create the VO:
select state from hz_locations
Can anyone give some help?
Many thanks in advance!

Hi prasannaj,
Thanks for your prompt response.
I find the solution and would like to share with all.
As I guessed, this is related to the policy.Execute the following sql:
select * from dba_policies where object_name ='hz_locations'
you'll find the point.
So I run policy manager with oracle database client, and find the policy related to the table 'hz_locations' , and disable this policy.
At this time, with the original sql:
select * from hz_locaitons
created VO and everything goes fine and passed the validation.
But in fact I wondered if this is the best workaround for this issues.
If anyone has the same problem, you can refer to my solution.
If you have better solution, also let me know.
Thanks!

Similar Messages

  • ORA-28113: policy predicate has error

    I am trying to apply a policy predicate to a table to restrict the columns users see when executing a select query. I have created the context and can select from it using DUAL in a SQL session, the package to create the predicate is as follows
    CREATE OR REPLACE PACKAGE BODY XYZ
    AS
    function ABC(D1 varchar2,D2 Varchar2)
    Return Varchar2 IS
    d_predicate varchar2(2000);
    v_value varchar2(1) := 'Y';
    BEGIN
    d_predicate := 'SYS_CONTEXT("MY_CONTEXT","MY_VALUE") = v_value';
    RETURN d_predicate;
    END ABC;
    END XYZ;
    Each time I select from the table I get the error above, can anyone see the problem?
    Thanks in advance
    Tina

    The below example would be helpful how to use it.
    create or replace package security_package as
    function user_data_insert(owner varchar2,objname varchar2) return varchar2;
    function user_data_select(owner varchar2,objname varchar2) return varchar2;
    end security_package;
    Package created.
    SQL> create or replace package body security_package
    is
    function user_data_insert(owner varchar2,objname varchar2)
    return varchar2
    is
    predicate varchar2(2000);
    begin
    predicate:= '1=2';
    if (sys_context('userenv','session_user')='MOHAN1') then
    predicate:=NULL;
    else
    predicate:= 'user_id=sys_context("MOHAN1","USER_ID")';
    end if;
    return predicate;
    end user_data_insert;
    function user_data_select(owner varchar2,objname varchar2) return varchar2
    is
    predicate varchar2(2000);
    begin
    predicate:= '1=2';
    if (sys_context('userenv','session_user')='MOHAN1') then
    predicate:=NULL;
    else
    predicate:= 'user_id=sys_context("MOHAN1","USER_ID")';
    end if;
    return predicate;
    end user_data_select;
    end security_package;
    Thanks,
    Vissu....

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • Error when creating index with parallel option on very large table

    I am getting a
    "7:15:52 AM ORA-00600: internal error code, arguments: [kxfqupp_bad_cvl], [7940], [6], [0], [], [], [], []"
    error when creating an index with parallel option. Which is strange because this has not been a problem until now. We just hit 60 million rows in a 45 column table, and I wonder if we've hit a bug.
    Version 10.2.0.4
    O/S Linux
    As a test I removed the parallel option and several of the indexes were created with no problem, but many still threw the same error... Strange. Do I need a patch update of some kind?

    This is most certainly a bug.
    From metalink it looks like bug 4695511 - fixed in 10.2.0.4.1

  • Error when creating PO with reference to PR

    Hello Expert,
    When creating PO with reference to PR I encountered with one error i.e. system is taking into consideration one to one relation of PR line item to PO line item. For example: I have created PR with one line item for XYZ value and with reference to PR line item I am creating one PO but with two line items in PO that means I am splitting PR value into two line items in PO, 1st line item with zero tax and second one is with tax.
    So there is one PR line item but in PO I am creating two line items with reference to single PR item. In this case system is giving error saying Item 001 WBS element XXXXXXXXXX budget exceeded. message no: BP604. However if I create single line item in PO then it wont give any error.
    Please suggest any customization setting is done for such kind of behavior of the system.
    Thanks
    Shyam

    Hi,
    SAP creates the requisition with item category "U" even in case of cross-company (intercompany) purchase requisition.
    When converting it to PO the item category becomes blank - as I tried and I got no error message.
    Please check your settings under SPRO > MM > Purchasing > Purchase Order > Define Document Types (V_T161). You will see (if standard settings have not been changed) that NB requisition type with "U" item category is allowed for NB purchase order type with " " (empty) item category.
    Regards,
    Csaba

  • Policy predicate has error

    i'm building my where clause inside the function that gets executed by a policy. the where clause is a string that looks something like this after it is built:
    deptid IN ('00000', '00001', '00005'). the problem i'm having is when there are alot (1000+) dept ids to be included in the IN clause. I've tried creating a loop so that there are only 100 dept ids in each IN clause because from what i've read there is a limit of 255 parameters for an IN clause. Doing this, my string that i build looks structurally sound as i'm able to see it using the dbms_output.put_line(). It looks something like this:
    deptid IN ('00000', '00001', '00002', ....) or deptid IN ('00006', '00007', '00008', ....)
    also, the total number of characters for the string should be fine, as it is around 14,000 when everything is concatenated. so why do i get the error that the policy predicate is bad?? i'm thinking there is some size limitation i'm not aware of.

    I tend to believe that you probably run into some misspellings.
    Cause what are you doing differently?:
    SQL> create or replace function emp_pol_func (
      2     p_schema   in   varchar2,
      3     p_object   in   varchar2
      4  )
      5     return varchar2
      6  as
      7     l_return_value   long;
      8  begin
      9     l_return_value :=
    10        'deptno IN (''63701'', ''00135'', ''00136'', ''00201'', ''00202'', ''
    00203'', ''00250'', ''00301'', ''00302'', ''00401'', ''00540'', ''00542'', ''006
    01'') OR deptno IN (''02704'', ''02705'', ''02706'', ''02707'', ''02708'', ''027
    09'', ''02718'', ''02719'', ''02737'', ''02738'', ''02739'', ''02740'', ''10'',
    ''20'')';
    11     dbms_output.put_line ('Length: ' || length (l_return_value));
    12     return l_return_value;
    13  exception
    14     when others
    15     then
    16        dbms_output.put_line (sqlerrm (sqlcode));
    17  end emp_pol_func;
    18  /
    Funktion wurde erstellt.
    SQL> begin
      2     dbms_rls.add_policy (object_schema        => user,
      3                          object_name          => 'EMP',
      4                          policy_name          => 'EMP_POL',
      5                          function_schema      => user,
      6                          policy_function      => 'EMP_POL_FUNC',
      7                          statement_types      => 'SELECT',
      8                          update_check         => false,
      9                          enable               => true
    10                         );
    11  end;
    12  /
    PL/SQL-Prozedur erfolgreich abgeschlossen.
    SQL>
    SQL> select empno, ename from emp
      2  /
         EMPNO ENAME
          7839 KING
          7782 CLARK
          7566 JONES
          7788 SCOTT
          7902 FORD
          7369 SMITH
          7876 ADAMS
          7934 MILLER
    8 Zeilen ausgewõhlt.
    Length: 261
    Length: 261   <-------------------------   length can be longer than 255

  • Error when creating BufferedImage with IndexColorModel from a byte array.

    Hi, I have a 1-dimentional byte array and an IndexColorTable, and I can't figure out how to combine the 2 into an BufferedImage without unnecessary copying/reallocating of the image buffer.
    The color model I have is:
    int [] cmap = new int [numColors];
    cmap[i++] = 0xffa0f000;  /etc.
    new IndexColorModel(8, 22, cmap, 0, true,  transparentIndex,  DataBuffer.TYPE_BYTE );Thanks for your help
    -Ben
    Ps.
    I've was looking at some example code (http://javaalmanac.com/egs/java.awt.image/Mandelbrot2.html?l=rel), and can't figure out how to go from the color model they're using to the one I have (the 8 bit one specified above). When I replace the 4bit colormodel in the code below with the 8bit color model specified above, I get the following error:
    [java] java.lang.IllegalArgumentException: Raster ByteInterleavedRaster: width = 5120 height = 3520 #numDataElements 1 dataOff[0] = 0 is incompatible with ColorModel IndexColorModel: #pixelBits = 8 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@c51355 transparency = 2 transIndex = 22 has alpha = true isAlphaPre = false
    [java] at java.awt.image.BufferedImage.<init>(BufferedImage.java:613)
    Code:
    byte[] pixelArray = (byte[]) getData_CHAR();                
    int width = 5120;
    int height = 3520;
    int numbytes = width*height;
    //create DataBuffer using byte buffer of pixel data.
    DataBuffer dataBuffer = new DataBufferByte(pixelArray, numbytes, 0);
    //prepare a sample model that specifies a storage 8-bits of pixel data in an 8-bit data element
    int bitMasks[] = new int[]{0xf};
    SinglePixelPackedSampleModel sampleModel = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE, width, height, bitMasks);
    //create a raster using the sample model and data buffer
    WritableRaster writableRaster = Raster.createWritableRaster(sampleModel, dataBuffer, new Point(0,0));
    //generate 16-color model
    byte[] r = new byte[16];
    byte[] g = new byte[16];
    byte[] b = new byte[16];
    r[0] = 0; g[0] = 0; b[0] = 0;
    r[1] = 0; g[1] = 0; b[1] = (byte)192;
    r[2] = 0; g[2] = 0; b[2] = (byte)255;
    r[3] = 0; g[3] = (byte)192; b[3] = 0;
    r[4] = 0; g[4] = (byte)255; b[4] = 0;
    r[5] = 0; g[5] = (byte)192; b[5] = (byte)192;
    r[6] = 0; g[6] = (byte)255; b[6] = (byte)255;
    r[7] = (byte)192; g[7] = 0; b[7] = 0;
    r[8] = (byte)255; g[8] = 0; b[8] = 0;
    r[9] = (byte)192; g[9] = 0; b[9] = (byte)192;
    r[10] = (byte)255; g[10] = 0; b[10] = (byte)255;
    r[11] = (byte)192; g[11] = (byte)192; b[11] = 0;
    r[12] = (byte)255; g[12] = (byte)255; b[12] = 0;
    r[13] = (byte)80; g[13] = (byte)80; b[13] = (byte)80;
    r[14] = (byte)192; g[14] = (byte)192; b[14] = (byte)192;
    r[15] = (byte)255; g[15] = (byte)255; b[15] = (byte)255;
    //create buffered image    
    ColorModel colorModel = new IndexColorModel(4, 16, r, g, b);
    BufferedImage image = new BufferedImage(colorModel, writableRaster, false, null);Message was edited by:
    ben_weisburd
    Message was edited by:
    ben_weisburd

    I had the same problem too.
    anyone found the solution for this problem?
    thanks
    Bruno Rabino
    When I try to make a MD-form, where the base-table for the detail contains a column with a BLOB-datatype. I get following error when I finish creation of the form.
    Error: Exception from wwv_generate_component.build_procedure (WWV-01821)
    Error creating module: ORA-01403: no data found (WWV-16042)
    When I use the table with the BLOB as master or in a form, it works fine.
    Has anyone else experienced this problem? Or knows a way to fix or work around it. Thanks in advance.
    Portal version: 3.0.6.6.5
    null

  • Error when creating MD with a blob on detail

    When I try to make a MD-form, where the base-table for the detail contains a column with a BLOB-datatype. I get following error when I finish creation of the form.
    Error: Exception from wwv_generate_component.build_procedure (WWV-01821)
    Error creating module: ORA-01403: no data found (WWV-16042)
    When I use the table with the BLOB as master or in a form, it works fine.
    Has anyone else experienced this problem? Or knows a way to fix or work around it. Thanks in advance.
    Portal version: 3.0.6.6.5
    null

    I had the same problem too.
    anyone found the solution for this problem?
    thanks
    Bruno Rabino
    When I try to make a MD-form, where the base-table for the detail contains a column with a BLOB-datatype. I get following error when I finish creation of the form.
    Error: Exception from wwv_generate_component.build_procedure (WWV-01821)
    Error creating module: ORA-01403: no data found (WWV-16042)
    When I use the table with the BLOB as master or in a form, it works fine.
    Has anyone else experienced this problem? Or knows a way to fix or work around it. Thanks in advance.
    Portal version: 3.0.6.6.5
    null

  • Error when creating connection with SSO Authentication mode

    Hi All,
    when I am creating the connection with Authentication Mode as SSO, I get error "Unable to connect to SAP BW Server User abc has no RFC Authorization for function group SYST".
    When I am craeting connection with specific user id and Password it works fine.
    Pls. let me know whats the problem with creating connection with SSO.
    System Info: BOXIR.3.1 Sp3, SAP 7.1
    Regards,
    Nisha

    Yes, I have installed Integration Kit, and configured the SSO.
    I am able to login into designer with Authentication as SAP.
    But, the Problem is with connection creation with SSo authentication mode.
    Is there any property or role needs to be defined for the universe designer Group or user, so that SSO is allowed in authentication mode?
    Regards,
    Nisha

  • HTMLDB Newbie: ORA-01658 error when creating new app or table from sprdsht

    Hey there. I'm new to HTML DB and trying to create a new app (or even a new table) from a simple spreadsheet. I've tried both comma and tab delimited, but get the same error message every time. This is in my workspace on htmldb.oracle.com.
    "ORA-20001: create_table error: ORA-20001: Excel load run ddl error: ORA-01658: unable to create INITIAL extent for segment in tablespace FLOW_693"

    Scott,
    Thanks, but I don't think that's the problem. My workspace is 100Mb, and it's almost empty. I can install & run sample apps just fine, but not create a new app from a spreadsheet. The spreadsheet is small, to: nine columns and about 50 rows.
    Any ideas?

  • Error when creating Alert on PER_PERIODS_OF_SERVICE table (error:DRG-10502)

    R12.1.3
    I have create an alert on PER_PERIODS_OF_SERVICE table (after insert, after update).
    After Terminating an employee, ALert Manager is attempting to run the DQM Serial Sync Index Program and am receiving the
    following error:
    DRG-10502: index AR.HZ_STAGE_PARTY_SITES_T1 does not exist
    Error syncing hz_stage_contact_t1 :ORA-20000: Oracle Text error:
    DRG-10502: index AR.HZ_STAGE_CONTACT_T1 does not exist
    Error syncing hz_stage_cpt_t1 :ORA-20000: Oracle Text error:
    DRG-10502: index AR.HZ_STAGE_CPT_T1 does not exist
    Error syncing hz_stage_parties_t1 :ORA-20000: Oracle Text error:
    DRG-10502: index AR.HZ_STAGE_PARTIES_T1 does not exist
    Any idea?

    Not sure what is going on there, but I can tell you those indexes don't exist in our database either!
    Is the alert you're using a custom one built by you, or is it a standard one? If it's the later I would be inclined to raise an SR.

  • Error when create JLabel with ImageIcon from server

    Hi!
    When I run applet that contain JLabel(String, ImageIcon, int) from server I get follow error: "java.security.AccessControlException: access denied (java.io.FilePermission middle-1.gif read)". .gif-file and .class-file are located in the same directory. From local disk this applet run successfully. Who can help me?
    Thanks.

    Look at the docs for Applet class, and use getImage()
    from there. Running in browser is quite different
    than to run locally...
    Better yet to pack image and classes in jar file,
    and read from there with getResourceAsStream()
    ( search forums, there were examples )

  • An error has occurred when creating this editor

    I had created a View in a WDC project which I had also deployed and run successfully in GP several times. Once I closed and opened NetWeaver Developer Studio, and tried to open this View again I get an error saying 'An error has occurred when creating this editor'. Please let me know what could be the reason.
    Anil

    I also faced with this problem several times but without fatal consequences. To be sure you can check the log in your workspace and paste it to the thread.
    Also, try to close all the views and reopen the studio, usually it solves the problem.
    Aliaksei

  • Internal Error ORA-0600 when creating multiple consumer queue table

    Hi,
    I tried to create a multiple consumer queue table with the following statements:
    exec DBMS_AQADM.GRANT_TYPE_ACCESS ('system');
    create type Change_History_Trigger_Data as object(Col1 VARCHAR2(255), Col2 VARCHAR2(128), Col3 VARCHAR2(255), Col4 TIMESTAMP, Col5 VARCHAR2(64), Col6 VARCHAR2(64), Col7 NUMBER(8));
    Works fine till this stage. But the following statement produces an ORA-0600 internal error message.
    EXEC DBMS_AQADM.CREATE_QUEUE_TABLE ('change_history_queue_tbl','Change_History_Trigger_Data', 'tablespace my_tblspace','ENQ_TIME',TRUE,DBMS_AQADM.TRANSACTIONAL);
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [kcbgtcr_4], [14392], [0], [1], [], [], [], []
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2224
    ORA-06512: at "SYS.DBMS_AQADM", line 58
    ORA-06512: at line 1
    I tried creating the same queue table with Multiple consumer = FALSE, and it works fine. But not with multiple consumer = TRUE
    I'm running on Oracle9i Enterprise Edition Release 9.2.0.6.0
    Any possible solutions?

    Problem solved.
    The queue name was too long. Found a post with the same problem.
    Re: Create Queue Table ORA-00600 while dbms_aqadm.create_queue_table
    thanks anyway

  • APEX bug:9879227 (ORA-01403: no data found error when using validations)

    Hi,
    We are getting the
    ORA-01403: no data found error
    when the APEX page has validations AND a tabular form is also present on the page.
    I did see a couple of other forum links discussing the issue (bug id: 9879227 ?? ).
    But what i want to get a confirmation on is, in which release was this bug really fixed ?
    i see the release notes of 4.0.1.00.03 claiming that it is fixed
    in the release.
    we are on 4.0.1.00.03. is this bug really solved in release 4.0.1.00.03?
    are there any known work-arounds ? i tried re-creating the report multiple times, but that did not help.
    Any suggestions or work-arounds will greatly help us.
    Regards,
    Ramakrishnan

    Ramakrishnan,
    If you are talking about getting no data found when trying to save the report then take a look at the last message in this thread:
    {message:id=9971445}
    Cheers,
    Tyson Jouglet

Maybe you are looking for

  • Xml file not displaying.

    Hello all, Pls i am trying to work on an example that displays some pics in form of slide show. Everything worked fine till i got to a point of displaying the content of an xml file. I tried all i could but things did not work out. someone pls help,

  • How to get OGG format in Logic Studio

    How to get OGG format in Logic Studio

  • Why does my avi file get recognized on my windows 7 pc and not my 8.1?

    I have a windows 7 laptop that I've been working on a premiere file with, with one of the files included is an avi. I haven't had any issues. But I tried to open the same file on my surface tablet with 8.1, and got an error saying that the file is ei

  • Conversion Agent Service Error

    Hi I have tried to Install the CA engine, deployed the *.SCA files, Copied the Services SubDirectories onto ServicesDB of XI Server which is on Windows 32bit.I am able to run the 'CM_Console' and 'CM_Console testCME' tests with sucess.However when I

  • BPMN supported version in BPM Studio 10.3.1

    Hi all, can someone tell me what's is the BPMN version supported in BPM studio version 10.3.1 ? strangely enough i've not been able to find this info thanks -BR J.