Createrow() with some null values for attributes errors out

I am trying to insert rows from one table to another table.
I get all the values from source table to be inserted into the destination table and set the row attributes as required.
              Row newrow = (Row)MAToolingVO.createRow();
              MAToolingVO.insertRow(newrow);
              newrow.setAttribute("InventoryItemId", new Number(InvItemId));
              newrow.setAttribute("OrganizationId", new Number(102));
              newrow.setAttribute("Machine", new Number(Machine));
              newrow.setAttribute("SetNumber", new Number(SetNumber));
              newrow.setAttribute("ToolSequence", tseqNum);  
              newrow.setAttribute("FamilyCode", Family);                
              newrow.setAttribute("ClassCode", Class1);                              
              newrow.setAttribute("ToolingItem", ToolingItem);                                            
              newrow.setAttribute("ToolingItemId", ToolingItemId);                                                          
              newrow.setAttribute("Description", ToolingDesc);
///added these rows because it was throwing NPE , --these are user inputs, they should be null at the time of row creation  and user can save them null too.                                                          
              newrow.setAttribute("InsertDesc", "-");    
              newrow.setAttribute("Grade", "-");                                                                                      
              newrow.setAttribute("ExtraLength", new Number(0));                                                                        
              newrow.setAttribute("ToolLength", new Number(0));               
//after adding these rows, NPE is gone, but it still doesnt commit to the database. WHY ?
              newrow.setNewRowState(Row.STATUS_INITIALIZED);
               poRow.setAttribute("CheckBox", Boolean.TRUE);
If user enters values in all the fields : InsertDesc, grade, ExtraLength, ToolLength , then row gets commited to db, else not.
Also none of the fields are mandatory and can be null.
please suggest.
thanks

any one on this please ?
when i create new row, columns for primary keys and other values get set correctly, but if user doesnt input some value in text fields of newly created row, they dont get saved to the db.
I even tried defaulting some values to the optional attributes, but still doesnt work.

Similar Messages

  • Update error: POL - 4008 null buffer for attribute is not allowed

    I am attempting to update a column in my Oracle Lite database through JDBC.
    The statement is:
    ds = getDataSource();
    conn = getConnection(ds);
    stmt = getStatement(conn);
    int results = stmt.executeUpdate("UPDATE SYSTEM.PM_PASSENGERS SET CURRENT_STATUS_EVENT_ID = 267 WHERE PASSENGER_ID = 1");
    System.out.println(results+" rows affected.");
    conn.commit();
    which results in the message:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 rows affected.
    [POL-4008] null buffer for attribute is not allowed
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    I am not sure what that means exactly. Does that mean there is some problem with the commit?
    Thanks,
    Allen

    Is it necessary to update the entire record in Oracle Lite, or should it be possible to update select columns only when performing an update query?
    Thanks,
    Allen

  • Pro*C & SQLDA with NULL value for predicate column

    Hi: I am using a C program to update a table via a dynamic sql (method 4) and SQLDA. In the update statement predicate, I have place holders (as in TBLCOL=:C000). One of the columns in the predicate contains null values, so I set L[n] = 0, V[n] = pData (which pData[0] = '\0'), *(I[n]) = -1, and T[n] = 5 (for text). I cannot find the row that I know is there.
    I cannot change my statement to contain TBLCOL IS NULL, since I don't know ahead of time if I'm looking for rows with null values for this column. The Pro*C manual says that by setting the appropriate *(I[n]) = -1, it indicates to Oracle to simulate the "IS NULL" clause, and update the appropriate rows. In my case, I receive 1403 as SQLCODE when I use TBLCOL=:C000 vs TBLCOL IS NULL. What am I doing wrong? Thank you for your help.

    You should include these columns as well;
    ChangeType (see mxi_changetype)
    ValOwner (repository)
    UserID ("jobid=<>", usermskey, GUI (mmc), DG (dyngrp), reconcile)
    IdAudit  (This is the event task (add and del member for assignments)
    ParentAuditId (AuditID of parent which last updated the attribute, not consistent)
    ChangedBy (Holds the MSKEY of the user which last changed the attribute)
    ExpiryTime
    to make sure you get a fuller picture of the audit record.
    Your selection does not cover all events and descriptions
    br,
    Chris

  • Default value for attribute "COUNTRY" in BP_HEAD_SEARCH/MainSearch

    Hi Gurus,
    Requirement is to set default value for attribute "COUNTRY" in BP_HEAD_SEARCH/MainSearch when user clicks on Corporate Account.
    Below is code that i have written in DO_PREPARE_OUTPUT.
    Code is working fine and in the debug also i can see the value of COUNTRY is set to DE, but it is not showing on the screen for first time but when i load component second time(Refresh the screen), it shows me value.
    Any help would be appreciated. If somebody has otheralternative kindly share.
      CALL METHOD super->do_prepare_output( iv_first_time = iv_first_time ).
    Calling Super Method
    CALL METHOD super->do_prepare_output
       EXPORTING
         iv_first_time = abap_true.
    Data Declatation
      DATA :lr_col            TYPE REF TO if_bol_bo_col,
            lr_current        TYPE REF TO if_bol_bo_property_access,
            lr_param          TYPE REF TO if_bol_bo_property_access,
            lr_qs             TYPE REF TO cl_crm_bol_dquery_service,
            lv_attr_name      TYPE name_komp,
            lv_sign           TYPE bapisign,
            lv_option         TYPE bapioption,
            w_country_exist   TYPE c,
            w_param           TYPE string,
            w_value           TYPE string,
            w_flag            TYPE c.
    Getting SEARCH Context Node
      lr_qs ?= me->typed_context->search->collection_wrapper->get_current( ).
    Get Selection Parameters
      lr_col ?= lr_qs->get_selection_params( ).
    Start from first parmaters
      lr_current = lr_col->get_first( ).
    Clearing Variables
      CLEAR : w_country_exist, w_flag, w_param, w_value.
    Loop till we have selection paramters
      WHILE lr_current IS BOUND.         " While loop 1
    checking attribute name is COUNTRY then setting some variable
        w_param = lr_current->get_property_as_string( 'ATTR_NAME' ).
        CASE w_param.
          WHEN 'COUNTRY'.
    If country is filled then setting variable
            w_value = lr_current->get_property_as_string( 'LOW' ).
            IF w_value IS NOT INITIAL.
              w_country_exist = abap_true.
            ENDIF.
    When we got COUNTRY attribute then setting flag
            w_flag = abap_true.
        ENDCASE.
    Calling next parameter
        lr_current = lr_col->get_next( ).
      ENDWHILE.                          " While loop 1
    In below block we are checking is COUNTRY attribute is blank and
    we have found COUNTRY attribute in current selection paramters
      IF lr_qs IS BOUND.                 " SEACRCH CONTEXT BOUND
    If vairable is blank means DE or any other value is not filled in COUNTRY Attribute
        IF w_country_exist IS INITIAL.   " w_contry_exist
    We have to add selection attribute if we come accross COUNTRY attribute during our search
          IF w_flag EQ abap_true.        " w_flag
    Adding COUNTRY attribute with default value 'DE'
            lr_qs->add_selection_param( EXPORTING iv_attr_name = 'COUNTRY'
                                                  iv_sign      = 'I'
                                                  iv_option    = 'EQ'
                                                  iv_low       = 'DE' ).
          ENDIF.                         " w_flag
        ENDIF.                           " w_contry_exist
      ENDIF.                             " SEACRCH CONTEXT BOUND
    In below block we will remove COUNTRY attribute when it has blank value
      IF lr_qs IS BOUND AND w_country_exist IS INITIAL.
        lr_current = lr_col->get_first( ).
        WHILE lr_current IS BOUND.
          w_param = lr_current->get_property_as_string( 'ATTR_NAME' ).
          CASE w_param.
            WHEN 'COUNTRY'.
              w_value = lr_current->get_property_as_string( 'LOW' ).
              IF w_value IS INITIAL.
                lr_col->remove( iv_bo = lr_current ).
              ENDIF.
          ENDCASE.
          lr_current = lr_col->get_next( ).
        ENDWHILE.
      ENDIF.
    Edited by: Harsharandeep Singh on Apr 28, 2011 3:44 PM

    Hi,
    Try it like this:
      DATA:
        lr_bo        TYPE REF TO if_bol_bo_property_access ,
        lv_attr_name TYPE name_komp.
      FIELD-SYMBOLS:
        <ls_param>   TYPE crms_thtmlb_search_criterion.
      READ TABLE parameters
           ASSIGNING <ls_param>
           WITH KEY field = 'COUNTRY'.
      IF ( sy-subrc = 0 ).
        <ls_param>-value1 = ip_pfct.
      ENDIF.
      CHECK ( me->parameter_collection IS NOT INITIAL ).
      lr_bo = me->parameter_collection->get_first( ).
      WHILE lr_bo IS BOUND.
        CALL METHOD lr_bo->get_property_as_value
          EXPORTING
            iv_attr_name = 'ATTR_NAME'
          IMPORTING
            ev_result    = lv_attr_name.
        IF lv_attr_name EQ 'COUNTRY' .
          CALL METHOD lr_bo->set_property
            EXPORTING
              iv_attr_name = 'LOW'
              iv_value     = 'DE'.
          EXIT.
        ELSE.
          lr_bo = me->parameter_collection->get_next( ) .
        ENDIF.
      ENDWHILE .
    Kind regards,
    Micha

  • Problem in summation on a column with possible null values

    Hi,
    I want to do summation on a column.
    If I use <?sum(amount)?>, if there is any null value,its giving NaN as output.
    From the forum I got the below syntax
    <?sum(AMOUNT[number(.)!='NaN'])?>
    but it is also not giving me the expected result. Its always displays 0.
    I want some thing like sum(NVL(amount,0)). Could some body please help me out?
    Thanks in Advance,
    Thiru

    If the column has many, many null values, and you want to use the index to identify the rows with non-null values, this is a good thing, as a B*Tree index will not index the nulls at all, so, even though your table may be very large, with many millions of rows, this index will be small and efficient, cause it will only contain index entries for those rows where the column is not null.
    Hope that helps,
    -Mark

  • Oracle UCM distinct values for attribute in GET_SEARCH_RESULTS ResultSet

    hi, can anyone, please, tell if there is a way to get a distinct values of resultset of GET_SEARCH_RESULTS?
    I mean, is it possible to obtain distinct values with custom where values of attribute through api?
    I need to build somewhat like autosuggest feature, but afaik there is no such service.
    Alternatives are
    - build my own service which can accept query text, pass it to GET_SEARCH_RESULTS, get results, calculate distinct and output it in hda - i dont like this idea, becouse it means getting whole result set into java while it is efficient to handle in DB
    - customize CHECK_IN/UPDATE services to update cached distincts (that means no grouping on custom queries)
    May be there was some sort of discussion or blog note?
    Thanks in advance.

    If you do not declare "SearchEngineName" as part of the request, whatever value is defined in config.cfg is used. This behavior is by design.
    Setting it in your request allows you to override the system setting in order to use another search engine, provided that the rest of the underlying parts are in place for the engine you are trying to use. For example, if your system setting is "DATABASE.METADATA", setting your individual request to "ORACLETEXTSEARCH" will probably fail, since the Oracle full text indexes would not exist. But if you are doing just metadata searching based on a couple of columns, and don't need the full text part for the request, it's a good way to craft a very specific search. Combined with a couple of database indexes on the columns in the where clause, it's also a good performer.
    I do "SearchEngineName=DATABASE" usually in conjunction with the parameter "SearchQueryFormat=Native" so I can create some database specific queries in native SQL (and thus avoiding the need to figure out the exact internet or universal syntax.) Your mileage may vary.

  • How can I get null values for the later weeks

    Hi All,
    When I execute this code I get the records till current week.
    How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
    Thanks,
    Vikram
    DECLARE
       v_query VARCHAR2(4000);
       TYPE ref_cursor IS REF CURSOR;
       v_refcur ref_cursor;
       v_sum NUMBER;
       v_id NUMBER;
       v_name VARCHAR2(1000);
       v_weeknum NUMBER;
       v_pernum NUMBER;
       v_numOfWeeks NUMBER := 5;
    BEGIN
    v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                              FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
                          FROM s_postn) postn_tbl
                          WHERE lvl_6_id = 5767
                          AND fiscal_year = 2008
                          AND b.week_num < 4
                          AND b.period_num = 3
                          AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
                          GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                          ORDER BY  postn_tbl.postn_name, b.week_num';
    OPEN v_refcur FOR v_query;
    LOOP
       FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
       EXIT WHEN v_refcur%notfound;
       dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
    END LOOP;
    END;
    This is the output when I execute this code.
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W2 COMM CNTRL TAM 216 12561.4
    P3W3 COMM CNTRL TAM 216 2027.1
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    This is the output I'd like to get
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W4 COMM CNTRL ISAM 213
    P3W5 COMM CNTRL ISAM 213
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W4 COMM CNTRL ISAM 273
    P3W5 COMM CNTRL ISAM 273
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W4 COMM CNTRL TAM 213
    P3W5 COMM CNTRL TAM 213
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W4 COMM CNTRL TAM 273
    P3W5 COMM CNTRL TAM 273
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    P3W4 Damon Walters
    P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PM

    Sure, in a Single SQL ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>-- Start Of Test Data --
    satyaki>with week_tab
      2  as
      3    (
      4      select 1 period_num, 1 week_num, 10 bkg1 from dual
      5      union all
      6      select 1, 2, 40 from dual
      7      union all
      8      select 1, 3, 30 from dual
      9      union all
    10      select 1, 2, 20 from dual
    11      union all
    12      select 1, 1, 10 from dual
    13      union all
    14      select 1, 1, 20 from dual
    15      union all
    16      select 1, 3, 10 from dual
    17      union all
    18      select 2, 1, 15 from dual
    19      union all
    20      select 2, 2, 20 from dual
    21      union all
    22      select 2, 3, 10 from dual
    23      union all
    24      select 2, 1, 15 from dual
    25      union all
    26      select 2, 2, 30 from dual
    27      union all
    28      select 2, 3, 20 from dual
    29    )
    30  -- End Of Test Data --
    31  select period_num,
    32         week_num,
    33         (
    34            select sum(week_tab.bkg1)
    35            from week_tab
    36            where period_num = m.period_num
    37            and   week_num   = m.week_num
    38            group by week_num, period_num
    39         ) sum_bkg1
    40  from (
    41        select dum.week_num,
    42              wk.period_num
    43        from (
    44                select 1 week_num from dual
    45                union all
    46                select 2 from dual
    47                union all
    48                select 3 from dual
    49                union all
    50                select 4 from dual
    51                union all
    52                select 5 from dual
    53              ) dum ,
    54              (
    55                select distinct period_num
    56                from week_tab
    57          ) wk
    58      ) m;
    PERIOD_NUM   WEEK_NUM   SUM_BKG1
             1          1         40
             1          2         60
             1          3         40
             1          4
             1          5
             2          1         30
             2          2         50
             2          3         30
             2          4
             2          5
    10 rows selected.
    Elapsed: 00:00:00.48
    satyaki>Regards.
    Satyaki De.

  • "Unterminated value for attribute '' in XML Tag ''.(SBL-UIF-00265)"

    Getting this message when I do Edit Web Layout for a view in Siebel tools 7.8.2 "Unterminated value for attribute '' in XML tag ''.(SBL-UIF-00265)"...Anyone have any idea why I am getting this message?

    Thanks Joseph,
    Actually I looked at the Refer ID 1280569.1 before also, some how I could not figured it out the exact location as I was searching for two "(double quotes).
    Today I tried again and finally I found out the culprit. In my case actually there was no two double quotes, instead the " (double quote) was missing.
    Thanks again.
    Edited by: user624054 on Oct 5, 2011 8:10 AM

  • Validations: Null value for LOVs

    See http://htmldb.oracle.com/pls/otn/f?p=24317:239
    I have a "Item is not null" validation on that LOV item. The item has "Display null value" set to Yes and a LOV of STATIC2:1,2,3
    If I leave the Null return value for the item to blank, the engine defaults it to %null% and the validation "knows" that this is really the same as a null value and so it kicks in (good).
    But if I change the Null return value to something like %, the validation doesn't complain, it thinks that this is a not-null value.
    Why the inconsistency? Does this mean that we are expected to use the default value of the Null return value i.e. leave it blank and let the engine put in %null%?
    Comments? Thanks

    Vikas - The declarative not null validation types recognize "actual" null or %null% as null values. This equivalence holds in numerous other situtations during page processing. Why does %null% get special treatment? A convention was chosen and that's it. And it works for almost everybody in almost all situations. In other words, it's useful, if not perfect. If you want a different value, you can specify one in the LOV (as you described). Then you can recognize and convert these values to null or %null% in an after-submit computation so that validations and other mechanisms work normally. (Perhaps it would help if the Builder created such a computation for items having LOVs with specified null values.) One use case for using a specified null return value might be where you want to distinguish a POSTed "actual" null value from the selected "null" value for which you have specified a null return value. Then you can tell if the value was selected from the LOV or whether it got a null value from the item's cache or source methods.
    Scott

  • How do I set a NULL value for the parameter field

    Hi
    I've another question. I'm going to set single values for parameter fields.
    // e.g. set today for StartDate parameter field
    fc.setCurrentValue("", "StartDate", new Date());
    It should be possible to set a NULL value for date parameter fields.
    fc.setCurrentValue("", "StartDate", (Date)null);
    But this do not work. How do I set a NULL value correctly?
    Thank you in advance.
    Best regards,
    Thomas

    First question - is it a stored procedure parameter?
    You can't set a regular parameter field value to a null value.
    There was an issue with old version of the JRC, where it was allowing null to go through, but had unexpected behavior at times.
    Sincerely,
    Ted Ueda

  • How to find String associated with some long value.

    My requirement is to know the String associated with the long value, for ex 23423423 is having some value like 'skljflsjf'. Can any body findout soln for the same.
    Thanks
    ~ Chethangowda.

    My requirement is to know the String associatedwith
    the long value, for ex 23423423 is having somevalue
    like 'skljflsjf'. Can any body findout soln forthe
    same.
    Hum... I'm not 100% sure, but it seems the answeris:
    dgjldkgjfkljg
    Please, don't thank me before you confirm thething.
    Regards.Oooohhhh! That explains it! I guess I must've missed
    the part where he said he wants it translated to
    trollish. How stupid of me.You're absolutely not to blame... to be honest, if I had not read the OP 3-4 times carefully, I would not have found the solution.

  • Transfered photos from IMac with Iphoto 9 to a mac book with Iphoto 11 now Iphoto 09 errors out saying "You can't open your current photo library using this version of iPhoto."

    Transfered photos from IMac with Iphoto 9 to a mac book with Iphoto 11 now Iphoto 09 errors out saying "You can’t open your current photo library using this version of iPhoto.You have made changes to your photo library using a newer version of iPhoto. Please quit and use the latest version of iPhoto."  We have not updated or changed anything on the IMac all we did is transfer photos. Any help would be appreciated.

    LarryHN is correct. The only way this message occurs is if the iPhoto Library database is upgraded to a newer version.
    You could try holding SHIFT-OPT-COMMAND when launching iPhoto from the dock and checking only "Rebuild the iPhoto Library Database from automatic backup" and hope it restores the previous database prior to the upgrade.
    If that doesn't work, you can install iPhoto '11 on your iPhoto '09 computer. If I understood the iPhoto '11 Mac App License agreeement correctly, you can install it on any personal, non-commerical computer you own running 10.5, 10.6 and 10.7.

  • Security Attributes with Multiple/NULL values

    I have a couple of situations where I can't seem to get the authorization component working as I need it to work for a database source.
    1) In the first case, I have two attributes set for "grant security attributes" in the data source, one of which has a single attribute value, and the other which has multiple values, e.g.
    I want to set "grant security attributes" to something like "client_id role_id" where for my dataset, client_id will always be a single numeric value, but I might have multiple role_ids that can view this record. How do I specify in my data source query those multiple attribute values? I tried separating them with spaces, e.g.
    SELECT ...
    'A B' role_id
    FROM
    where "A" and "B" represent unique values (looking to match A OR B). I also tried delimiting them with commas, but neither spaces nor commas seems to work consistently.
    On the authorization end, using oracle.search.plugin.security.auth.db.DBAuthManager as the authorization plug-in, I have the authorization query set as
    SELECT client_id, security_lvl as role_id from test_user_id where user_id = ?
    Each user may have more than one role, so in the above query, security_lvl could be something like "B C"; I'm assuming from the documentation that the delimiter for attribute values in this case should be a space.
    The crawler logs make it appear that everything is getting indexed, so I suspect the issue is on the authorization front.
    2) In the second case, one of my security attributes for the data source may be NULL, meaning that there's no particular authorization restriction on a particular record, so to use the same example as in #1,
    role_id might be NULL for some records, in which case, I want those records returned in the search if the client_id matches, but I can't get the records with the NULL role_id to be returned at all. Again, the crawler logs indicate that everything is being indexed, and I'm not sure if there's a log where I can further troubleshooting authorization issues.
    Any guidance would be appreciated.
    Thanks

    1) The security attributes are OR'd together so if the user has any ONE of the attributes (either client ID or role ID), the document can be seen by the user. What I would try is to create a view to call rather than directly against the table. The view can then leverage a PL/SQL function and encapsulate the logic behind the security tokens to return.
    So the view would look like this...
    CREATE OR REPLACE VIEW USER_SECURITY_V AS
    SELECT
    USER_T.ID,
    MY_SECURITY_FUNCTION(USER_T.ID) AS AUTH_ID
    FROM
    USER_T
    The PL/SQL function would look something like this...
    CREATE OR REPLACE FUNCTION MY_SECURITY_FUNCTION(USER_ID NUMBER) RETURN VARCHAR2 IS
    -- Do whatever you need to do to build a single space-deliminted list of tokens for both Client and Role ID "CLIENTID4 ROLEID5 ROLEID9" then return
    END;
    The data source authorization query then would look like this...
    SELECT AUTH_ID FROM USER_SECURITY_V A WHERE A.ID = ?
    Using a PL/SQL Function to control the tokens gives you the flexibility of modifying security without having to touch the data source directly
    2) I don't quite follow. If any ONE of the tokens match, the document is returned. If the role ID is null, you might try stamping each document a "master" security token indicating it's open to everyone such as "ALL". Then in the PL/SQL Function, return "ALL" in front of the actual values.
    The crawler logs will only tell you what is indexed at crawl time, not how searching is actually working. Try checking the server logs. These should be under something like oracle/ses/seshome/search/base_domain/servers/AdminServer/logs
    Hope this helps!

  • Delete after trigger returns a NULL value for the old primary key??

    I am creat an After trigger that I was using to delete a row from another table. However, the OLD value returned for my primary key is a NULL value. I have an UPDATE and an INSERT portion to this same trigger that work fine with just grabbing NEW values, but this OLD value cannot be grabbed for some reason, although it seems to work on other tables when the owner is me, the problem table is not owned by me though. Has anyone run into this before? Is there a view that I need access to from this table or perhaps a setting I need to turn on? I am at a loss. Thanks.

    Cannot reproduce with this modified trigger code … right now I believe the problem is in this part:
    BEGIN
      col_ret := vpack.vOPCollectIO(tpid, User, 'SCOTT.OINFTABL', dmltype, vdata);
    EXCEPTION
      WHEN lost_connection OR lost_connection2 THEN
        col_ret := vpack.vOPCollectIO(tpid, User, 'SCOTT.OINFTABL', dmltype, vdata);
    END;
    In schema CORE:
    SQL> create table oinftabl
      2  ( akey     number(9) primary key
      3   ,astring  varchar2(10)
      4   ,astring2 varchar2(10)
      5  );
    Table created.
    SQL>
    SQL> grant all on oinftabl to flip;
    In schema FLIP (which has “CREATE ANY TRIGGER”):
    flip@FLOP> CREATE OR REPLACE TYPE VDAT AS VARRAY(100000) OF VARCHAR2(50);
    2     /
    create or replace trigger sbt3_system_oinftabl_x
    after insert or update or delete on core.oinftabl
    REFERENCING NEW as n OLD as o
    FOR EACH ROW
    DECLARE
      col_ret INT;
      dmltype CHAR(1);
      tpid VARCHAR2(30);
      vdata VDAT; --varray datatype I created;
      lost_connection EXCEPTION;
      lost_connection2 EXCEPTION;
      already_there EXCEPTION;
      PRAGMA EXCEPTION_INIT(lost_connection, -28576);
      PRAGMA EXCEPTION_INIT(lost_connection2, -28579);
      PRAGMA EXCEPTION_INIT(already_there,-1);
    BEGIN
      tpid := SYS.DBMS_TRANSACTION.LOCAL_TRANSACTION_ID();
      IF INSERTING THEN dmltype := 'I';
      ELSIF UPDATING THEN dmltype := 'U';
      ELSE dmltype := 'D';
      END IF;
      IF INSERTING OR UPDATING THEN
        dbms_output.put_line('new akey='||nvl(to_char(:n.akey),'null'));
        dbms_output.put_line('new astring='||:n.astring);
        vdata := VDAT(
        to_char(:n.AKEY),
        :n.ASTRING,
        :n.ASTRING2,
        NULL);
      ELSIF DELETING THEN
        dbms_output.put_line('old akey='||nvl(to_char(:o.akey),'null'));
        vdata := VDAT(
          to_char(:o.AKEY),
          NULL);
      END IF;
      for i in 1..vdata.count
      loop
        dbms_output.put_line('vdata('||i||')='||nvl(vdata(i),'null'));
      end loop;
    --BEGIN
    --  col_ret := vpack.vOPCollectIO(tpid, User, 'SCOTT.OINFTABL', dmltype, vdata);
    --EXCEPTION
    --  WHEN lost_connection OR lost_connection2 THEN
    --    col_ret := vpack.vOPCollectIO(tpid, User, 'SCOTT.OINFTABL', dmltype, vdata);
    --END;
    END;
    Trigger created.
    flip@FLOP> show errors
    No errors.
    flip@FLOP> insert into core.oinftabl values (1,'abc',null);
    new akey=1
    new astring=abc
    vdata(1)=1
    vdata(2)=abc
    vdata(3)=null
    vdata(4)=null
    1 row created.
    flip@FLOP>  update core.oinftabl set akey=2, astring='cba' where akey=1;
    new akey=2
    new astring=cba
    vdata(1)=2
    vdata(2)=cba
    vdata(3)=null
    vdata(4)=null
    1 row updated.
    flip@FLOP> delete from core.oinftabl where akey=2;
    old akey=2
    vdata(1)=2
    vdata(2)=null
    1 row deleted.
    So the trigger has the OLD AKEY value when DELETING and it does successfully store it in the VARRAY.
    Hence the problem is in that pl/sql block at the end.
    What are you doing in there?

  • Using Convert to handle NULL values for empty Strings ""

    After having had the problem with null values not being returned as nulls and reading some suggestion solution I added a converter to my application.
      <converter>
        <converter-id>NullStringConverter</converter-id>
        <converter-for-class>java.lang.String</converter-for-class>
        <converter-class>com.j2anywhere.addressbookserver.web.NullStringConverter</converter-class>
      </converter>
    ...I then implemented it as follows:
      public String getAsString(FacesContext context, UIComponent component, Object object)
        System.out.println("Converting to String : "+object);
        if (object == null)
          System.out.println("READING null");
          return "NULL";
        else
          if (((String)object).equals(""))
            System.out.println("READING null (Second Check)");
            return null;       
          else
            return object.toString();
      public Object getAsObject(FacesContext context, UIComponent component, String value)
        System.out.println("Converting to Object: "+value+"-"+value.trim().length());
        if (value.trim().length()==0 || value.equals("NULL"))
          System.out.println("WRITING null");
          return null;
        else
          return value.toUpperCase();
    ...I can see that it is converting my values, however the object to which the inputText fields are bound are still set to empty strings ""
    <h:inputText size="50" value="#{addressBookController.contactDetails.information}" converter="NullStringConverter"/>Also when reading the object values any nulls are already converted to empty strings before ariving at the converter. It seems that there is a default converter handling string values.
    How can I resolve this problem as set nulls when the input value is an empty string other then checking every string in my class individually. I would really hate to pollute my object model with empty string tests.
    Thanks in advance
    Edited by: j2anywhere.com on Oct 19, 2008 9:06 AM

    I changed my converter as suggested :
      public Object getAsObject(FacesContext context, UIComponent component, String value)
        if (value == null || value.trim().length() == 0)
          if (component instanceof EditableValueHolder)
            System.out.println("SUBMITTED VALUE SET TO NULL");
            ((EditableValueHolder) component).setSubmittedValue(null);
          else
            System.out.println("COMPONENT :"+component.getClass().getName());
          System.out.println("Converting to Object: " + value + "< to " + null);
          return null;
        System.out.println("Converting to Object: " + value + "< to " + value);
        return value;
      }which produces the following output :
    SUBMITTED VALUE SET TO NULL
    Converting to Object: < to null
    Info : The INFO line however comes from my controller object where I print out the set value :
    package com.simple;
    import java.util.ArrayList;
    import java.util.List;
    public class Controller
      private String information;
      /** Creates a new instance of Controller */
      public Controller()
        System.out.println("Createing Controller");
        information = "Constructed";
      public String process()
        System.out.println("Info : "+getInformation());
        return "processed";
      public String reset()
        setInformation("Re-Constructed");
        System.out.println("Info : "+getInformation());
        return "processed";
      public String setNull()
        setInformation(null);
        System.out.println("Info : "+getInformation());
        return "processed";
      public String getInformation()
        return information;
      public void setInformation(String information)
        this.information = information;
    }I also changes my JSP / JSF page a little. Here is the updated version
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%--
        This file is an entry point for JavaServer Faces application.
    --%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
      </head>
      <body>
        <f:view>
          <h:form>
            <h:inputText id="value" value="#{Controller.information}"/>
            <hr/>
            <h:commandLink action="#{Controller.process}">
              <h:outputText id="clicker" value="Process"/>
            </h:commandLink>             
            <hr/>
            <h:commandLink action="#{Controller.reset}">
              <h:outputText id="reset" value="Reset"/>
            </h:commandLink>             
            <hr/>
            <h:commandLink action="#{Controller.setNull}">
              <h:outputText id="setNull" value="Set Null"/>
            </h:commandLink>             
          </h:form>
        </f:view>
      </body>
    </html>The converter is declared for the String class in the faces configuration file. From the log message is appears to be invoked, however the object is not set to null.
    I tested this with JSF 1.2_04-b20-p03 as well as 1.2_09-b02-FCS.
    any other suggestions what could be causing this.

Maybe you are looking for

  • What is purpose of having an iTunes Library when I already have purchased apps?

    I am new to the Apple ecosystem, so please pardon my ignorance here. I am using iTunes on Windows desktop, but I have the same problem on my Mac laptop. I have some apps purchases that show up when I am in iTunes and select  Purchased or Apps. But wh

  • How can I copy/paste text from one page to another?

    I feel like I am taking crazy pills... is there really no way to copy a text box (or group) from one page to another while creating books in Aperture 3?  Lets say I have my entire book laid out and I want to add one paragraph at the end on one page w

  • IPhone 4S - No Cellular Data Activity After Updating To iOS 8.0.2

    My phone is unable to activate and/or use cellular data after updating to iOS 8. I have already installed 8.0.2 which promised to fix these issues; and it has not. Google Maps, Chrome, Safari, iMessage...none of these features work unless connected t

  • Enabled users are not seen in the rtc database

    Hi, I have installed Lync 2013 into our environment and I am having an issue where users enabled for Lync are not able to log into the client, receiving the error: "You didn't get signed in. It might be your sign-in address or logon credentials, so t

  • Key down event handeling when the VI isn't active

    Hi   I've written a simplel VI that increases or decreases a numerical indicator depending on which key is pressed on the keyboard. But this only works when the VI window is active (the titlebar is blue and not gray). Is there anyway to listen for th