Exception in the procedure

Attached a code to compile all invalid objects. Could you please help to write a code to intercept the warning as exception error.

Possible wrong situation are remote object unavailable, invalid accordingly.

Running
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
PL/SQL Release 9.2.0.1.0 - Production

Thanks in advance.
Sheen
-----------------------------------------------------------------------------------------------------------------------------
set serveroutput on size 1000000

declare
   sql_statement varchar2(200);
   cursor_id     number;
   ret_val       number;
begin

   dbms_output.put_line(chr(0));
   dbms_output.put_line('Re-compilation of Invalid Objects');
   dbms_output.put_line('---------------------------------');
   dbms_output.put_line(chr(0));

   for invalid in (select object_type, owner, object_name
                   from   sys.dba_objects o,(select max(level) dlevel, object_id from public_dependency 
                                            connect by object_id = prior referenced_object_id 
                                            group by object_id) d
                   where  o.object_id    = d.object_id(+)
                     and  o.status       = 'INVALID'
                     and  o.object_type in ('PACKAGE', 'PACKAGE BODY',
                                            'FUNCTION',
                                            'PROCEDURE', 'TRIGGER',
                                            'VIEW') 
                     and  o.owner        =  '*****'
                   order  by d.dlevel desc, o.object_type) loop

      if invalid.object_type = 'PACKAGE BODY' then
         sql_statement := 'alter package '||invalid.owner||'.'||invalid.object_name||
                          ' compile body';
      else
         sql_statement := 'alter '||invalid.object_type||' '||invalid.owner||'.'||
                          invalid.object_name||' compile';
      end if;

      /* now parse and execute the alter table statement */
      cursor_id := dbms_sql.open_cursor;
      dbms_sql.parse(cursor_id, sql_statement, dbms_sql.native);
      ret_val := dbms_sql.execute(cursor_id);
      dbms_sql.close_cursor(cursor_id);
      dbms_output.put_line('Return Value :'||ret_val);
      dbms_output.put_line(sql_statement);
      if ret_val=0 then
      dbms_output.put_line(rpad(rpad(invalid.owner,10)||' '||rpad(initcap(invalid.object_type),15)||' '||
                                invalid.object_name, 45)||' : compiled');
      else
            dbms_output.put_line(rpad(rpad(invalid.owner,10)||' '||rpad(initcap(invalid.object_type),15)||' '||
                              invalid.object_name, 45)||' : compiled with errors');
      end if;   
-----------------------------------------------------------------------------------------------------------------------------

      end loop;

end;
/
Published by: Jose Sheen on November 15, 2011 03:46

Published by: Jose Sheen on November 15, 2011 03:52

Published by: Jose Sheen on November 15, 2011 04:54

Read the second link above and remove unnecessary, dangerous WHEN OTHER exceptional hider.

Tags: Database

Similar Questions

  • the exception in the procedure call management

    Hello

    I have a package where currently make phone calls to private public process procedures.

    and the senario is: -.

    create package body p_tst
    is

    ex_failed exception;

    -It's private proc
    procedure p_private
    is
    Start
    .
    .
    raise ex_failed;
    exception
    When ex_failed
    then
    lift;
    .........
    end p_private;

    procedure p_public
    is
    Start
    ....
    -nomaking appeal to the private sector
    -procedure
    p_private;

    -Here, I need to catch
    -the exception thrown
    -past of callee
    -procedure
    When ex_failed
    ...
    end p_public;

    end;

    Basically, I want to catch any exception of procedure called passed to the procedure call and raise the same exception by calling procedure.

    is it possible to intercept the exception even in the calling procedure?

    Yes, p_private throws the exception, it will be taken by p_public and the program stops after dbms_output.

  • Hi, I created the procedure and its code is / / DELETE FROM <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? > / / and when I'm running, the error appeared //com.sunopsis.tools.core.exception.SnpsSimpleMessageExcepti

    Hi, I created the procedure and its code is / / DELETE FROM <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? > / / and when I'm running, the error appeared.

    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17517: error in the interpretation of the task.

    Task: 1

    java.lang.Exception: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:489)

    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:737)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:465)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    Caused by: java.lang.Exception: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:476)

    ... 11 more

    Caused by: org.apache.bsf.BSFException: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at bsh.util.BeanShellBSFEngine.eval (unknown Source)

    at bsh.util.BeanShellBSFEngine.exec (unknown Source)

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:471)

    ... 11 more

    Text: REMOVE OF <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? >.

    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:764)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:465)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    If you do this in a procedure, use the following syntax:

    <%=odiRef.getObjectName("L", "TRG_SALES", "D")%>

    and set the relevant logical schema in the options on the target tab of the procedure. Also, make sure you only select the correct technology type in the options on the target tab.

  • Exception management - inside the procedure

    Hello

    I'm trying to insert records into our target within a cursor table.

    (For after the analysis of the values of the Source table and to make changes in the format of the value and insert into the target table)

    I need to capture the exception within the cursor and save these exception in an error table.

    I use the exception within the cursor for loop block.

    example code:

    C1 loop c_cursor1

    Start

    ... Insert the statement after the analysis of the values...

    exception

    while others

    then

    DBMS_OUTPUT. Put_line (' error code: ' |) SQLCODE);

    dbms_output.put_line (' error: ' |) SQLERRM);

    end;

    end loop;

    Examples of exception scenarios:

    1)

    Error report:

    ORA-01476: divisor is equal to zero

    ORA-06512: at "APX_DEVELOPMENT. PKG_CUSTOMER_FEDERATION', line 165

    ORA-06512: at line 3 level

    01476 00000 - "the divisor is equal to zero.

    Error code: - 1476

    Error message: ORA-01476: divisor is equal to zero

    2)

    Error report:

    ORA-12899: value too large for column 'APX_DEVELOPMENT '. "" "" RG_ORIGINATOR '. "" CREATED_BY' (real: 14, maximum: 10)

    ORA-06512: at "APX_DEVELOPMENT. PKG_CUSTOMER_FEDERATION', line 133

    ORA-06512: at line 3 level

    12899 00000 - "value too large for column %s (actual: %s, maximum: %s)).

    Error code: - 12899

    Error message: ORA-12899: value too large for column 'APX_DEVELOPMENT '. "" "" RG_ORIGINATOR '. "" CREATED_BY' (real: 14, maximum: 10)

    I use SQLCODE and SQLERRM to capture the codes and messages.

    But how to capture the package or the procedure name, and line number.

    for example. I need to capture something like below

    ORA-06512: at "APX_DEVELOPMENT. PKG_CUSTOMER_FEDERATION', line 165

    ORA-06512: at "APX_DEVELOPMENT. PKG_CUSTOMER_FEDERATION', line 133

    How to get to this

    Thanks in advance for your help.

    Please let me know for further details.

    Use dbms_utility.format_error_backtrace... Check below...

    http://docs.Oracle.com/database/121/ARPLS/d_util.htm#i1003874

    Thank you

    Ann

  • NtrigApplet - unable to connect to the driver: failed to open device___TVAgent.exe - Entry Point not found the procedure entry point PowerReadACValue could not be found in the dynamic library POWRPROF.dll

    Hi all

    I have a HP TouchSmart tx2-1025dx Notebook PC Vista... I met 2 large pop-up windows that will not close & appear as soon as I turn on my computer gives me a time DIFFICULT to access anything whatsoever...

    They read as follows:

    NtrigApplet - unable to connect to the driver: failure to open the device

    TVAgent.exe - Entry Point not found the procedure point PowerReadACValue entry is not found in the dynamic library POWRPROF.dll

    CAN SOMEONE PLEASE HELP?
    THANK U :)

    Hi the apprentice 85,

    Remember to make changes to the computer before that happened?

    Looks like the problem is hardware or software related, I suggest you follow the below mentioned steps below to refine the question

    Step 1: Disconnect all external devices (printers, scanner, USB (universal serial bus) readers, etc...)  Except the keyboard and mouse and then start.

    If this solves the problem, then add back devices at a time until you discover the piece of hardware causing the issue.  Then get any drivers\software update for the device.

     

    Step 2: Put the computer to boot to determine which program is causing the problem

    Follow step 1 in the link below,

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    If everything works well after a clean boot, you can deduce that some third-party services are at the origin of the problem.

    Continue with the remaining steps to pin-point on the third party service.

    After find you the program that is causing the problem, you will have to perhaps to update or install a newer version of the program, if you rarely use that you should consider uninstalling the software.

    Important: n ' forget not the computer to start normal follow step 7 in the link.

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • ORA-06508, procedure cannot call the procedure of package

    I have a large stored procedure that calls a package (procedure) that manages a number of procedures to determine whether the process can continue or not.  (It checks authorization of the student to enroll in a class).  We have a web process calling the stored procedure, and that works fine.  What does not work, is a call to the package.  Oracle returned ORA-06508: PL? SQL: could not find program unit called.

    I have included instructions for debugging, so I know that it is the specific call to a procedure in the package fails with ORA-06508.  Thinking it's perhaps something in the package, I inserted a debug statement as the first line in the procedure called in the package.    (Debugging instructions call a procedure inserts of rows in a table of debugging with independent validation).

    When I log in the user account with sqlplus and run a test, everything works fine.  But when the web process is running under the same user, the process fails to call the procedure of package and fails with ORA-06508.

    It seems as if the web process runs with the rights of the appellant, or a role is not granted.

    Can someone help me understand what the problem is?

    offered hv, I appreciate your comments.

    We solved the problem: remove the package that couldn't be cited, then re-create.   That's all!

    Apparently, something in the database was tangled upward.   The server recently had problems with disk space, then it might have been related to that.  But we'll never know for sure.

    The stored procedure and packaging (procedures) which he called were owned by the same schema, and there is no mechanism that I can find to prevent one of the other appellant.  But that was the case - Oracle threw the ORA-06508 exception when the stored procedure called the package procedure.

    I replaced the stored procedure and package several times fine-tuning debugging code, but this has not fixed the problem.

    Finally let it drop and then re-create the package, it's which solved the problem.

    Regarding requests to view the code, there is no way that I could reproduce the problem, since the error that occurred was against the permissions and rules which packages run and the procedures of the Oracle.  Thanks for all the tips and suggestions.

  • How to call the procedure on the page of the ofa

    Hi all

    I have a button.when I click this button need to call the procedure and should return the values.i tried with below code.am is error.i am passing two parameters to the procedure.please suggest me where I made a mistake in the code.

    error while calling procedure.PNG

    code in am

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

    public String calprorate (String laseid, String billingid)

    {

    OADBTransaction oadbtransaction = (OADBTransaction) getTransaction ();

    OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl) getTransaction ();

    String retValues;

    System.out.println ("number:" + laseid);

    StringBuffer str = new StringBuffer();

    Str.Append ("BEGIN");

    Str.Append (LEASE_PRORATE_PKG ".") LEASE_PRORATE_PROC1 (»);

    Str.Append ("p_lease_id = >: 1");

    Str.Append ("p_billing_id = >: 2");

    Str.Append ("P_PRORATE = >: 3");

    System.out.println ("params");

    Str.Append (»); «) ;

    Str.Append ("END");

    System.out.println ("End");

    OracleCallableStatement oraclecallablestatement =

    (OracleCallableStatement) oadbtransaction.createCallableStatement (str.toString (), 1);

    System.out.println ("Oracle");

    try {}

    oraclecallablestatement.setString(1,laseid);

    oraclecallablestatement.setString(2,billingid);

    oraclecallablestatement.setInt (1, Integer.parseInt (laseid));

    oraclecallablestatement.setInt (2, Integer.parseInt (billingid));

    System.out.println ("param");

    oraclecallablestatement.registerOutParameter (3, Types.VARCHAR);

    System.out.println("3");

    oraclecallablestatement. Execute();

    System.out.println ("exe");

    retValues = oraclecallablestatement.getString (3);

    }

    catch (System.Exception e)

    {

    System.out.println ("delivery");

    throw OAException.wrapperException (e);

    }

    Return retValues;

    System.out.println ("End");

    }

    code co:

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

    If (pageContext.getParameter ("Calc")! = null) {}

    Vo1 OAViewObject = (OAViewObject) am.findViewObject ("AddonBillingVO");

    System.out.println ("VO");

    {if(VO1!=null)}

    CNT int = vo1.getRowCount ();

    System.out.println ("count:" + cnt);

    If (cnt > 0)

    {

    RowSetIterator rs = vo1.createRowSetIterator("empIterator");

    System.out.println ("EMP");

    If (rs! = null)

    {

    While (rs.hasNext ())

    {

    AddonBillingVORowImpl line = rs.next ((AddonBillingVORowImpl));

    System.out.println ("impl");

    If (line! = null)

    {

    String laseid = row.getAttribute("LeaseId").toString ();

    System.out.println (laseid);

    String billingid = row.getAttribute("AddonBillingId").toString ();

    [Serializable] param = {}

    laseid, billingid

    };

    String newupc = (String) am.invokeMethod ("calprorate", param);

    }

    }

    Khalil.

    You can paste your spec procedure here?

    Also see: Oracle tips of Johny: OAF: sample code to call the PL/SQL of OA Framework procedure

  • issues related to the parameter in the procedure

    Hi all

    I have a procedure which the code is given below:

    create or replace PROCEDURE seods01.get_cert_tx_lot_tmp (acct_alt_id_in in VARCHAR2

    , acct_alt_id_cntx_cde_in IN VARCHAR2 default 'COLA account number.

    ,                                              ibd_id_in               IN  INTEGER

    qry_rslt_out to sys_refcursor)

    IS

    BEGIN

    OPEN FOR Qry_rslt_out

    SELECT L.tx_lot_seq_nbr

    L.hld_prd_dte

    L.orig_purc_dte

    L.tx_lot_amt

    L.updt_tx_lot_amt

    L.tran_desc_txt

    OF v_acct_alt_id A

    v_cd_tx_lot L

    WHERE A.acct_alt_id = acct_alt_id_in

    AND A.acct_alt_id_cntx_cde = acct_alt_id_cntx_cde_in

    AND A.ibd_id = ibd_id_in

    AND L.eods_acct_id = A.eods_acct_id;

    EXCEPTION

    WHILE OTHERS THEN

    dbms_output.put_line(SQLCODE||) SQLERRM);

    END get_cert_tx_lot_tmp;

    now when I run the SP in the following way it works fine:

    VAR C1 REFCURSOR
    EXECUTE SEODS01.get_cert_tx_lot_tmp ('004000000000000093108026740', 'Number of COLA account', '1',: C1);

    PRINT C1

    When I try to ignore this value by default setting, then it is throwing ' wrong number or types of arguments "error

    VAR C1 REFCURSOR
    EXECUTE SEODS01.get_cert_tx_lot_tmp ('004000000000000093108026740 ', ' 1',: C1);

    PRINT C1

    and when I tried to put this as null or "then it gives me no results. only way through which I can produce results of this procedure without giving the default parameter is the name of the column with the value of the parameter as follows:

    VAR C1 REFCURSOR
    RUN SEODS01.get_cert_tx_lot_tmp (acct_alt_id_in = > '004000000000000093108026740', ibd_id_in = > '1', qry_rslt_out = >: C1);

    PRINT C1

    but the condition is that we do not want our consumers to put names of columns when they do not pass the default value setting, I hope that there should be a way to do it. Could someone help me please on this issue.

    Hello

    If you want to use positional notation, then you can only omit parameters by default when they are at the end of the parameter list. In your case, this would mean

    (acct_alt_id_in in VARCHAR2

    ibd_id_in in FULL

    qry_rslt_out ON sys_refcursor

    acct_alt_id_cntx_cde_in IN VARCHAR2 default 'COLA account number')

    Or you can put the procedure in a package and overload

    PROCEDURE seods01.get_cert_tx_lot_tmp

    (acct_alt_id_in in VARCHAR2

    acct_alt_id_cntx_cde_in IN VARCHAR2

    ibd_id_in in FULL

    qry_rslt_out to sys_refcursor)

    PROCEDURE seods01.get_cert_tx_lot_tmp

    (acct_alt_id_in in VARCHAR2

    ibd_id_in in FULL

    qry_rslt_out to sys_refcursor)

    In the procedure without the acct_alt_id_cntx_cde_in parameter, you can call the other version and provide the default value.

    Concerning

    Marcus

  • error in the procedure 'Send Jython HTML Email'

    I used the procedure to "Send the Email of HTML Jython" to send an email to ODI 11 g.

    Options:

    The entries I used are

    Host: Address of the SMTP server

    < Default > port: 25

    < Default > SMTP Auth: Yes

    User:

    Password *.

    At ***@***.com

    Of ***@***.com

    Test of the object

    LoadfromFile No.

    FilePath D:\

    MessageText Test_Message

    Is < default > HTML: Yes

    Spare D:\


    Error message after I got to the step "to create a complete message:

    "

    org.apache.bsf.BSFException: exception of Jython:

    Traceback (most recent call changed):

    File "< string >", line 25, < module >

    IOError: (21, "Is a directory", ")

    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)

    at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)

    at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)

    at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)

    at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)

    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:376)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:309)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:301)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:865)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:137)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    Caused by: Traceback (most recent call changed):

    File "< string >", line 25, < module >

    IOError: (21, "Is a directory", ")

    at org.python.core.PyException.fillInStackTrace(PyException.java:70)

    at java.lang.Throwable. < init > (Throwable.java:181)

    at java.lang.Exception. < init > (Exception.java:29)

    to java.lang.RuntimeException. < init > (RuntimeException.java:32)

    to org.python.core.PyException. < init > (PyException.java:46)

    to org.python.core.PyException. < init > (PyException.java:43)

    at org.python.core.Py.IOError(Py.java:175)

    to org.python.core.io.FileIO. < init > (FileIO.java:77)

    at org.python.core.PyFile.file___init__(PyFile.java:157)

    to org.python.core.PyFile$ exposed___new__.createOfType (unknown Source)

    at org.python.core.PyOverridableNew.new_impl(PyOverridableNew.java:12)

    at org.python.core.PyType.invoke_new_(PyType.java:432)

    at org.python.core.PyType.type___call__(PyType.java:1397)

    at org.python.core.PyType.__call__(PyType.java:1388)

    at org.python.core.OpenFunction.__call__(__builtin__.java:1576)

    at org.python.core.PyObject.__call__(PyObject.java:414)

    at org.python.core.PyObject.__call__(PyObject.java:418)

    to org.python.pycode._pyx1609.f$ 0 (< string >: 30)

    to org.python.pycode._pyx1609.call_function (< string >)

    at org.python.core.PyTableCode.call(PyTableCode.java:165)

    at org.python.core.PyCode.call(PyCode.java:18)

    at org.python.core.Py.runCode(Py.java:1204)

    at org.python.core.Py.exec(Py.java:1248)

    at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)

    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)

    ... 19 more

    "

    Hi 2782749,

    It seems that this has to do with the path of the attachment. Could you try giving a full path to the file to see if it works? It is perhaps required in this procedure.

    Could you post the code of procedure you?

    Best regards

    JeromeFr

  • How to get the name and number of the procedure parameter list or a function?

    I stated the procedure described in the package

    If I want to get the number and the name of the parameter list, so how do I it

    I don't have I her name with the package.

    create or replace package demoApp is

    PROCEDURE insert_data (p_fname IN VARCHAR2,

    p_lname IN VARCHAR2,

    p_address IN VARCHAR2,

    p_cellno IN VARCHAR2,

    p_email IN varchar2);

    end demoApp;

    create or replace package demoApp body is

    PROCEDURE insert_data (p_fname IN VARCHAR2,

    p_lname IN VARCHAR2,

    p_address IN VARCHAR2,

    p_cellno IN VARCHAR2,

    p_email IN varchar2) IS

    EmpID number;

    BEGIN

    Select nvl (max (emp1.empid), 0) + 1 in EMP1 empid;

    INSERT INTO VALUES EMP1 (empid, p_fname, p_lname, p_address, p_cellno, p_email);

    EXCEPTION

    WHILE OTHERS THEN

    raise_application_error (-20001,' insert the problem ' |) SQLERRM);

    END;

    end demoApp;

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

    I want to get the name of the parameter and the number of use of stroredrprocedure ""demoApp.insert_data " "

    Select *.

    of all_arguments

    where package_name = 'DEMOAPP.

    and object_name = 'INSERT_DATA.

  • Can't get the procedure to update - PLS - 00306:Wrong number or types of arguments

    I'm in a situation where I think that despite the correct number of parameters by the way my local procedure (which has been "forward declarations" in addition to logical writing for her; I use all this in a package) fails to compile in SQL * faster due to the error PLS - 00306:Wrong number or types of arguments in the call to P_SENDMAIL.


    I'm passing 5 parameters in the area of forward declarations and also in the logic/header inside in addition to calling the procedure in the package. Can one of you help mewith this and tell me where exactly the error might be. Here is the code:


    [code]

    -Local variable

    CRLF VARCHAR2 (2) CONSTANT: = CHR (13) | CHR (10);

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

    -FORWARD DECLARATIONS

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

    PROCEDURE p_sendmail (p_sender_email IN VARCHAR2,

    P_FROM IN VARCHAR2,

    p_to IN VARCHAR2,

    msg_subject IN VARCHAR2 DEFAULT NULL,

    p_msg_body IN LONG DEFAULT NULL);

    [/ code]


    The procedure itself:


    [code]


    PROCEDURE p_sendmail (p_sender_email IN VARCHAR2,

    P_FROM IN VARCHAR2,

    p_to IN VARCHAR2,

    msg_subject IN VARCHAR2 DEFAULT NULL,

    p_msg_body IN LONG DEFAULT NULL) is

    LONG v_to_list;

    LONG v_cc_list;

    LONG v_bcc_list;

    T_DATE VARCHAR2 (255) DEFAULT TO_CHAR(SYSDATE, 'DD MON YYYY HH24:MI:SS PM');

    g_mail_conn UTL_SMTP. CONNECTION;

    SMTP_HOST CONSTANT VARCHAR2 (256): ='smtp - abc.defg.ca';

    SMTP_PORT CONSTANT PLS_INTEGER: = 25;

    BEGIN

    g_mail_conn: = UTL_SMTP. OPEN_CONNECTION (SMTP_HOST, SMTP_PORT);

    UTL_SMTP. HELO (g_mail_conn, SMTP_HOST);

    UTL_SMTP.mail (g_mail_conn, p_sender_email);

    UTL_SMTP. RCPT (g_mail_conn, p_to);

    UTL_SMTP.open_data (g_mail_conn);

    UTL_SMTP.write_data (g_mail_conn, "|) CRLF);

    UTL_SMTP.write_data (g_mail_conn, p_msg_body);

    UTL_SMTP.close_data (g_mail_conn);

    UTL_SMTP. Quit (g_mail_conn);

    EXCEPTION

    WHEN utl_smtp.transient_error THEN

    Dbms_output.put_line ('TransientError: invalid operation in the service may not be available.) ") ;

    WHEN utl_smtp.permanent_error THEN

    Dbms_output.put_line (' permanent error: the entered email is invalid or recepients mailbox is full.) ») ;

    WHILE others THEN

    Dbms_output.put_line ('Unable to send an email' |') '|| SQLERRM);

    END p_sendmail;

    [/ code]

    Now by calling the procedure to send an email:

    [code]

    p_sendmail (p_sender_email = > ' [email protected]'-, send an E-mail to the donor )

    p_from = > ' ADS < [email protected] > ',

    p_to = > v_store_email_address,

    p_msg_subject = > 'anonymous user ',.

    p_msg_body = > 'thank you ' |

    CRLF.

    "Email confirms that we have received your promise |

    CRLF.

    CRLF.

    ' Name: '. v_full_name |

    CRLF.

    ' Temporary ID: ' | v_azbwccp_id |

    CRLF.

    "Reference number: ' |" MTID |

    CRLF.

    "Amount: ' | '. TO_NUMBER (campaign_desg_amt1) |

    CRLF.

    "Campaign: ' | '. campaign |

    CRLF.

    ' Description: ' | '. adbdesg_rec.adbdesg_name |

    CRLF.

    ' Type: ' | atvpldg_rec.atvpldg_desc |

    CRLF.

    ' Duration: ' | '. atvpdur_rec.atvpdur_desc |

    CRLF.

    "Frequency: ' | '. atvfreq_rec.atvfreq_desc |

    CRLF.

    "Start date: ' | '. bill_date2 |

    CRLF.

    CRLF.

    'Your commitment is processed.' |

    CRLF.

    "At the same time, if you want to change this transaction, please contact us.

    CRLF.

    CRLF.

    "Thank you for your support." |

    CRLF.

    CRLF.

    CRLF.

    CRLF.

    ' * This is an automated message system. Please, do not respond to this email. *** ') ;

    [/ code]


    I've also attached a screenshot of the error message below:

    ScreenHunter_15 Nov. 27 09.35.jpg

    Please help me if you can. I just can't understand the question.


    Thanks in advance

    Sandeep

    In the header of the procedure, I spent my parameter as msg_subject and during the call, he was p_msg_subject. The minute that I corrected the error, I was able to correctly compile the whole package body.

    The question can be now closed.

  • The procedure helps

    Hello

    Can someone help me with the procedure below. It seems to me, but I'm unable to turn it and get the error.

    "Error (8.36): PLS-00103: encountered the symbol"UNDER"when expecting one of the following conditions: (- + case null new mod continue County avg current prior min max sql stddev sum variance execute forall time timestamp interval date fusion pipe)"

    CREATE OR REPLACE PROCEDURE ddl_create_proc(p_table IN varchar2)
    AS
    i_stmt varchar2(200);
    BEGIN
    dbms_output.put_line('starting....');
    i_stmt := 'create table'||p_table||as 'select * from emp';
    execute immediate i_stmt;
    dbms_output.put_line('procedure Ended');
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('EXCEPTION '||SQLERRM||'MESSAGE'||SQLCODE);
    END;
    /
    
    

    Thanks in advance!

    Hello

    user782973 wrote:

    Hello

    Can someone help me with the procedure below. It seems to me, but I'm unable to turn it and get the error.

    "Error (8.36): PLS-00103: encountered the symbol"UNDER"when expecting one of the following conditions: (- + case mod new null continue County avg current min max sql prior stddev sum variance execute forall time timestamp interval date fusionpipe" ").

    1. CREATE OR REPLACE PROCEDURE ddl_create_proc (p_table IN varchar2)
    2. AS
    3. i_stmt varchar2 (200);
    4. BEGIN
    5. dbms_output.put_line ('starting...');
    6. i_stmt: = 'create table ' | p_table | as ' select * from emp';
    7. immediately run i_stmt;
    8. dbms_output.put_line ("'procedure completed");
    9. EXCEPTION
    10. WHILE OTHERS THEN
    11. dbms_output.put_line ('EXCEPTION' |) SQLERRM | ' MESSAGE' | SQLCODE);
    12. END;
    13. /

    Thanks in advance!

    In addition to what others have said, whenever you do the dynamic SQL code, display the value chain before you run it, like this:

    CREATE OR REPLACE PROCEDURE ddl_create_proc (p_table IN varchar2)

    AS

    i_stmt varchar2 (200);

    BEGIN

    dbms_output.put_line ('go... ») ;

    i_stmt: = 'create table ' | p_table | ' in select * from emp';

    dbms_output.put_line (i_stmt |) '= i_stmt in ddl_create_proc");  -For debugging

    immediately run i_stmt;

    dbms_output.put_line ('procedure completed");

    END ddl_create_proc;

    /

    After the test is finished, you can comment out the line marked "for debugging.

    You need an EXCEPTION section.  If there is an error, the error message will be displayed by default; you don't need to explicitly show.

    What is the big picture here?  What is this procedure intended to do?  There may already be a procedure provided by Oracle that the fact, perhaps in dbms_metadata:

    DBMS_METADATA

  • Diagnosis purple 5.5 ESXi host screen: 14 PF of Exception in the world 335026

    Hello

    I am having several problems with my VMWare ESXi 5.5 server.

    My server is a Dell PowerEdge T320 with RAID 1 (2 disc 1 to) contains 3 Virtual Machines (2 x Windows Server 2012 Standard and Windows SBS 2011).

    Server:

    Model: Dell PowerEdge T320

    Processor: Intel Xeon 1.90 E5-2450 MHz CPU

    Memory: 32 GB of memory

    The host runs sometimes for several hours or 30 minutes to receive the purple diagnostic screen: PF 14 of Exception in the 335026 world.

    I tried everything, I've updated the BIOS, iDRAC, BIOS configured as shown in the technical and the problem persists.

    The server has 1 month and does contain any sort of material error.

    I'm desperate, already studied various forums without success and carried out various procedures without success as well.

    Can you help me? Anyone?

    Thanks for the reply.

    Yes, both had.

    I changed network cards in Windows Server R2 E1000E VMXNET3 2012 and disabled the RSS with the command:

    netsh int tcp set global rss = off

    Also found a reference on issues between Windows Server R2 2012 and Notepad ++ (!):

    https://communities.VMware.com/message/2298732 # 2298732

    I ended up uninstalling.

    Now, Let's pray that does not appear any more purple screen.

    More suggestions that I need to know?

  • How to apply the procedure inside a procedure and the evils of the value in a variable?

    Hi all

    I'm usung oracle 11g.

    Here is my package and procedure

    I want to call get_email_details this procedure within the process_email_master and store the value in a variable in main proceedings

    create or replace

    PACKAGE ms_gen_process_email

    as

    type email_type is rendered (subject varchar2 (4000 tank),

    email_body varchar2 (4000 tank),

    to_receipent varchar2 (4000 tank),

    cc_receipent varchar2 (4000 char));

    type email_type_table is table of the email_type;

    procedure process_email_master)

    p_metric_name IN VARCHAR2,

    p_current_stage in varchar2,

    p_action in varchar2,

    p_pid number,

    P_OBJECT_ID in varchar2

    -p_emai_master on p_email_type_table

    );

    PROCEDURE get_email_details)

    p_metric_name IN VARCHAR2,

    p_current_stage in varchar2,

    P_ACTION in varchar2,

    p_email_type_table1 on email_type_table

    ) ;

    END ms_gen_process_email;

    ----

    create or replace

    PACKAGE ms_gen_process_email BODY

    as

    procedure process_email_master)

    p_metric_name IN VARCHAR2,

    p_current_stage in varchar2,

    p_action in varchar2,

    p_pid number,

    p_object_id in varchar2

    )

    as

    Start

    null;

    EXCEPTION

    WHILE OTHERS

    then

    null;

    end process_email_master;

    PROCEDURE get_email_details)

    p_metric_name IN VARCHAR2,

    p_current_stage IN VARCHAR2,

    P_ACTION in varchar2,

    p_email_type_table on email_type_table

    )

    as

    BEGIN

    Select the object, email_body, to_receipent, cc_receipent

    bulk collect into p_email_type_table

    of ms_gen_email_config_detail

    WHERE email_key =)

    SELECT email_key

    OF ms_gen_email_config

    WHERE metric_name = p_metric_name

    AND action p_action =

    and current_stage = p_current_stage

    );

    for me in p_email_type_table.first... loop of p_email_type_table. Last

    dbms_output.put_line (p_email_type_table (i) reserve .under | p_email_type_table (i) .email_body: p_email_type_table (i) .to_receipent: p_email_type_table (i) .cc_receipent);

    end loop;

    EXCEPTION

    WHILE OTHERS

    THEN

    NULL;

    END get_email_details;

    END ms_gen_process_email;

    but I get this error message

    Error (15,31): PLS-00201: identifier 'P_EMAIL_TYPE_TABLE' must be declared

    Concerning

    Dale

    See below the test case and change your code. You can call the procedure in detail within a main as procedure below

    CREATE or REPLACE PACKAGE test_pkg AS

    TYPE rec_val IS RECORD (empno, emp.empno%TYPE,

    Ename emp.ename%TYPE

    );

    TYPE nt_tabtest IS TABLE OF THE rec_val;

    PROCEDURE get_email_id (p_type to nt_tabtest);

    PROCEDURE get_email_master;

    END;

    /

    CREATE or REPLACE PACKAGE test_pkg BODY

    AS

    PROCEDURE get_email_id (p_type ON nt_tabtest)

    AS

    BEGIN

    SELECT EmpNo, ename COLLECT in BULK in p_type FROM emp;

    END;

    PROCEDURE get_email_master

    AS

    v_type nt_tabtest;

    BEGIN

    get_email_id (v_type);

    BECAUSE me IN v_type. FIRST... v_type. LAST

    LOOP

    DBMS_OUTPUT. Put_line (v_type (i) .empno: v_type (i) .ename);

    END LOOP;

    END;

    END;

    /

    Post edited by: 000000

  • Refcursor in the procedure

    Hi all

    There will be no effect in performance if we declare refcurosr with suspicion NOCOPY parameter in a Stored procedure procedure/package?

    AFAIK variable refcursor who will make reference to the calling environment will hold just pointer not data and so avoid a NOCOPY effect.

    Thank you!!

    DS says:

    One of my senior team members asked me to NOCOPY in all existing procedures where refcursor is returned as a parameter in my output project.

    I told him that this will not add any performance improvement and has no effect.

    I did it, because I was forced to do so.

    Want to just check and take the advice from here in this forum.

    I still have the document (in e-mails and in the procedure itself at the top) all these changes so that the future code-reviewers know EXACTLY why this change has been made and who authorized it. Probably you are asking your "senior" you say the reasons to support the change that they requested; You should document those as well.

    Sounds like your "senior" team member is not so superior after all. You can use this as a topic of discussion in your dev group.

    See the doc of the PL/SQL language.

    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28370/tuning.htm#i48500

    Calls to PL/SQL Tuning subprogramme with NOCOPY hint

    By default, OUT and IN OUT parameters are passed by value. The values of a IN OUT settings are copied before the delivery of the subprogramme. During the execution of the subprogramme, temporary variables to maintain the output parameter values. If the subprogram exits normally, these values are copied to the actual parameters. If the subprogram exits with an unhandled exception, the original settings are unchanged.

    When the parameters represent structures of large data such as collections, records and instances of object types, this reproduction slows down execution and uses memory. In particular, this overload applies to each call to a method of the object: temporary copies are made of all attributes, so that any changes made by the method are only apply if the method ends normally.

    To avoid this overload, you can specify the NOCOPY trick, which allows the PL/SQL compiler to pass OUT and IN OUT parameters by reference. If the subprogram exits normally, the action is the same as usual. If the subprogramme leaves at the beginning with an exception, the values of OUT and IN OUT parameters (or the attributes of the object) can still change. To use this technique, check that the subroutine handles all exceptions.

    Note the reference to the "large data structures. As you already know a REFCURSOR isn't a large data structure, so will not use NOCOPY.

    The most important side effect is that, as noted in the last paragraph above, the characteristics of the 'exit' are modified if you use NOCOPY.

    Point out that the last clause in your "senior": ENSURE THAT THE subprogram MANAGES all THE EXCEPTIONS.

    Normally (i.e. without using NOCOPY) a REFCURSOR lucifera is a parameter OUT will NOT have a value if the procedure stops with an exception if the caller is unable to use it eventually. Maybe this isn't the case if you use NOCOPY.

    Generally however, the use of NOCOPY would simply be an amendment unnecessary, but harmless.

Maybe you are looking for

  • EtreCheck 3.0

    I recommended a user execute EtreCheck 3.0. It finds Adware and removed, but I wonder about the other two files that it removed... Files deleted by EtreCheck: ⓘ August 14, 2016, 19:57:21 - /Users/SarahChia/Library/Safari/Extensions/Searchme.safariext

  • beta version string

    This version of Firefox is 21.0 on Vista 64. On XP I'm on the "beta" channel and FFx updated to version 22.0 earlier today. Now I want this version on Vista 64 to move to the "beta chain.

  • ThinkPad T410

    I anticipate get me the new ThinkPad T410, but I need to know one thing. The integrated video graphics card is the following; Intel Graphics Media Accelerator 5700MHD - AMT What is the max resolution that can be set to when the laptop is connected to

  • Problem keyboard ES1-311

    So I have a strange to you today. A week ago, I started my Acer Aspire E13 ES1 - 311 Windows 10 running upward to that I could not enter my password. A little strange that I've only used the previous night. So I tried several things. Uninstall progra

  • find a product key for windows anytime upgrade

    How can I get a Windows anytime upgrade product key?