Function returned no value error

create or replace function dssppv.hra_find_short_path (
   p_new_rgmn_grp_gid    in   number
  ,p_tail_rgmn_grp_gid   in   number
  ,p_mkt_cnfgr_gid       in   number
)
   return string

is
   v_rgmn_grp_path varchar2 ( 2000 );
   check_step varchar2 ( 2000 );
begin
   dbms_output.put_line
      ( 'Begin of function  hra_find_short_path to Check Circular Loop : '
        || to_char ( sysdate, 'YYYY-MM-DD HH24:MI:SS' )
      );
   check_step                 := ' Step 1 - Circular loop Check up.';

   --Checking for the circular loop
   select rgmn_path || '/' || gt.rgmn_grp_nam
   into   v_rgmn_grp_path
   from   ( select  min_rgmn_node
                   ,rgmn_path
                   ,rgmn_grp_gid
           from     ( select    level as min_rgmn_node
                               ,dt.rgmn_grp_gid
                               ,dt.tail_rgmn_grp_gid
                               ,gp.rgmn_grp_nam
                               ,rtrim
                                   ( reverse
                                        ( sys_connect_by_path
                                                  ( reverse ( gp.rgmn_grp_nam )
                                                   ,'/ '
                                                  )
                                        )
                                    ,'/ '
                                   ) as rgmn_path
                     from       dssppv.t_market_cnfgr_rgmn_grp_dtl dt join dssppv.t_market_cnfgr_rgmn_grp gp
                                on (     dt.rgmn_grp_gid = gp.rgmn_grp_gid
                                     and gp.mkt_cnfgr_gid = p_mkt_cnfgr_gid
                                   )
                     start with dt.tail_rgmn_grp_gid = p_new_rgmn_grp_gid
                     connect by nocycle prior dt.rgmn_grp_gid =
                                                          dt.tail_rgmn_grp_gid )
           where    rgmn_grp_gid = p_tail_rgmn_grp_gid
           order by min_rgmn_node )
         ,dssppv.t_market_cnfgr_rgmn_grp gt
   where  gt.rgmn_grp_gid = p_new_rgmn_grp_gid and rownum = 1;

   dbms_output.put_line ( ' Circular Loop is formed as shown :'
                          || v_rgmn_grp_path
                        );

   if ( v_rgmn_grp_path is not null )
   then
      dbms_output.put_line ( ' Circular Loop is formed as shown :'
                             || v_rgmn_grp_path
                           );
   else
      dbms_output.put_line ( ' No Loop is formed.' );
   end if;

   dbms_output.put_line
         ( 'End of function  hra_find_short_path to Check Circular Loop : '
           || to_char ( sysdate, 'YYYY-MM-DD HH24:MI:SS' )
         );
   return v_rgmn_grp_path;
exception
 --  when no_data_found
  -- then
   --   dbms_output.put_line
    --     ( 'End  of function  hra_find_short_path to Check Circular Loop : '
     --      || to_char ( sysdate, 'YYYY-MM-DD HH24:MI:SS' )
      --   );
      --return null;
   when others
   then
      dbms_output.put_line
                     ( 'Error in function DSSPPV.hra_find_short_path at: '
                       || check_step
                     );
      dbms_output.put_line ( sqlerrm );
      dbms_output.put_line
         ( 'End of function  hra_find_rgmn_grp_loops to Check Circular Loop : '
           || to_char ( sysdate, 'YYYY-MM-DD HH24:MI:SS' )
         );
end hra_find_short_path;
/
I have fully commented goal no. Data Exception not found top check if she is to return null when no record is found.

But he was wrong in not found exception when there is no data record.

But when run sql separately he showed zero records without don't raise the no found error of data.

He would not even through the loop fi... Please correct me if I did something wrong
 if ( v_rgmn_grp_path is not null )
   then
      dbms_output.put_line ( ' Circular Loop is formed as shown :'
                             || v_rgmn_grp_path
                           );
   else
      dbms_output.put_line ( ' No Loop is formed.' );
   end if;

You may not assume that v_rgmn_grp_path will retain the NULL value if the query returns no rows. In this case AS the value of the variable is not defined. I suggest yo change:

Select rgmn_path. '/' || gt.rgmn_grp_nam

TO

Select count (*) case when 1 then max(rgmn_path ||) '/' || end of gt.rgmn_grp_nam)

This way NO_DATA_FOUND will not be raised and the v_rgmn_grp_path will be NULL if there is no corresponding line.

SY.

Tags: Database

Similar Questions

  • ORA-06503: PL/SQL: function returned no value ORA-06512:

    Hi all

    SQL > set serveroutput on

    SQL > CREATE OR replace FUNCTION qty_value (p_item_id number)

    2 RETURN NUMBER

    3 EAST

    4 v_qty_arrival NUMBER;

    5 BEGIN

    6. SELECT THE CASE SENSITIVE OPTION

    7. WHAT (SUM (b.quantity) - SUM (b.quantity_received)) < = 0 THEN 0

    8 ELSE (SUM (b.quantity) - SUM (b.quantity_received))

    9 END Qty_Arrival

    10 INTO v_qty_arrival

    Po_lines_all 11 a,

    po_line_locations_all 12 b

    13 WHERE a.po_line_id = b.po_line_id

    14 AND a.item_id = p_item_id;

    15 EXCEPTION

    16 THEN THAN OTHERS THEN

    17 v_qty_arrival: = NULL;

    18 RETURN v_qty_arrival;

    19 END qty_value;

    20.

    The function is created.

    SQL >

    SQL > select xxc_qty_arrivale (214960) double

    2.

    Select xxc_qty_arrivale (214960) double

    *

    ERROR on line 1:

    ORA-06503: PL/SQL: function returned no value

    ORA-06512: at the 'APPS '. XXC_QTY_ARRIVALE', line 19

    Back AFTER using the exception block is fine as long as your code actually REACHED the exception block.

    When there are no errors, then your code will not enter the exception block, but you still NEED to return a value, since it is what functions a function wants to return a value, that's what the functions are made for.

    Spot the differences between the following 3 functions. Understand how they work.

    The first function has only a return in the exception block but runs correctly. Result: error, because the back is missing in the code block.

    The second function has a return in the exception block and one in the block of code and runs correctly. Result: no error, because the return is not missing in the code block.

    The third function has a return in the exception block and one in the block of code and is forced into an error. Result: no error, because the return of the exception handler is used (instead of retriggering of the error, which you would normally do).

    SQL > create or replace function myfunc

    2 return number

    3 as

    4 start

    5 dbms_output.put_line ('in the section of code');

    6 null;

    7 exception

    8 then than others

    9. can

    10 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    11      --

    12 return 0;

    13      --

    14 end;

    15.

    The function is created.

    SQL > select double myfunc;

    Select double myfunc

    *

    ERROR on line 1:

    ORA-06503: PL/SQL: function returned no value

    ORA-06512: at "GHPLUS. MYFUNC", line 14

    In the section of code

    SQL > create or replace function myfunc

    2 return number

    3 as

    4 start

    5 dbms_output.put_line ('in the section of code');

    6 null;

    7    --

    8 return 1;

    9    --

    10 exceptional

    11 so that others

    12. can

    13 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    14      --

    15 return 0;

    16      --

    end 17;

    18.

    The function is created.

    SQL > select double myfunc;

    MYFUNC

    ----------

    1

    1 selected line.

    In the section of code

    SQL > create or replace function myfunc

    2 return number

    3 as

    n number 4;

    5. start

    6 dbms_output.put_line ('in the section of code');

    7 n: = 1/0; -force an error (zero divisor) to join the exception handler

    8    --

    9 return 1;

    10-

    exception 11

    12 so that others

    13. can

    14 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    15      --

    16 return 0;

    17      --

    18 end;

    19.

    The function is created.

    SQL > select double myfunc;

    MYFUNC

    ----------

    0

    1 selected line.

    In the section of code

    In the handler for exception ORA-01476: divisor is equal to zero

    SQL >

  • ORA-06503: PL/SQL: function returned no value

    Hi guys,.
    I wrote a function that returns the number of quarter for a given date.
    Here's the function

    FUNCTION to CREATE or REPLACE fn_get_quarter
    (p_date DATE)
    RETURN NUMBER
    AS
    v_qtr NUMBER;
    BEGIN
    Select TO_CHAR (p_date, 'Q')
    IN v_qtr
    DOUBLE;
    dbms_output.put_line (' it's quarter ' | v_qtr);
    END;

    It compiled without error.

    Here is the test case that I wrote

    DECLARE
    p_date DATE: = TO_DATE('12/22/2009','MM/DD/YYYY');
    v_qtr NUMBER;
    BEGIN
    v_qtr: = fn_get_quarter (p_date);
    END;

    When I run the present, I get the following error.

    ORA-06503: PL/SQL: function returned no value
    ORA-06512: at "GPS_FVO. FN_GET_QUARTER', line 13
    ORA-06512: at line 7

    But surprisingly, I get the result.

    Please suggest and let me know how to get rid of this error and why I get this error.

    Thanks in advance.
    Sam

    RETURN v_qtr;
    should be added after DBMS_OUTPUT

  • Function return undefined values

    My function returns undefined values. It seems that the return of the function statement is executed before the database is queried and values are assigned to variables. If I do an alert within the loop for () I get the correct values from the database, but these values are not affected before excecuting the return statement function. How can I do this differently?

    function getColumnNames(table){
        var rs1, rs2, rs3, rs4, rs5;
        db.transaction(function (tx) {
            tx.executeSql("SELECT * FROM schema WHERE table_name=?",[table], function(ax, results){
                var size = results.rows.length, i;
                var item;
                for (i = 0; i < size; i++){
                    item = results.rows.item(i);
                    rs1 = item.col1;
                    rs2 = item.col2;
                    rs3 = item.col3;
                    rs4 = item.col4;
                    rs5 = item.col5;
                                    alert(rs1); //correct value is returned here
                }
            });
        });
        return [rs1, rs2, rs3, rs4, rs5];
    }
    

    Hey Fabian,.

    You are quite correct that the return statement is executed before the database returns the results. There are ongoing asynchronous calls. You can set breakpoints in JavaScript code to see what is happening. You can correct the problem by using function callbacks. I edited your code below to use the callback functions - there might be a few typos, but the general approach should be wooded.

    function getColumnNames(table, callback){
        var rs1, rs2, rs3, rs4, rs5;
        db.transaction(function (tx) {
            tx.executeSql("SELECT * FROM schema WHERE table_name=?",[table], function(ax, results){
                var size = results.rows.length, i;
                var item;
                for (i = 0; i < size; i++){
                    item = results.rows.item(i);
                    rs1 = item.col1;
                    rs2 = item.col2;
                    rs3 = item.col3;
                    rs4 = item.col4;
                    rs5 = item.col5;
                        alert(rs5); //correct values are being returned
                    callback([rs1, rs2, rs3, rs4, rs5]);
                }
            });
        });
    }
    
    // example of how to call getColumnNames with callback
    getColumnNames('importantTable', function (result)
    {
        console.log(result);
    });
    
    // alternative version
    function onCallback(result)
    {
        console.log(result);
    }
    
    getColumnNames('importantTable', onCallback);
    

    I hope this helps.

    See you soon,.

    James

  • Function - return multiple values in a concatenated string

    Hello

    Is it possible for a function return a concatenated string (combining more than one number). I'm trying to return the purchase by the introduction and invoice_id number and code order number, but an invoice_id can have several PO with the same code number. I want to concatenate the PO numbers with commas, for example

    10124, 10090, 10987

    At the present time, the function returns NULL for those cases that have more than one purchase order number.

    Thank you
    func_get_po(i.invoice_id, cc.code_combination_id) "PO No",
    func_get_po_requester(i.invoice_id, cc.code_combination_id, func_get_po(i.invoice_id, cc.code_combination_id)) "PO Requester",
    

    Of course, this can be done without any problem.
    If it returns NULL, then you must debug function and check the operating logic. I know that it will take a little of your time, but not problems with the logic of syntax and concatenation.

  • APEX 4.0.1: $v () function returns multiple values for the box?

    Hello

    I have a report that uses apex_item.checkbox (...) to generate the check box. This report correctly displays a check box for each line. The source code that is generated in the html page is:
    < input type = "checkbox" name = "f01" value = "202" id = "P1_CHECKBOX" / >
    ...
    ...
    < input type = "checkbox" name = "f01" value = "220" id = "P1_CHECKBOX" / >
    ...
    ...
    < input type = "checkbox" name = "f01" value = "210" id = "P1_CHECKBOX" / >
    ...
    ...

    I want to use the javascript function $v () to get the values of the enabled check box. I thought that the return of this function all the checked values separated by ':' but I noticed that my code alert ($v ('P1_CHECKBOX')); return whenever the value of the first checkbox if it is checked.
    It returns '202' if the first box is checked, but nothing, if only the second checkbox is checked and '202' if the box of the first and the second is checked.

    Hello

    first of all, $v, $x and $s are supposed to not work for items on the page, not the columns in a table or manually generated HTML elements.

    Secondly, I think that your HTML code is not correct, because each of your boxes has the same ID. But the ID must be unique in the DOM of the browser tree. Thus the different box should actually named P1_CHECKBOX_1... P1_CHECKBOX_3. Just look at what is actually generated for a page element real checkbox. BTW, I think that you should not name the checkbox as part of page elements, because they are not actually page elements. I think that this could be confusing for other developers.

    Hope that helps
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Analytical function - return 2 values

    I don't know I need to use an analytical function to do this, I can't do things. I appreciate the help.
    Statements of table and insert:
    create table TST_CK
    (
    DOC_ID NUMBER(6)      not null,
    ROW_SEQ_NBR NUMBER(6) not null,
    IND_VALUE VARCHAR2(2) null
    )
    INSERT INTO TST_CK VALUES ('1','6',NULL);
    INSERT INTO TST_CK VALUES ('1','5',NULL);
    INSERT INTO TST_CK VALUES ('1','4','T');
    INSERT INTO TST_CK VALUES ('1','3','R');
    INSERT INTO TST_CK VALUES ('1','9',NULL);
    INSERT INTO TST_CK VALUES ('1','10',NULL);
    INSERT INTO TST_CK VALUES ('1','7','T');
    INSERT INTO TST_CK VALUES ('1','8','R');
    INSERT INTO TST_CK VALUES ('2','1',NULL);
    INSERT INTO TST_CK VALUES ('2','2',NULL);
    INSERT INTO TST_CK VALUES ('2','3','T');
    INSERT INTO TST_CK VALUES ('2','4','R');
    INSERT INTO TST_CK VALUES ('2','5',NULL);
    INSERT INTO TST_CK VALUES ('2','6',NULL);
    INSERT INTO TST_CK VALUES ('2','7','T');
    INSERT INTO TST_CK VALUES ('2','8','R');
    INSERT INTO TST_CK VALUES ('4','1',NULL);
    INSERT INTO TST_CK VALUES ('4','2',NULL);
    INSERT INTO TST_CK VALUES ('4','3','X1');
    INSERT INTO TST_CK VALUES ('4','4',NULL);
    INSERT INTO TST_CK VALUES ('4','5',NULL);
    INSERT INTO TST_CK VALUES ('4','6',NULL);
    INSERT INTO TST_CK VALUES ('4','7','T');
    INSERT INTO TST_CK VALUES ('4','8','R');
    INSERT INTO TST_CK VALUES ('4','9',NULL);
    INSERT INTO TST_CK VALUES ('4','10',NULL);
    INSERT INTO TST_CK VALUES ('4','11',NULL);
    INSERT INTO TST_CK VALUES ('4','12',NULL);
    INSERT INTO TST_CK VALUES ('4','13','T');
    INSERT INTO TST_CK VALUES ('4','14','R');
    INSERT INTO TST_CK VALUES ('4','15',NULL);
    INSERT INTO TST_CK VALUES ('4','16',NULL);
    COMMIT;
    Here is what I tried that gets me close:
    SELECT MAX (TST_CK.DOC_ID), MAX (TST_CK.ROW_SEQ_NBR), TST_CK.IND_VALUE
      FROM ASAP.TST_CK TST_CK
     WHERE (TST_CK.IND_VALUE IS NOT NULL)
    GROUP BY TST_CK.IND_VALUE
    ORDER BY 2 ASC
    Here is my desired outcome:
    CV_1      CV_2
    T           R
    Or even better result would be:
    concat(CV_1,CV_2)
    Result:
    T,R
    Thanks for looking

    G

    GMoney says:
    Basically, I just need to make sure what I captures the last T and R entered in the column

    Still not clear. You want to find the last two lines (function ROW_SEQ_NBR) where IND_VALUE is 't' & 'R', right? If so:

    with t as (
               select  doc_id,
                       row_seq_nbr,
                       ind_value,
                       row_number() over(partition by ind_value order by row_seq_nbr desc) rn
                 from  tst_ck a
                 where ind_value in ('T','R')
              )
    select  doc_id,
            row_seq_nbr,
            ind_value
      from  t
      where rn = 1
    / 
    
        DOC_ID ROW_SEQ_NBR IN
    ---------- ----------- --
             4          14 R
             4          13 T
    
    SQL> 
    

    SY.

  • Calendar function returns strange values

    Can someone please help

    Calendar rightNow = Calendar.GetInstance ();
    int aa = Calendar.DATE;
    int bb = Calendar.MONTH;

    in aa value is 5, it is and in the bb, it is 2.

    I checked my date system as well as the date of Simulator. I don't know why it's happening.

    These values Calendar.DATE and Calendar.MONTH are the contacts to be used in conjueciton with the Calendar.getField () method.

    Like this:

    int = rightNow.getField (Calendar.MONTH) MB

  • MONTHS_BETWEEN function returns negative values 'bad '?

    Hello

    I can't understand why these values are results.

    SQL > select months_between (to_date (February 2, 13 ',' DD-MON-RR'), to_date ('February 28, 13 ', ' DD-MON-RR')) twice;

    MONTHS_BETWEEN(TO_DATE('02-FEB-13','DD-MON-RR'),TO_DATE('28-FEB-13','DD-MON-RR')

    --------------------------------------------------------------------------------

    -.83870968

    SQL > select months_between (to_date (February 2, 13 ',' DD-MON-RR'), to_date ('April 1, 13 ', ' DD-MON-RR')) twice;

    MONTHS_BETWEEN(TO_DATE('02-FEB-13','DD-MON-RR'),TO_DATE('01-APR-13','DD-MON-RR')

    --------------------------------------------------------------------------------

    -1.9677419

    SQL > select months_between (to_date (February 2, 13 ',' DD-MON-RR'), to_date ('April 2, 13 ', ' DD-MON-RR')) twice;

    MONTHS_BETWEEN(TO_DATE('02-FEB-13','DD-MON-RR'),TO_DATE('02-APR-13','DD-MON-RR')

    --------------------------------------------------------------------------------

    -2

    user13393428 wrote:

    But,

    Select months_between (to_date (February 2, 13 ',' DD-MON-RR'), to_date ('April 2, 13 ', ' DD-MON-RR')) twice;

    How it is-2? Should not be-1?

    Do you really think there's only 1 month between February and April?  you have a very convenient calendar you can watch...

  • I need to return multiple values in function

    create or replace function f (p) in varchar2) return varchar2
    is
    a number (10);
    Start

    for loop 1 in 1.10
    Select instr('yyyyyyyyynnnnnyynny','y',1,i) in the doubles.
    end loop;
    return a;
    end;

    my function return a value, but I need to return multiple values
    Thanks in advance

    I don't know if that's what you want (you should give expected results also)

    SQL> create or replace type mytabletype as table of number;
      2  /
    
    Type created.
    
    SQL> create or replace function f (p in varchar2) return myTableType pipelined is
      2    a number(10);
      3  begin
      4    for i in 1..10 loop
      5      select instr('yyyyyyyyynnnnnyynny','y',1,i) into a from dual;
      6      pipe row (a);
      7    end loop;
      8  end;
      9  /
    
    Function created.
    
    SQL> select * from table(f('1'));
    
    COLUMN_VALUE
    ------------
               1
               2
               3
               4
               5
               6
               7
               8
               9
              15
    
    10 rows selected.
    
    SQL>
    

    Published by: Leo Mannhart on March 22, 2011 11:01

    could even be compressed into

    create or replace function f (p in varchar2) return myTableType pipelined is
    begin
      for i in 1..10 loop
        pipe row (instr('yyyyyyyyynnnnnyynny','y',1,i));
      end loop;
    end;
    
  • How to return two values of a function?

    Hi all
    I have a function which returns a varchar2 value. This value is used in the SQL of a ref cursor

    Now I want this function returns two values. I tried to use varray, but could not accomplish the task.

    Can you tell me how can I find the two values from a function? and how this function can be called in a SQL query?

    Thank you very much

    The query should look like:

    SELECT v.col.name AS name
         , v.col.flag AS flag
    FROM   ( SELECT kk_test_kk(t.somecolumn,t.someothercolumn,42) AS col
             FROM   sometable t ) v;
    

    Note that you need to prefix with the name of view inline ('v' in the example) and the expression of the function ('col' in the example).

  • error with function returning values 'multiple '.

    Hello

    I am trying to write a function to return values "multiple".

    However, he returned the following error when compiling

    Errors of compilation for the sch1.myfn FUNCTION

    Error: PLS-00382: expression is of the wrong type
    Online: 19
    Text: RETURN V_res;

    Error: PL/SQL: statement ignored
    Online: 19
    Text: RETURN V_res;


    question:

    is 1 - necessary to always declare an array? as he's going to return only a single record with multiple columns





    Create or REPLACE the TYPE as result_t table;

    CREATE or REPLACE TYPE result_t as object
    (comments of the user varchar2 (100), varchar2 (4000));



    FUNCTION to CREATE or REPLACE myfn (IN_ID IN VARCHAR2, IN_BEGIN IN DATE) result IS
    type V_res_t is RECORD (user varchar2 (100) comments varchar2 (4000));
    V_res V_res_t;
    BEGIN
    Select a.user, a.comment
    in V_res.user, V_res.comments
    from View1,.
    (select distinct id,
    begin_time,
    Max (Time) on max_time (order by times desc) of view2 b
    where id = IN_LOTID
    and begin_time = IN_BEGIN) b
    where a.id = b.id
    and a.begin_time = b.begin_time
    and a.time = max_time
    and a.id = IN_ID
    and a.begin_time = IN_BEGIN;

    RETURN V_res; -> This is the line that the system keep complaining
    END;

    Note: ignore pls if the results returned is correct, but I expect to always return one row

    pls advise

    TKS & rgds

    Forget your 'result' of tabular type of.

    SQL> CREATE OR REPLACE TYPE result_t as object
      2  (user# varchar2(100), comments varchar2(4000));
      3  /
    
    Type created.
    
    SQL>
    SQL> CREATE OR REPLACE FUNCTION myfn (IN_ID IN VARCHAR2, IN_BEGIN IN DATE) RETURN result_t IS
      2  user# varchar2(100);
      3  comments varchar2(4000);
      4  BEGIN
      5  RETURN result_t(user#,comments);
      6  END;
      7  /
    
    Function created.
    
    SQL>
    

    Nicolas.

  • ORA-06502: PL/SQL: digital or value error: character string buffer too small in the functions

    Hi all

    FUNCTION to CREATE or REPLACE fnc_two (p_in_job IN VARCHAR2)

    RETURN VARCHAR2

    AS

    CUR CURSOR

    IS

    SELECT ename

    WCP

    WHERE job = p_in_job;

    v_first_name emp.ename%TYPE;

    BEGIN

    FOR my heart IN rec

    LOOP

    IF v_first_name IS NULL

    THEN

    v_first_name: = rec.ename;

    ON THE OTHER

    v_first_name: = v_first_name | ',' || Rec.Ename;

    END IF;

    END LOOP;

    RETURN v_first_name;

    END;

    SQL > SELECT fnc_two ('CLERK')

    2 FROM dual;

    SELECT fnc_two ('CLERK')

    *

    ERROR on line 1:

    ORA-06502: PL/SQL: digital or value error: character string buffer too small

    ORA-06512: at the 'APPS '. FNC_TWO', line 17

    SQL > select distinct work of emp

    2.

    JOB

    ---------

    CLERK

    SELLER

    PRESIDENT

    MANAGER

    ANALYST

    v_first_name: = v_first_name | ',' || Rec.Ename;

    The above statement is the original error. The value has been assinged to v_first_name is larger than the computer can handle.

    Increase the size of the variable v_first_name to avoid the error example

    v_first_name varchar2 (100);

  • ORA 28817 PLSQL function returned an error. When the apex 4 2 instance access

    Hello

    I just upgraded from apex to apex 4.2 4.1. All is well except for this error I get when I try to access the parameter Instance on the App Admin (localhost/apex/apex_admin)
    ORA-28817: PL/SQL function has returned an error
    What could be the problem? How we solve this problem...

    I'm working on the 2012 Win server machine... apex 4.2 with earphone 2 deployed on Glassfish 3.1.2 apex.

    Best regards
    Fateh

    Hello Faye,

    We are already aware of this problem, even if it is not yet present on our Web page of problems known. The reason for this error is that the new facility replaces an instance to the scale encryption key. In the preferences of the instance which have been encrypted with the old value (the SMTP password and the password for the portfolio), the values are not valid after the upgrade and decryption causes this error. As a work around, you can use the apex_instance_admin package to replace the invalid passwords.

    The following code shows how the decryption throws ORA-28817:

    SYS@a411> select apex_instance_admin.get_parameter('SMTP_PASSWORD') from dual;
    select apex_instance_admin.get_parameter('SMTP_PASSWORD') from dual
           *
    ERROR at line 1:
    ORA-28817: PL/SQL function returned an error.
    ORA-06512: at "SYS.DBMS_CRYPTO_FFI", line 67
    ORA-06512: at "SYS.DBMS_CRYPTO", line 44
    ORA-06512: at "APEX_040200.WWV_FLOW_CRYPTO", line 89
    ORA-06512: at "APEX_040200.WWV_FLOW_INSTANCE_ADMIN", line 239
    

    You can fix this by entering new password:

    SYS@a411> exec apex_instance_admin.set_parameter('SMTP_PASSWORD','my smtp password');
    PL/SQL procedure successfully completed.
    
    SYS@a411> exec apex_instance_admin.set_parameter('WALLET_PWD','my wallet password');
    PL/SQL procedure successfully completed.
    
    SYS@a411> select apex_instance_admin.get_parameter('SMTP_PASSWORD') from dual;
    APEX_INSTANCE_ADMIN.GET_PARAMETER('SMTP_PASSWORD')
    ----------------------------------------------------------------------------------------------
    my smtp password
    
    1 row selected.
    

    Kind regards
    Christian

  • VALIDATION - function returns the error text

    I have a domain that occurs on about 12 pages, I need to post this field with some code

    I created a function on the database that performs this validation, I pass the field value to the function and it returns some text of error, or NULL if the value is correct

    I can't for the life of figure me out how to call the function of APEX

    I've tried everything

    FUNCTION RETURN ERROR TEXT, Expression SQL, PL/SQL Expression... nothing works!

    to call the function my comand is

    FN_VALIDATE_HR1_REF (: P1_GCI,: P1_HR1_REF);

    I want to return the error on the function text and display it in the banner of APEX error

    any help greatly appreciated

    A function like this return error text should work:

    Return (FN_VALIDATE_HR1_REF (: P1_GCI,: P1_HR1_REF));

    Is giving the error?

Maybe you are looking for

  • Remove photos from ios devices.

    If I delete the photos on my ipad or iphone original will always be in my library icloud? I would still be able to access my photos, my icloud, on my ios devices, but do not want to store photos on them. I already have icloud configuration to optimiz

  • I can not give the password in the Terminal application show the lock icon?

    I can not give the password in the Terminal application show the lock icon? How to Slove this isso please help me? does not accept the password. See screenshot below Thank you

  • Re: My Tecra M2 won't turn on

    My Tecra M2 lights. The power light is on. When you press power button the power led turns off then back. Nothing else

  • Satellite L670-1john - recovery Will HDD work if I leave the D partition?

    My laptop is L670-1Jn On my drive C: is installed windowsOn my drive D: is installed HARD drive recovery With windows 7 I want to create a new partion E: on my D: driveThe E: partition will be reserved for my data.Once create E: partition I want to d

  • A808 desktop shortcuts

    Hello I just bought lonovo A808 smartphone and I managed to make desktop shortcuts all disappear, as he tried to organize them. Now, I can see them in the Manager of the screen, but not on the main screen. When I am trying to locate a new shortcut, I