Calling Oracle BugDB PL/SQL Package Procedures from Application Modules

Hi Experts,
I am using JDev 11g R2.My requirement is as follows:
1.Create a public database link to remote bugDB using the Testing Environment.(Done)
2.Access the data from local database to BugDB using that DB link (Done)
3.Insert/Create a bug using the Create_Bug procedure in the API provided by BugDB(Failed).In the Application ModuleImpl class I have added the following code(Just an Example) to call the API containing a pl/sql procedure which creates a bug in the remote db table.
public void Create_Bug(String Product, String Component, String Subcomponent, String Status) {
CallableStatement st = null ;
try {
StringBuffer str = new StringBuffer();
str.append(" BEGIN ");
str.append(" Bug.Bug_API_V1.Create_Bug@bugtest( ");
str.append(" Product => :1, ");
str.append(" Component => :2, ");
str.append(" BugNo => :3 ");
str.append(" Status => :4 ");
str.append(" ")
str.append(" ); ");
str.append(" END; ");
st =getDBTransaction().createCallableStatement(str.toString(), 1);
st.setString(1, Product);
st.setString(2, Component);
st.setString(3, Subcomponent);
st.setString(4, Status);
st.execute();
} catch (SQLException sqle) {
// TODO: Add catch code
sqle.printStackTrace();
} catch (NumberFormatException nfe) {
// TODO: Add catch code
nfe.printStackTrace();
4.Added a managed bean to invoke this AppModuleDataControl which stores the value in the remote database.(Failed in this part).
Its not showing any errors in the log but the bug is not created either in the remote database.Could anyone guide me where am I going wrong or what is the better way to handle this requirement.Any suggestion for materials,links or tutorials would be highly appreciated.Thanks in advance.
Regards,
Prasanna

Prasanna,
this is a public form_ and the Oracle bug database API is not public! Can you please post internal questions to Oracle internal forums and mailing lists?
thank you
Frank

Similar Messages

  • How to send a Varying Array param to a PL/SQL Stored Procedure from Java

    * I am VERY new to jdbc, and even somewhat new to Java
    * I'm using Java 1.5, Oracle 10g.
    * I need to call the following PL/SQL Stored Procedure from Java:
    procedure setEventStatus
    i_deQueueStatus in deQueueStatus_type
    *deQueueStatus_type is the following (an array of deQueueStatus_OBJ):
    CREATE OR REPLACE TYPE deQueueStatus_OBJ as object
    eventID number (20),
    dequeuestatus varchar2(20)
    CREATE OR REPLACE TYPE deQueueStatus_TYPE IS VARYING ARRAY(500) of deQueueStatus_obj
    *I have created a Java object as follows:
    public class EventQueueDeQueueStatus
         long      eventID;
         String      dequeueStatus;
         EventQueueDeQueueStatus(long eventID, String dequeueStatus)
              this.eventID = eventID;
              this.dequeueStatus = dequeueStatus;
    I have an ArrayList of these.
    I need to pass this list to the Stored Procedure. How do I create a java.sql.Array so I can call CallableStatement.setArray to set the parameter? Or do I use something else? I have tried setObject with both the ArrayList and also with a primitive array, but got "Invalid Column Type" both times.
    Any help would be greatly appreciated. I just got this task today, and I have to make it work by Tuesday :-( !
    Thanks,
    Kathy

    Kathy,
    Search the archives of this forum and the JDBC forum for the terms STRUCT and ARRAY and you can find some sample code on the JDBC How-To Documents page and the JDBC Samples which can both be accessed from this page:
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/index.html
    Good Luck,
    Avi.

  • What's the quickest way to find all calls to some PL/SQL package?

    Here's my situation:
    I have a large application (>100 pages) which has multiple calls to a PL/SQL package procedure X.Y occurring in various processes, conditions, etc on an unknown set of pages. The procedure is being moved to package Z, so I want to replace all instances of X.Y with Z.Y. What is the best way to do this?
    I'm thinking of exporting the application, and doing a manual find and replace of all X.Y with Z.Y, then importing the modified export file. Will this work?
    Alternatively, is there a report available which can be run to show something like this, given an input of X.Y, which shows all pages where X.Y is referenced :
    Page Object
    1 After-submit process abc
    5 item P display condition
    13 validation xyz
    etc
    If not, how easy is it to write such a report from the available apex views?

    Have you looked at the Database Object Dependency report?
    In the Application Builder, select your application.
    In the Tasks list on the right, click on View Application Reports.
    Under the Application menu, click on Database Object Dependencies.
    It will make a list of all database objects used by your application and where they are used.

  • Call Package Procedure from a Servlet?

    Hi,
    Is it possible to call a package procedure from a servlet?
    Art

    Could you be a bit more specific please? I'm not sure where or what to look for.
    Art
    Wrap it with WebServices interface. There is an example article somewhere on otn.oracle.com

  • Calling PL/SQL stored procedure from JSP tag

    Hello,
    I need to call a PL/SQL procedure from a JSP tag , I donot want to use any Bean to call the PL/SQL procedure. How would I call PL/SQL stored procedure from within JSP using JSP tag library, need some code.
    Thank you
    Syed

    need to call a PL/SQL procedure from a JSP tag , I donot want to use any Bean to call the PL/SQL procedure. How would I call PL/SQL stored procedure from within JSP using JSP tag library, need some code.
    regards
    Indira Rani Bandi

  • Calling PL SQL Procedure in Application Module Method

    Hi Experts,
    I want to know how can i call a plsql procedure in Application Module and get the value of the OUT parameter of procedure . if possible please provide some example
    Thanks in advance.

    Have a look at this sample code from one of our projects:
        CallableStatement cstmt = this.getDBTransaction().createCallableStatement(
          "{ call Expand_Message( ?, ?, ? )}", DBTransaction.DEFAULT);
        try
          cstmt.setString(1, arg1 );
          cstmt.setString(2, arg2 );
          cstmt.registerOutParameter(3, Types.VARCHAR);     
          cstmt.execute();
          result = cstmt.getString(3);
        catch (SQLException e) {
          // Process eventual SQL exception here
        finally {
          try {
            cstmt.close(); }
          catch (Exception e) {;}
        }This code is part of a method in a custom ApplicationModuleImpl class (defined for one of the ApplicationModules) and the 3rd parameter of the Expand_Message procedure is an OUT-parameter.
    Dimitar

  • PL/SQL from Application Module instead of Using VO/EO - Violating Standard?

    Hi,
    I have seen product code which Use PL/SQL APIs for committing data (Creation of Records in Table) from Application Module. There is no BC4J (VO/EO) used in this data route.
    Is there any coding standard (document) which says such cases are against Standards.I know there is one Standard saying PL/SQL Based VO is dicouraged in Oracle Apps.
    Thanks
    Joseph

    Vikram,
    Performance depends on the way you are going to make use of pl/sql code. Suppose if you are using pl/sql just for final insert/update with other validations bound to it through a single call, that's fine. But in case you have other multiple calls to pl/sql blocks also for fetching data for display purpose, that's where standard VO's will be more efficient reducing the number of trip for pl/sql calls. So use it only when it is the last way and you need to handle multiple validations with complex data structure.
    As for locking, yes, you might have to take care of locking handling scenario if such a situation happens. But again it depends on what's your business logic and how is your data being processed.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Oracle Multimedia PL/SQL Web Toolkit Sample Application

    Hi,
    I am trying Oracle Multimedia PL/SQL Web Toolkit Sample Application for Oracle database 11g Release 2, on the client components of the readme file, it says that oracle http server must be installed, and http server is available on the companion CD of Oracle Database 10g Release 2 (10.2), actually I'm using Oracle database 11g, is it because of database version that I cannot find http server component to add using universal installer or because during installation I chose install on my laptop and not a server?
    regards,
    Hassane Cabir

    In apex folder (the downloaded one), there is README.txt under owa which contains information about PL/SQL Web Toolkit and how to upgrade.
    This is the content of this file:
    PL/SQL Web Toolkit 10.1.2.0.6
    Application Express 3.0 requires PL/SQL Web Toolkit version 10.1.2.0.6 or greater.
    As a convenience, the PL/SQL Web Toolkit 10.1.2.0.6 is included with Application Express 3.0
    in the apex/owa directory. This version of the PL/SQL Web Toolkit is not a replacement for
    subsequent versions of the PL/SQL Web Toolkit, as delivered with database patch sets or
    Critical Patch Updates.
    If the PL/SQL Web Toolkit version is lower than version 10.1.2.0.6, the included PL/SQL Web
    Toolkit bundled with Application Express 3.0 should be installed prior to the installation of
    Application Express 3.0.
    To determine the PL/SQL Web Toolkit version, connect to the database as the SYS user and
    run the query:
    select owa_util.get_version from dual;
    Installing the PL/SQL Web Toolkit 10.1.2.0.6
    1) Stop all applications using the database
    2) Navigate to the directory apex/owa
    3) Connect via SQL*Plus as the database user SYS
    4) Run the PL/SQL Web Toolkit installation script by issuing: @owainst.sql
    5) Review the output displayed from owainst.sql and ensure no errors were encountered.
    6) Confirm the PL/SQL Web Toolkit version is 10.1.2.0.6 or greater by connecting to the database
    as the SYS user and running the query:
    select owa_util.get_version from dual;
    7) Run the utlrp.sql script from the Oracle Database home to recompile all invalid PL/SQL
    packages now instead of when the packages are accessed for the first time. This step is
    optional but recommended. To run utlrp.sql, issue: @?/rdbms/admin/utlrp.sql
    Saad

  • Call VO method from application module

    Hi Experts.
    In my case I have created VO and inside implementation class custom method: filterResultsByGroup()
    code:
    public class VO_Business_AreaImpl extends ViewObjectImpl implements VO_Business_Area {
    public VO_Business_AreaImpl() {
    public void filterResultsByGroup() {
    System.out.println("hello");
    now... I would like to call filterResultsByGroup() method from Application Module Imp class:
    code:
    public class AppModuleImpl extends ApplicationModuleImpl implements AppModule {
    public AppModuleImpl() {
    public VO_Business_AreaImpl getVO_Business_Area1() {
    return (VO_Business_AreaImpl)findViewObject("VO_Business_Area1");
    public void RunGroupFilter(){
    ViewObjectImpl bussinesArea;
    bussinesArea = this.getVO_Business_Area1();
    ViewCriteria vc = bussinesArea.getViewCriteria("filterResultsByGroup();");
    bussinesArea.applyViewCriteria(vc);
    bussinesArea.executeQuery();
    but it doesn't work. Anyone knows how to call this method?
    Best Regards.

    you code should be like
    VO_Business_AreaImpl bussinesArea;
    bussinesArea = this.getVO_Business_Area1();
    bussinesArea.filterResultsByGroup();

  • [SOLVED]overriding VO's SQL query in an application module

    Hi, can anybody help me in searching examples of everriding some aspects of VO in an application module.
    As i learned we can override, for example the "WHERE" clause of an VO's SQL query in different application modules, using as i supply the addWhereClause method on SomeViewObjImpl object.
    ... but are there any examples of using this possibility? Should i create a custom method in application module java class?
    Thanks in advance. Best Regards.Alex.
    Message was edited by:
    Timin
    Message was edited by:
    Timin

    Hi, can anybody help me in searching examples of everriding some aspects of VO in an application module.
    As i learned we can override, for example the "WHERE" clause of an VO's SQL query in different application modules, using as i supply the addWhereClause method on SomeViewObjImpl object.
    ... but are there any examples of using this possibility? Should i create a custom method in application module java class?
    Thanks in advance. Best Regards.Alex.
    Message was edited by:
    Timin
    Message was edited by:
    Timin

  • Calling packaged procedure from a function

    Hi all,
    I am using Oracle database 10.2.0
    I have a packaged procedure , there are two IN parameters(Varchar, Date) and an OUT parameter(REF CURSOR). The out parameter sends a result set from a query(multiple records of a table). I was asked to create a function which can use this procedure and returns the same resultset. Can u please suggest how to proceed?
    Thanks & Regards,
    Naveen.

    Is it something like this you're after:
    SQL> create or replace function test_f (p_In1 in number, p_In2 in varchar2) return sys_refcursor as
      2    r sys_refcursor;
      3    begin
      4      open r for 'select ' || to_char(p_In1) || ',''' || p_In2 || ''' from dual';
      5      return  r;
      6  end test_f;
      7  /
    Function created.
    SQL> declare
      2    r sys_refcursor;
      3   
      4    l_no number;
      5    l_Greet varchar2(30);
      6  begin
      7    r := test_f(1, 'Hello');
      8   
      9    fetch r into l_no, l_Greet;
    10    if (r%found) then
    11      dbms_output.put_line(l_No || ' ' || l_Greet);
    12    end if;
    13   
    14    close r;
    15   
    16    exception
    17      when others then
    18        dbms_output.put_line('Err ' || sqlerrm);
    19        if (r%isopen) then
    20          close r;
    21        end if;
    22 
    23  end;
    24  /
    1 Hello
    PL/SQL procedure successfully completed.P;
    Edited by: bluefrog on Mar 4, 2010 3:16 PM

  • Call a pl/sql stored procedure from a report link

    Hello everyone:
    I have a report with a link in a column, which takes you to another page and passes values to that page, but also need the link, run a stored procedure before going to the other page.
    In the Forum I found cases similar to this, but none of the examples is clear to me how I do this. It seems that the target of the link should be URL, and also I have to call the stored procedure with a javascript function.
    My questions are:
    - Is this the best method to make what I need?
    - How should be the syntax of the link that takes me to another page and run the "stored procedure"
    - How and where I put the function "javascript" to run the "stored procedure"
    BDD: Oracle 11 g
    Apex version 4.1
    Best regards
    Gerard

    Hi,
    Change the link to call an apex.submit process. (javascript).
    Edit:
    I've set up a basic example.
    Region 1 (just so you can see the value getting set):
    select :P27_HIDDEN item_Value
    from dual
    Region 2:
    select rownum id, dbms_random.string('U', 12) sss
    from dual
    connect by level <= 20
    item attributes for ID:
    Target: URL
    URL: javascript:apex.submit({request:'NAVIGATE', set:{'P27_HIDDEN':#ID#}});
    (P27_HIDDEN is just a hidden item i created)
    http://apex.oracle.com/pls/apex/f?p=54920:27
    Edit2:
    In your case, then you can just have a page process based on conditions request = expression1, expression1: NAVIGATE..... then a page branch to go to the desired page, also with the same conditions
    Edit3:
    Im not sure what examples you are referring to , as you didn't supply any links; but you mention calling the stored procedure from javascript, so would likely involve some AJAX, but imo not necessary.

  • Calling SQL Stored procedure from PLSQL function

    Hi,
    I have created a simple function to return a value that is pulled back from SQL server.
    FUNCTION
    FUNCTION CALC_PASS_FAIL
    i_lidded_sn IN TMP_CHIP_ATTR.LIDDED_SN%TYPE
    RETURN NUMBER
    IS
    tmp_result NUMBER;
    BEGIN
    [email protected](i_lidded_sn,'OadmBarActive',tmp_result);
    RETURN tmp_result;
    END CALC_PASS_FAIL;
    OUTPUT
    --When executed as a procedure, i get the required output:
    DECLARE
    x INT;
    BEGIN
    x:=EQDAS_MISC.CALC_PASS_FAIL('OADM004548');
    dbms_output.put_line(x);
    END;
    0 <------ expected output
    PL/SQL procedure successfully completed.
    When executed as a simple function call, i don't get any output:
    SELECT CALC_PASS_FAIL ('OADM004505') FROM dual;
    Any input will be greately appretiated.
    Thanks,
    Shashi
    PS: I am using the DB Link setup usign DG4MSQL

    just wondering it works as procedure as the function misses double quotes:
    dbo.GetChipPareto
    should be
    "dbo"."GetChipPareto"
    Message was edited by:
    kgronau
    Tested a small example using a function like:
    create or replace function test(
    v_ut1 in varchar2)
    RETURN varchar2
    IS
    v_ut2 varchar2(255);
    BEGIN
    "dbo".OTG_TEST3@dg4msql( v_ut1, v_ut2);
    RETURN v_ut2;
    END test;
    The function calls a SQL Server procedure OTG_TEST3 just returning the passed string and it guarantees data integrity.
    Result using a stored procedure:
    SQL> DECLARE
    2 ret integer;
    3 v_ut1 varchar2(255);
    4 v_ut2 varchar2(255);
    5 BEGIN
    6 v_ut1 :='Hello World';
    7 v_ut2 :='';
    8 "dbo".OTG_TEST3@dg4msql( v_ut1, v_ut2);
    9 dbms_output.put_line('Input value: ' ||v_ut1||' - Output value: '
    ||v_ut2);
    10 END;
    11
    12 /
    Input value: Hello World - Output value: Hello World
    And calling now the function:
    select test('Hello') from dual;
    returns Hello

  • Getting error calling a package/procedure from DB

    I'm on 11.1.1.6 and I'm trying to execute a procedure in a package in the DB my ADF application is connected to.  I get the following error  "Could not find saved view state for token".  If I comment out the execution of the method that is calling the procedure the error goes away.  The error shows up under the log for the application on the EM console.  The procedure does not get executed.  Can anyone tell me what it could be?  I am using the tool Oracle provided to gain access to the EBS database without using the apps password.  I wonder if that may be causing the issue?  Can it be related to a security or grant issue of some kind?  The package procedure is under the apps schema.

    Hi,
    I don't think that on this forum we know enough about EBS to be helpful with security privileges. But if you read this here ADF &amp;amp; Weblogic How To: TROUBLESHOOTING: Could not find saved view state for token ...
    then it seems that there are some sort of access problem
    Frank

  • Calling User written pl/sql Packages from forms 9ias

    I want to call Pl/sql package (my own) from forms 9ias.
    Actaully i am upgrading my application forms 6i to 9ias forms.
    Please suggest me a solution.

    Same way as 6i. What is the problem ?

Maybe you are looking for

  • How to share iTunes account?

    Hi, i'm sure i'm not the only one thats asked this question so hopefully theres an answer out there somewhere already? I'm a father of 5 (yes thats 5 children!) and we are an 'Apple Family'. Between us we have 4 Macbook Pros, 1 iPad, 3 iPad Minis and

  • File Sender Adapter Skip first line in file

    Hello to all, I'm trying to read a file (nfs) using the file adapter. The szenario works fine, but I need to skip the first line in the txt file (header line) I tried parameter documentSkipFirstRows, without success. Any ideas? Regards Christian

  • White edges on PDF page

    Hi there. I am currently producing a newsletter and have found that, once converted into a pdf file, very fine white edges are becoming visible on the document. I have laid down on the page a few images and text boxes that bleed off the sides of the

  • Free photo editing software for Macs & PCs?

    Hi folks! I am looking for a free photo editing software to use for an upcoming class. I have a MacBook at home, but I will be teaching in a classroom equipped with PCs. I was hoping to find a free software that students could practice on in class an

  • Task is missing when import

    Hi,                    when i try to transport Request number both ChangeRequest and Task are present but when after i imported the Task is missing in destination only CR is present .help me solve this problem. thanks, pugazhraj.