Retry whole procedure on exception

Hi everyone,
I have a process which calls several OBPM procedures.
Within these OBPM procedures there are several automatics which translate bpm variables (mostly strings / group of strings) to introspected xml variables and the response back to a bpm variable. Sometimes the WS callout won't give the desired result (technical OK, functional NOK; e.g.: customer not found) and I'm throwing an funtional exception when this is the case.
The problem that I'm having right now, is that when I set the correct BPM variables (e.g. customer number, which is the procedure's input) the exception is sent back to the automatic where the exception occurred and will still fail because the WS response is still incorrect.
I would like to retry the whole procedure and not just the automatic within the procedure where the exception was thrown.
I've tried Action = repeat (which saved the instance variables in the screenflow) / retry (throws back to the automatic where the exception occurred) but I'm a bit stuck right now.
How could I solve this?
Thanks in advance,
Joris.

To anyone having the same problem;
I didn't get this to work as intended.
A workaround for me is to create an in- and outgoing instance variable which contains a success/failure status and to have an conditional transition (procresult != "success") from the procedure which would lead to functional exception handling.
The exception handling screenflow would be able to abort and retry so the only unconditional transition is going back to the failed procedure.

Similar Messages

  • Retry delay within an Exception path

    Do you know if there is a way to set a retry-delay within an exception path. I tried using a timer control, but it doesn't seem to work. I noticed that a retry-count and retry-delay can be set for the overall process. Is there a way to determine which retry the process is executing. For example I want to send an email to production support, but only on the final retry and the retries need to be delayed. Any ideas?

    if (this.context.getExceptionInfo().getRetriesRemaining() == 0 )

  • How to handle the unsuccessful execution of a procedure through exception

    I have to run a sequence of procedures through a procedure. The execution of a succeeding procedure depends on the successful execution of the preceding procedure.What i want is that a procedure is only executed when the preceding
    procedure is successful.

    I wonder which is the best practice ...
    1) to pack all exceptions - occured in the sub-procedures - in the main procedure
    or
    2) to pack all exceptions - occured in the sub-procedures - locally , in the body of these sub-procedures....???
    In other words....
    procedure main
    as
       begin
          procA;
          procB;
          exception
             when ......
             when .....
             when .....
        end;
    procedure A
    as
      begin
          return;
      end;
    procedure B
    as
      begin
          return;
      end;
    OR
    procedure main
    as
       begin
          procA;
          procB;
        end;
    procedure A
    as
      begin
          exception
            when ...........
            when ...........
          return;
      end;
    procedure B
    as
      begin
          exception
            when ...........
            when ...........
          return;
      end;Thanks...
    Sim

  • Relation between Pricing procedure &Tax Proc , how the whole procedure work

    Hi Gurus,
    I need want to know in detail , How a pricing Procedure is linked to the FI Tax procedure and how the whole mechanism work .
    Pls clarify and explain me the whole process , As i have seen that the Tax condition type we maintain in pricing , we alos mentioned in Taxinj and step is also given in FTXP .
    So pls give me more clarity on this
    Regards
    Umang

    For A /P tax condations , tax amount posted  to accounts from tax procedure.
    For A/ R taxcondations ( which condations we are using in sales pricing procedure)
    tax amount posted  to accounts from sales pricing procedure
              It is helpful give rewards points
    Regards
    Raj

  • When I sync a song to my iPod it has faded text on the title, will not play, and will not delete! When I tried to delete, it wiped my whole music library except for that handful of songs! Please help! I am desperate!!!

    Im lost! PLEASE PLEASE PLEASE HELP!!!

    I have the exact same problem!!! It's annoying me because I can't delete songs I don't want anymore!!! Someone help please!!!!!

  • How can I export the whole schema but except one table?

    I need export one schema from one hp-ux server using exp command, this schema will be exported into some dmp files, then I ftp these files into another hp-ux server, import this schema from these dmp file in that server.
    Problem is: there is one very big table which is about 20G size in this schema, so I don't want this table to be exported. I know there is a parameter called TABLES in exp command, but this parameter just apply to table-mode Export. So does there have other ways for me to achieve my goal?

    Hi,
    to exclude the table (or some of them) you can create control file using SQL*Plus with spool. All what you need is to create sql statement and save results in control file. As an example:
    oratest> select owner||'.'||table_name||','
    2 from all_tables where owner = user;
    OWNER||'.'||TABLE_NAME||','
    GORYA1.A1,
    GORYA1.CLEAN_D,
    GORYA1.D1,
    GORYA1.DICT_D,
    GORYA1.H1,
    GORYA1.MY_USERS,
    GORYA1.P1,
    GORYA1.P2000,
    GORYA1.PP1,
    GORYA1.PP2,
    GORYA1.REP_1,
    GORYA1.TREATMENT,
    GORYA1.TREATMENT1,
    Copy-paste it into control file under "tables=" clause and remove the last comma. You can add to the sql any "where" what you would like to restrict output.
    Andrey

  • How should I deal with exceptions?

    I have three possible choices that I see:
    (1) Deal with them in an exception handler class. Use try/catch/throw in the class. Have throw call a method in the exception handler class.
    (2) Use try/catch/throw and handle the exception in the same class where the exception occurs.
    (3) Use throws and deal with the exceptions in the mediator class. The mediator class allows for communication between my FileHandler class, my DBHandler class, my UIClass, and any future classes.
    Note that for each exception, I want to call a method in the UI class that displays a message to the user about the error so it can be debugged and a method in some class to write the error to an error log text file.

    Handling
    can mean as little as logging the error.I'm gonna have to go ahead and disagree with youthere, %.
    Disagree with me? This cannot be tolerated! 8)Watch it, lest yet get yer ass smote.
    Except for where you're intentionally
    smothering exceptions in finally blocks, or maybe
    just recording an InterruptedException, justlogging
    it is little better than smothering it. So what about unchecked exceptions? Are these .NET
    demon spawn?I let unchecked exceptions bubble up. I'd expect an appserver to catch and log them, so that a bug in one app doesn't cause the whole server to barf. But other than that kind of situation, these are exceptions that you usually shouldn't try to handle.
    >
    I'm curious, since this thread is so much about
    handling exceptions. What do people do besides
    report them? If you get a SQL exception, what
    recovery actions are you taking? Anything that I'm
    missing?Usually it just bubbles up, or it's a wrapped in a more appropriate or layer-specific exception and rethrown. Sometimes there might be a retry, but usually the exception bubbles up to the higher layers and gets presented to the user as something like, "Could not connect. Retry?" What I hate to see is this:
    try {
        // get stuff from the DB
    catch (SQLExeption exc) {
        // log it
    // Continue here (where "here" may be the calling method)
    // with no idea that anything went wong.If you do that, you might as well not have an exception mechanism. Just go back to return codes and don't bother checking them.

  • Exception handling for all the insert statements in the proc

    CREATE PROCEDURE TEST (
    @IncrStartDate DATE
    ,@IncrEndDate DATE
    ,@SourceRowCount INT OUTPUT
    ,@TargetRowCount INT OUTPUT
    ,@ErrorNumber INT OUTPUT
    ,@ErrorMessage VARCHAR(4000) OUTPUT
    ,@InsertCase INT --INSERT CASE INPUT
    WITH
    EXEC AS CALLER AS
    BEGIN --Main Begin
    SET NOCOUNT ON
    BEGIN TRY
    DECLARE @SuccessNumber INT = 0
    ,@SuccessMessage VARCHAR(100) = 'SUCCESS'
    ,@BenchMarkLoadFlag CHAR(1)
    ,@BenchmarkFlow INT
    ,@MonthYearStart DATE
    ,@MonthYearEnd DATE
    ,@StartDate DATE
    ,@EndDate DATE
    /* Setting the default values of output parameters to 0.*/
    SET @SourceRowCount = 0
    SET @TargetRowCount = 0
    /*Setting the Start and end date for looping */
    SET @MonthYearStart = @IncrStartDate;
    SET @MonthYearEnd = @IncrEndDate;
    /* Setting the @InsertCase will ensure case wise insertion as this sp will load data in different tables
    @InsertCase =0 means data will be inserted in the target TAB1
    @InsertCase =1 means data will be inserted in the target TAB2
    @InsertCase =2 means data will be inserted in the target TAB3
    @InsertCase =3 means data will be inserted in the target TAB4
    @InsertCase =4 means data will be inserted in the target TAB5
    @InsertCase =5 means data will be inserted in the target TAB6
    if @InsertCase =0
    WHILE (@MonthYearStart <= @MonthYearEnd)
    BEGIN
    SET @StartDate = @MonthYearStart;
    SET @EndDate = @MonthYearEnd;
    /* Delete from target where date range given from input parameter*/
    DELETE FROM TAB1
    WHERE [MONTH] BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)
    AND [YEAR] BETWEEN year(@StartDate) and year(@EndDate)
    /*Insert data in target-TAB1 */
    BEGIN TRANSACTION
    INSERT INTO TAB1
    A,B,C
    SELECT
    A,BC
    FROM XYZ
    COMMIT TRANSACTION
    SET @MonthYearStart = DATEADD(MONTH, 1, @MonthYearStart)
    SELECT @TargetRowCount = @TargetRowCount + @@ROWCOUNT;
    END -- End of whileloop
    END TRY
    BEGIN CATCH
    IF @@TRANCOUNT>0
    ROLLBACK TRANSACTION
    SELECT @ErrorNumber = ERROR_NUMBER() ,@ErrorMessage = ERROR_MESSAGE();
    END CATCH
    END--End of Main Begin
    I have the above proc inserting data based on parameters  where in @InsertCase  is used for case wise execution.
     I have written the whole proc with exception handling using try catch block.
    I have just added one insert statement here for 1 case  now I need to add further insert  cases
    INSERT INTO TAB4
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    INSERT INTO TAB3
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    INSERT INTO TAB2
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    I will be using following to insert further insert statements 
    if @InsertCase =1 
    I just needed to know where will be my next insert statement should be fitting int his code so that i cover exception handling for all the code
    Mudassar

    Hi Erland & Mudassar, I have attempted to recreate Mudassar's original problem..here is my TABLE script;
    USE [MSDNTSQL]
    GO
    /****** Object: Table [dbo].[TAB1] Script Date: 2/5/2014 7:47:48 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[TAB1](
    [COL1] [nvarchar](1) NULL,
    [COL2] [nvarchar](1) NULL,
    [COL3] [nvarchar](1) NULL,
    [START_MONTH] [int] NULL,
    [END_MONTH] [int] NULL,
    [START_YEAR] [int] NULL,
    [END_YEAR] [int] NULL
    ) ON [PRIMARY]
    GO
    Then here is a CREATE script for the SPROC..;
    USE [MSDNTSQL]
    GO
    /****** Object: StoredProcedure [dbo].[TryCatchTransactions1] Script Date: 2/5/2014 7:51:33 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE [dbo].[TryCatchTransactions1] (
    @IncrStartDate DATE
    ,@IncrEndDate DATE
    ,@SourceRowCount INT OUTPUT
    ,@TargetRowCount INT OUTPUT
    ,@ErrorNumber INT OUTPUT
    ,@ErrorMessage VARCHAR(4000) OUTPUT
    ,@InsertCase INT --INSERT CASE INPUT
    WITH
    EXEC AS CALLER AS
    BEGIN --Main Begin
    SET NOCOUNT ON
    BEGIN TRY
    DECLARE @SuccessNumber INT = 0
    ,@SuccessMessage VARCHAR(100) = 'SUCCESS'
    ,@BenchMarkLoadFlag CHAR(1)
    ,@BenchmarkFlow INT
    ,@MonthYearStart DATE
    ,@MonthYearEnd DATE
    ,@StartDate DATE
    ,@EndDate DATE
    /* Setting the default values of output parameters to 0.*/
    SET @SourceRowCount = 0
    SET @TargetRowCount = 0
    /*Setting the Start and end date for looping */
    SET @MonthYearStart = @IncrStartDate;
    SET @MonthYearEnd = @IncrEndDate;
    /* Setting the @InsertCase will ensure case wise insertion as this sp will load data in different tables
    @InsertCase =0 means data will be inserted in the target TAB1
    @InsertCase =1 means data will be inserted in the target TAB2
    @InsertCase =2 means data will be inserted in the target TAB3
    @InsertCase =3 means data will be inserted in the target TAB4
    @InsertCase =4 means data will be inserted in the target TAB5
    @InsertCase =5 means data will be inserted in the target TAB6
    IF @InsertCase =0
    WHILE (@MonthYearStart <= @MonthYearEnd)
    BEGIN
    SET @StartDate = @MonthYearStart;
    SET @EndDate = @MonthYearEnd;
    /* Delete from target where date range given from input parameter*/
    DELETE FROM TAB1
    WHERE START_MONTH BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)
    AND START_YEAR BETWEEN year(@StartDate) and YEAR(@EndDate)
    /*Insert data in target-TAB1 */
    BEGIN TRANSACTION
    INSERT INTO TAB1 (COL1,COL2,COL3)
    VALUES ('Z','X','Y')
    SELECT COL1, COL2, COL3
    FROM TAB1
    COMMIT TRANSACTION
    SET @MonthYearStart = DATEADD(MONTH, 1, @MonthYearStart)
    SELECT @TargetRowCount = @TargetRowCount + @@ROWCOUNT;
    END -- End of whileloop
    END TRY
    BEGIN CATCH
    IF @@TRANCOUNT > 0
    ROLLBACK TRANSACTION
    SELECT @ErrorNumber = ERROR_NUMBER() ,@ErrorMessage = ERROR_MESSAGE();
    END CATCH
    PRINT @SUCCESSMESSAGE
    END--End of Main Begin
    GO
    I am just trying to help --danny rosales
    UML, then code

  • Io exception: Connection reset by peer: JVM_recv in socket input stream read

    We are developing a new J2EE app using JDev, OC4J, servlets, and EJBs. We have determined that our firewall is closing database connections that have been idle for 1 hour. This is a security requirement that cannot be changed. When we try to use these idle connections in both stateless and entity beans, we consistently receive this or a similar error message:
    "ServletSACategoryList: Error invoking EJB procedure. Exception: java.sql.SQLException: StatelessSysAdminBean::getCategoryList - Io exception: Connection reset by peer: JVM_recv in socket input stream read "
    Environment:
    Oracle 9iAS 9.0.2.0.0
    Database: Oracle 8.1.7
    JDBC 8.1.7
    JDK 1.3
    JDev 9.0.2.829
    We are using the ejb-location attribute within data-sources.xml for JNDI lookup of the DataSource. Here is what this file looks like:
    <data-sources>
    <data-source
    class="oracle.jdbc.pool.OracleDataSource"
    name="jdbc/OracleDS"
    location="jdbc/OracleCoreDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/OraclePoolDS"
    url="jdbc:oracle:thin:@###.###.#.###:1521:dev1"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="????????"
    password="????????"
    max-connections="4"
    wait-timeout="20"
    min-connections="1"
    inactivity-timeout="60"
    connection-retry-interval="1"
    max-connect-attempts="3"
    />
    </data-sources>
    After calling getConnection() on the Connection object in my stateless bean, I have tried checking if the Connection object is null or isClosed(), I have caught any Exception, and looped to try again, but nothing has worked.
    Please respond to [email protected] or directly to this post if you can help in any way.
    Thank you,
    - Rob

    Hi Robert,
    If you don't mind, I can only offer a few suggestions for things
    to try -- I'm afraid I don't have a solution for you. Of-course,
    you may have already tried these things, so please excuse me if
    this is the case.
    Firstly, your "data-sources.xml" file looks "different". Have
    you read the "Data Sources" chapter of the "Oracle9iAS Containers
    for J2EE Services Guide, Release 2 (9.0.2)"? It is accessible
    from here:
    http://otn.oracle.com/docs/products/ias/doc_library/90200doc_otn/web.902/a95879/ds.htm#1004903
    Also, have you tried running OC4J in "debug" mode? This web
    page has more details:
    http://kb.atlassian.com/content/atlassian/howto/orionproperties.jsp
    I get the impression from the information you have supplied,
    that you may not be explicitly closing your database connections
    in your code. It looks to me like you are obtaining a database
    connection in your session bean, and then keeping it for the
    lifetime of that bean. Is that correct? I think it's better
    to obtain a connection when you need to interact with the database,
    and then close the connection immediately after completing the
    interaction with the database (but that's just my opinion).
    Lastly, if you haven't already discovered them, these web sites
    may also be of help:
    http://www.orionserver.com
    http://www.orionsupport.com
    http://www.elephantwalker.com
    Hope this helps you.
    Good Luck,
    Avi.

  • Still can't get the procedure to compile and run

    Sorry still having issues.
    Here is the whole sql, but I seriously suspect the problem is in the beginning somewhere, with one of the declarations.
    Any help would be appreciated. Since I can get this to run without a stored procedure ( all except the execute immediate statement ), then I assume my logic is ok, but as I said, something is wrong near the top.
    Thanks ,
    Floyd
    The sql is:
    spool proc.err
    CREATE OR REPLACE PROCEDURE floydw.loadtable_config AS
    i pls_integer ;
    sql_stmt VARCHAR2(4000);
    all_names VARCHAR2(4000);
    all_names2 VARCHAR2(4000);
    TYPE typ_coltab IS TABLE OF dba_tab_columns%ROWTYPE INDEX BY pls_integer;
    coltab_table typ_coltab ;
    coltab_table2 typ_coltab ;
    coltab_rec dba_tab_columns%ROWTYPE ;
    CURSOR cur is SELECT *
    FROM dba_tab_columns where owner='GWSTAGING_SENTRYPROD' and table_name='CONFIG' ;
    BEGIN
    i := 0 ;
    OPEN cur ;
    LOOP
    FETCH cur into coltab_rec ;
    exit when cur%notfound ;
    i := i+1 ;
    coltab_table(i) := coltab_rec ;
    coltab_table2(i).column_name := '"' || coltab_table(i).column_name || '"' ;
    END LOOP;
    all_names := NULL;
    all_names2 := NULL;
    FOR j IN 1 .. i
    LOOP
    all_names := all_names || ',' || coltab_table(j).column_name;
    all_names2 := all_names2 || ',' || coltab_table2(j).column_name ;
    END LOOP;
    all_names := SUBSTR (all_names, 2); -- Remove ', ' from beginning of list
    all_names2 := SUBSTR (all_names2, 2); -- Remove ', ' from beginning of list
    sql_stmt := 'insert into ' || coltab_rec.table_name ||' (' || all_names || ') SELECT ' || all_names2 || ' FROM "config"@sentry_l ;' ;
    --dbms_output.put_line ('executing ' || sql_stmt) ;
    execute immediate sql_stmt ;
    END;
    If I try to create it as is, I get:
    SQL> show errors
    Errors for PROCEDURE FLOYDW.LOADTABLE_CONFIG:
    LINE/COL ERROR
    7/3 PL/SQL: Item ignored
    7/31 PLS-00201: identifier 'DBA_TAB_COLUMNS' must be declared
    10/14 PL/SQL: Item ignored
    10/14 PLS-00201: identifier 'DBA_TAB_COLUMNS' must be declared
    11/18 PL/SQL: SQL Statement ignored
    12/8 PL/SQL: ORA-00942: table or view does not exist
    18/5 PL/SQL: SQL Statement ignored
    18/20 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    21/5 PL/SQL: Statement ignored
    LINE/COL ERROR
    21/24 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    22/5 PL/SQL: Statement ignored
    22/22 PLS-00487: Invalid reference to variable
    'DBA_TAB_COLUMNS%ROWTYPE'
    30/7 PL/SQL: Statement ignored
    30/56 PLS-00487: Invalid reference to variable
    'DBA_TAB_COLUMNS%ROWTYPE'
    LINE/COL ERROR
    31/7 PL/SQL: Statement ignored
    31/61 PLS-00487: Invalid reference to variable
    'DBA_TAB_COLUMNS%ROWTYPE'
    37/3 PL/SQL: Statement ignored
    37/33 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed

    Hi Floyd,
    fwellers wrote:
    Frank,
    Does something in the compile errors I sent ( below again ), lead you to believe there is a permission issue ?
    LINE/COL ERROR
    7/3 PL/SQL: Item ignored
    7/31 PLS-00201: identifier 'DBA_TAB_COLUMNS' must be declaredYes. "PLS-00201: identifier 'DBA_TAB_COLUMNS' must be declared" is the error you would get if you tried to say
    TYPE typ_coltab IS TABLE OF dba_tab_columns%ROWTYPE INDEX BY pls_integer;wihtout privileges on dba_tab_columns.
    The line above appears to be line 7 of your code.
    "dba_tab_columns" appears to start in postion 29 (not 31) of that line, but you didn't post your code inside tags, so 2 characters of whitespace could easily have gotten lost in the posting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • T61 windows vista recovery procedure left system without wireless driver and host of other drivers

    My hard-drive went bust (system wouldn't boot). Lenovo support left me with a new hard drive.  I used recovery CDs from lenovo to prime the new hard drive.  The installation left me with a system that has no wireless, display and other drivers. I go to device manager a see about 10 'Other devices' with unknown drivers.
    Is this normal with the lenovo recovery CDs? (That i have to manually hunt all the drivers and install...)
    Thanks for your response.
    -jlogan
    Solved!
    Go to Solution.

    jlogan wrote:
     Do you think reattempting the whole procedure would help?
    Yes, 100%
    Do not touch / interrupt anything, except for placing  the disc requested in the drive, until you are asked to personally enter your name or accept the EULA.
    The dowork box is working, you may see error messages - ignore them. In fact, when you see the dowork DOS box, it's time to go do something else for an hour; coffee, wine, beer, chess.. whatever. When you come back all should be AOK and you can enter the date / time zone, name etc. etc.
    In other words, don't touch, don't panic, let it do it's thing.
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • Empty strings when passing a Java object to a Stored Procedure

    Hi,
    I'm using the interface SQLData to pass Java objects to StoredProcedures. All the object's attributes 'arrive' to the Stored Procedure ok, except the strings, which are empty.
    Here is my Oracle object:
    TYPE OBJ_ASJFF_OBJ1 IS OBJECT (
    ARG1 CHAR(3),
    ARG2 NUMBER(4),
    ARG3 CHAR(4),
    ARG4 NUMBER(7),
    ARG5 NUMBER(13,2),
    ARG6 CHAR(1));
    The nested table of that object:
    TYPE TAB_ASJFF_OBJ1 AS TABLE OF OBJ_ASJFF_OBJ1;
    The procedure declaration:
    PROCEDURE Pup_Instaura_Processo (                              x_crCert IN TAB_ASJFF_OBJ1,
    x_cResult OUT CHAR(4)
    My SQLData implementation:
    public void writeSQL(SQLOutput stream) throws SQLException {
                   stream.writeString(getArg1());     
                   stream.writeInt(getArg2().intValue());
                   stream.writeString(getArg3());          
                   stream.writeLong(getArg4().longValue());     
                   stream.writeBigDecimal(getArg5());
                   stream.writeString(getArg6());
    Can anybody help me?
    Thanks in advance
    Rui Gonçalves

    not exactly what you wanted but ingredients can be found at
    - JPublisher's docuemntation (especially "Type Mapping Support Through PL/SQL Conversion Functions")
    - http://otn.oracle.com/sample_code/tech/java/jsp/Oracle9iJSPSamples.html (Best Hotels PL/SQL Sample )
    - http://otn.oracle.com/tech/xml/xdk_sample/xdksample_093001i.html
    hope this helps
    Kuassi
    I have a Java Stored procedure which takes an instance of a different java object as its parameter.
    I need to do this from a pl/sql package - can anyone point me to a sample etc (looked on the website but don't see one) ?
    Andrew

  • How to enable MSDOS program to be called from Oracle PL/SQL procedure ( Web Service )?

    Hello,
    Dealing with the time demanding procedure where power user is interactively execute sequence
    of steps of procedure:
    1. pl/sql procedure for preparing data in some table
    2. java program that read data from the table and creating input txt file for MSDOS program
    3. MSDOS program is autonomous component that reads input txt file and make
        output txtfile.
        MSDOS program is closed component, can not be modified
    4. java program that insert txtfile into Oracle table.
    5. Steps 1 to 4 are executed in interations driven with select on some table.
    Trying to prepare re-design the procedure  and not sure about which technologies to use ?
    The goal is that whole procedure would be implemented in pl/sql procedure and this way could be executed
    so as from power user from command line as from controlled application on any type of the client.
    So if that MSDOS program would be transformed as Web Service offered on  some MSWin server in the intranet.
    Then PL/SQL procedure would communicate ( call this web service ) and do all the job and at the end
    send status of completion and report through e-mail to the issuer of the procedure?
    Not sure what technologies should I use on Oracle RDBMS server on Linux to communicate with MSWin Web service which is running MSDOS program ?

    > Hi TOM,
    This is not asktom.oracle.com.
    > Can Possible to do in Oacle Pl/Sql...?
    Yes it can be done. Simply consult the applicable manuals that contains all of the details on how to do it. The manuals are:
    - Oracle® Database Application Developer's Guide - Large Objects (refer to Chapter 6 section on Using PL/SQL (DBMS_LOB Package) to Work with LOBs)
    - Oracle® Database PL/SQL Packages and Types Reference (refer to the chapter on DBMS_LOB)

  • Exception occured assuming connection is not valid

    Hi
    I am getting following error while executing a stored procedure.
    Exception occured assuming connection is not valid. This Connection has either timed out or been closed, and it has returned to its pool. You must re-acquire the Connection.
    Unable to close connection: This Connection has either timed out or been closed, and it has returned to its pool. You must re-acquire the Connection.
    Error is not frequent but it comes 1 outof 100 cases
    Can anyone give me a clue why this happens and how to sort out
    regards,
    Kamlesh

    Anywhere in your code that calls Connecton.close(). He means (I believe) that your code may have a condition that causes it to call close() before it's done with the connection.
    How are you acquiring the connection? Is it acquired and released in the same block of code or do you store it somewhere assumming it will be there when you need it?

  • Query against materialized view from stored procedure brings back empty row

    I have a stored procedure that runs a query against a materialized view. When I run the query outside the SP it works just fine. When I change the MV to a table name, the SP works. When I change it back to the MV i get an empty row. Any ideas? The code is below:
    PROCEDURE getAuth     (p_naid        IN  NUMBER,
                             p_scope       IN VARCHAR2,
                             o_xml_data    OUT SYS_REFCURSOR
                             ) IS
      BEGIN
        IF p_scope = 'Approved' THEN
          OPEN o_xml_data FOR
            SELECT naid,
                   p_naid,
                   auth_type,
                   xml_data
            FROM some_mv
            WHERE naid = p_naid;   
          RETURN;
          CLOSE o_xml_data;
    ... the rest of the procedure ...

    does procedure contain EXCEPTION handler?
    if so, then remove, delete & eliminate EXCEPTION handler (at least during testing & debugging)

Maybe you are looking for