Calling stored procedure - re-edited NullPointerException

Hi all

I am re-editing that my first attempt was quite low.

I want to create a Java application that communicates with an Oracle XE database edition to:

Class.forName ("oracle.jdbc.driver.OracleDriver");
JOptionPane.showMessageDialog (null, "Driver loaded");
Connection con = DriverManager.getConnection ("jdbc:oracle:thin:@//localhost:1521/xe", "SYSTEM", "root");
JOptionPane.showMessageDialog (null, "database connected");

This all works fine and I can perform queries and transactional instructions within the instance of java.

However, I can't call stored procedures that I will receive a null pointer exception. The stored procedure, I try to call returns values however I know it works as I can run it in SQL Developer. The code below is the statement that calls the stored procedure, alll the sources I looked at it's correct, I also tried, cs.executeUpdate and Resultset rs when you try to call the java statement.

public void thread_actionsperformed (ActionEvent c) //generates son
{
Try
{
CallableStatement cs = con.prepareCall ("{call PROCEDURE2}"); Calls a stored procedure that would generate threaded emails
CS. Execute();
JOptionPane.showMessageDialog (null, "Algorithm Threading successfully Executed");
}
catch (SQLException ex)
{
ex.printStackTrace ();
JOptionPane.showMessageDialog (null, "Threading algorithm Executed without success"); Error response
}
catch (NullPointerException ex)
{
ex.printStackTrace ();
JOptionPane.showMessageDialog (null, "Threading algorithm Executed without success"); Error response
}
}

The Java application cannot 'see' the sp? Or is it something to do with privileges? I was puzzled by this during some time now, any help would be greatly appreciated.

java.lang.NullPointerException
at ETA_Final.thread_actionPerformed (ETA_Final.java:332)
to ETA_Final$ 5.actionPerformed(ETA_Final.java:141)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
in javax.swing.plaf.basic.BasicMenuItemUI$ Handler.mouseReleased (BasicMenuItemUI.java:1264)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Thank you and best regards,

K

Published by: Outbound86 on April 28, 2010 13:58

Hi Kev,

I expected this - so is it possible that your dumb object is null when you are in the ActionListener who manages the procedures?
How will you spend until you use it (line 332), are you using Threads?

Thnaks,
Ivaylo

Tags: Java

Similar Questions

  • NullPointerException when calling stored procedure

    I have the stored procedure

    create or replace PROCEDURE GREETING_PROC

    (

    TEXT_PARAM IN VARCHAR2

    MSG_TEXT VARCHAR2 OUT

    ) AS

    BEGIN

    MSG_TEXT: = "Hello" | TEXT_PARAM;

    END;

    My stored procedure call method

    public class UserBean {}

    public UserBean() {}

    Super();

    }

    Public Shared Sub main (String [] args) {}

    UserBean userBean = new UserBean();

    userBean.callP ();

    userBean.callStoreProcedure ();

    }

    public void callStoreProcedure() {}

    CallableStatement st = null;

    SysUser SysUserEOImpl = new SysUserEOImpl();

    try {}

    String sql = "BEGIN GREETING_PROC (: TEXT_PARAM,: MSG_TEXT); END; « ;

    St = sysUser.getDBTransaction () .createCallableStatement (sql, sysUser.getDBTransaction (). DEFAULT VALUE);

    st.setObject ("TEXT_PARAM", "Scoot");

    st.registerOutParameter ("MSG_TEXT", Types.VARCHAR);

    St.Execute ();

    System.out.println ((String) St.GetObject ("MSG_TEXT"));

    } catch (SQLException e) {}

    throw new Aexception.getLocalizedMessage (e);

    }

    }

    then I got an exception:

    Exception in thread "main" java.lang.NullPointerException

    at cic.opsi.model.bean.UserBean.callStoreProcedure(UserBean.java:35)

    at cic.opsi.model.bean.UserBean.main(UserBean.java:27)

    Hello

    What statemet is UserBean.java:35)?

    Second, create a new SysUserEOImpl()!

    If you want to call stored proc, put the java code calling stored proc in ViewRowImpl/ViewObjectImpl/ApplicationModuleImpl and export this code in the customer interface. Then put this method in the pageDef as a call him as an OperationBinding

    Zeeshan Baig blog: the PL/SQL procedure call and function in the Oracle ADF application

    Extending the functionality of the components Business

    ADF/OFA for Oracle Techies: ADF call stored procedure with Out parameters

    Latest Oracle technology: call Store procedures for Oracle ADF Application

  • Call stored procedures in the object module and application of entity

    Hello

    I've implemented a helper methods that contains the EntiyImpl base class to call stored procedures.

    Now, I need to call procedures stored from the module of the application.

    Apart from the creation of a module base class asks and the programme of assistance of duplication of code in the method is possible
    to share methods of assistance for calling stored procedures between the entity impl and application module impl?


    Concerning
    Paul

    Support code depends on characteristics of an object instance given entity beyond its database transaction?

    If so, I'm not sure I see how it could be used with a class of application module.

    Otherwise, here's what you do:

    Step 1:

    Set up the database transaction - you can even choose to. So instead of

    {myHelperMethod (Object someParam) protected
    DBTransaction trans = getDBTransaction();
    ...
    }

    This is for change

    protected myHelperMethod (DBTransaction trans, someParam Object) {}
    ...
    }

    Step 2: make the method public and static - once you set DBTransaction, you should be able to do.

    public static myHelperMethod (DBTransaction trans, someParam Object) {}
    ...
    }

    Step 3: Remove your EntityImpl base class method in a utility class:

    Public MustInherit class PlSqlUtils {}
    private PlSqlUtils() {}

    public static myHelperMethod (DBTransaction trans, someParam Object) {}
    ...
    }
    }

    When you call the method of application module, object entity or class of same view object, call

    PlSqlUtils.myHelperMethod (getDBTransaction (), paramValue);

    Unlike Transaction.executeCommand (), allows you to provide features like the setting procedure of parameter values, recovery of the values of the parameters, etc.

    Hope this helps,
    Avrom

  • Calling stored procedures with parameters with the database connectivity Toolkit

    Hi all

    I'm new to the forum and struggling to find a solution to a particular problem I have in this respect, using the LabVIEW Database Connectivity Toolkit on a project, I am currently working on my work.  I have a database in which I tables and stored procedures with parameters.  Some of these stored procedures have input, output and return parameters.

    I tried to follow this example, but to no avail: http://digital.ni.com/public.nsf/allkb/07FD130746083E0686257300006326C4?OpenDocument

    Such a stored procedure I am working on the implementation is named "dbo.getAllowablePNs", running "SELECT * from DeviceType" (DeviceType is the table).  In this case, it requires no input parameter, it has an output parameter that generates the table [cluster] and has a return parameter that returns an integer value (status code for execution) to show if an error occurred.  The DeviceType table has 3 columns; ID (PK, int not null), PN (nvarchar ((15), null) and NumMACAddresses (int, null).)  I have surpassed many examples and I talk to the support OR try to implement this and similar procedures stored in LabVIEW but have not been successful.  I am able to connect to the database with the VI of open connection without error, but spin in some confusion as a result of this step.  I then try to use the VI of parameter query create to call the stored procedure and set the parameters.  I guess I would then use the Set parameter value for each parameter that is connected to the entry of parameters on the previous query with parameters VI VI?  I am also having some confusion during and after these steps as well.  I would greatly appreciate advice or suggestions that anyone could have in this situation because I am not a SQL expert.  Also, I would be happy to provide more information that might be useful.

    Kind regards

    Jon

    Here's what I use to do this.  I think I had to change him create parameterized query VI for him to work.  There is a post on the forum about this somewhere.

  • Calling stored procedure with an input of DATE parameter

    Hello. A question about the Date input parameters when you call a stored procedure.

    I have a procedure that takes a DATE as input parameter. I would DATE this value to include a time element.

    My Application Module method takes an input as a java.util.Date (myParamDate) parameter - that will preserve a time element (?).

    However when I create the CallableStatement, I am trying to set the parameter using setDate like this (for the param 5):
                st = getDBTransaction().createCallableStatement("begin cs_my_pck.request_values(?,?,?,?,?,?,?,?); end;", 0);            
                Connection myConn = st.getConnection();
                ArrayDescriptor myArrDesc  =  ArrayDescriptor.createDescriptor("CS_FIELD_TABT", myConn);
                Array sqlParamNameArray = new oracle.sql.ARRAY(myArrDesc, myConn, paramNames.toArray());
                Array sqlParamValueArray = new oracle.sql.ARRAY(myArrDesc, myConn, paramValues.toArray());
                Array sqlFilterNameArray = new oracle.sql.ARRAY(myArrDesc,myConn,filterNames.toArray());
                    
                st.setString(1, repType);
                st.setObject(2, sqlParamNameArray);
                st.setObject(3,sqlParamValueArray);
                st.setObject(4,sqlFilterNameArray);
    
                java.sql.Date myRepDate = new java.sql.Date(myParamDate.getTime());
    
                st.setDate(5,myRepDate);
                
                System.out.println("Report Date = " + myRepDate.toString());
                st.setString(6,repUser);
                st.setString(7,repAttach);
                // set out param
                st.registerOutParameter(8, Types.NUMERIC);
                st.execute();
    I understand java.sql.Date does NOT include a time element. But setDate() only accepts a java.sql.Date so my parameter of the procedure ends with a zero time element.

    How to call this procedure keeping the time element?

    Thank you.

    It includes the time element, if you want more precision with time stamp.

    http://docs.Oracle.com/javase/6/docs/API/Java/SQL/date.html

  • Call stored procedure in the URL

    Hi all

    How to call a stored procedure 4 Apex in the URL. The error is less.

    The requested URL/apex/EXAMPLE. TESTPROCEDURE was not found on this server.

    Thank you.

    802263 wrote:
    Hi all

    How to call a stored procedure 4 Apex in the URL. The error is less.

    The requested URL/apex/EXAMPLE. TESTPROCEDURE was not found on this server.

    Thank you.

    Should work on the assumption that:

    1. the scheme of analysis can 'see' the object such as defined by synonyms, etc.
    2. the schema of analysis has execute privs on the object.

  • How do we call stored procedure in owb?

    Hello

    I have 20 mapping and I stored that I need to call after 20 mapping completed successfully.

    I want to run my stored as 21st mapping procedure. I should not call my stored procedure in the 20th mapping as the mapping process.

    How to achieve this?

    What I did was, I created another dummy mapping and just create simple mapping (copy couple of records from a fictitious table to another table. dummy so I called the post, process mapping procedure. Is there another way, we can achieve this task?

    In informatica, we have retained the transformation of the procedure. Is there something equivalent in OWB?

    Any help is appreciated!

    Two options, you can: -.

    1. create in OWB.

    Under Oracle-> your name of the Module-> Transformation
    -> Function
    -> Procedure
    -> Package
    2. right click-> new (it will sail with series of screen)

    2 2 creer create database, and then import into OWB.

    Once you have created and then form be it you can drag directly and drp then to the workflow process as done with mapping.

    See you soon
    Katia

    Published by: Nawneet_Aswal on July 19, 2010 01:53

  • java.sql.SQLException: ORA-06550 and ORA-00900 call stored procedures

    Hi all

    I have 2 a stored procedures that I want to call from my Session bean. One of them takes a few settings, but not the other. When I call the procedures, I get the following errors described below. I tested the two stored procedures in sql plus and sqldveleoper and they work well. The funniest, it is, I have another stored procedure that I can call successfully from the same bean in session with no problems, so I'm a bit confused as to why his play now.

    I use stand-alone 10.1.3.4 OC4J and Oracle 10 g Db 10.2.0.4 and platform DB that I use is Oracle10gPlatform and Eclipselink as my JPA provider. I have also tried against toplink (not toplink essentials) and still no joy

    Here is the error I get when I try and call the procedure which takes the parameters of the session bean
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'HASHDATA'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    
    Error Code: 6550
    Call: BEGIN HashData(input=>?, hashedValue=>?, hashed=>?); END;
         bind => [password1, => hashedValue, => hashed]
    Query: DataReadQuery()
    Here are my stored procedure that take parameters
    create or replace procedure hashData(input IN VARCHAR2, hashedValue OUT BLOB, hashed OUT BOOLEAN)  as  
    
    inputRaw RAW(2000);
    --hashed BOOLEAN := false;
    begin 
    
    dbms_output.put_line('the data to be hashed is '||input);
    
    dbms_output.put_line('converting input to raw ...');
    inputRaw := utl_i18n.string_to_raw(input,'AL32UTF8');
    
    dbms_output.put_line('Hashing Data ...');
    hashedValue := DBMS_CRYPTO.Hash (src=>inputRaw,typ=>DBMS_CRYPTO.HASH_SH1);
    
    dbms_output.put_line('hash is '||UTL_I18N.raw_to_char(dbms_lob.substr(hashedValue, 4000,1)));
    
    if (hashedValue  is not null) then 
     
    
     hashed :=true;
      dbms_output.put_line('hashedValue IS NOT  null');
     else
     hashed := false;
      dbms_output.put_line('hashedValue IS null');
     end if;
    
    end;
    Here is my code in the session bean to call the procedure that takes as parameters (Hashdata)

    public UserBean() {
              // TODO Auto-generated constructor stub
    
              sessMan = SessionManager.getManager();
              session = sessMan.getSession("Session", Thread.currentThread()
                        .getContextClassLoader());
    
         }
    
    public Serializable hashData(String input){
    
              logger.debug("Hashing Data ... "); 
              hashedValue= null; 
              boolean hashed=false; 
         
              StoredProcedureCall call = new StoredProcedureCall();
    
              ValueReadQuery query = new ValueReadQuery();
              call.setProcedureName("HashData");
              call.addNamedArgumentValue("input", input);
              call.addNamedOutputArgument("hashedValue", "hashedValue", java.sql.Blob.class);
              call.addNamedOutputArgument("hashed", "hashed", java.lang.Integer.class);
                        
              query.addArgument("input");
              
              query.setCall(call);
              
              session.executeQuery(query);
               
              if ((Boolean)hashed){
                   logger.debug("The data has been hashed and the hash value is: "+hashedValue);
              }
              
              else{
                   logger.debug("The data has could not be hashed");
                   hashedValue=null;
              }
              
              return (Serializable)hashedValue;
              }
    When I call the other takes no parameters, I get the following error.
    Internal Exception: java.sql.SQLException: ORA-00900: invalid SQL statement
    
    Error Code: 900
    Call: BEGIN testJPAProc(); END;
    Query: DataReadQuery()
    Here is the procedure which takes no parameters
    create or replace procedure testJPAProc is 
     
     begin
     dbms_output.put_line('testJPAProc called');
     end;
    Heres is the code to call procedures that take no parameters
                                    StoredProcedureCall call = new StoredProcedureCall();
      
              ValueReadQuery query = new ValueReadQuery();
              
              call.setProcedureName("testJPAProc");
              query.setCall(call);
              
              session.executeQuery(query);
    You guys can tell me where I'm wrong if I do something wrong. Why make these mistakes? because as far as I can tell the code (java and pl/sql) are both correct unless there is something I missed. It's kinda funny because I have another stored procedure I can call successfully.


    Thank you

    The first question is that the Boolean in Oracle is not a supported JDBC type, but a PLSQL type.
    Change to an INTEGER is probably the best, you can also use the PLSQLStoredProcedureCall class to access.

    The second problem is perhaps that the stored procedure is not valid, make sure that it compiled correctly. It can also be the type of your query, you must use a DataModifyQuery, not a read request that it returns nothing.
    If still no luck, try to call directly through JDBC, it works?

    ---
    James: http://www.eclipselink.org: http://en.wikibooks.org/wiki/Java_Persistence

  • MySQL temporary tables or call Stored procedures in CS4

    I need to filter the results by username before making a LEFT JOIN and including lines or IS NULL. The SQL works from the mysqli client, either by creating a temporary table using the "create a temporary table temp_appts select * from...» "Or by creating a stored procedure that contains the statement even 'create temporary table' and then running my LEFT JOIN statement against the temporary table.

    I've tried both in CS4, it accepts the code 'code' without errors but the page loads in a browser as a white or a 500 error in Internet Explorer. From my experience, this is caused by the exit before arriving to the html header.

    Is it possible to do either in CS4?  Here is the code I use.

    $varU_temp_appts = "-1";
    If (isset (<? php $_SESSION ['MM_Username'])) {}
    $varU_temp_appts = $_SESSION ['MM_Username"];
    }

    @mysql_select_db ($database_ess, $ess);
    $query_temp_appts = sprintf ("' CREATE TEMPORARY TABLE SELECT temp_appts * of appts WHERE username = %s", /GetSQLValueString($varU_temp_appts,"text") ");
    $temp_appts = mysql_query ($query_temp_appts, $ess) or die (mysql_error ());
    $row_temp_appts = mysql_fetch_assoc ($temp_appts);
    $totalRows_temp_appts = mysql_num_rows ($temp_appts);


    @mysql_select_db ($database_ess, $ess);
    $query_todays_appts = "SELECT * from appt_tm LEFT JOIN (temp_appts) ON appt_tm.appt_time = temp_appts.appt_hr WHERE (appt_date = CURDATE () OR appt_date IS NULL)";
    $todays_appts = mysql_query ($query_todays_appts, $ess) or die (mysql_error ());
    $row_todays_appts = mysql_fetch_assoc ($todays_appts);
    $totalRows_todays_appts = mysql_num_rows ($todays_appts);

    Any help is appreciated!

    Why not just use a derived table, rather than creating a temporary table?

  • Call stored procedures and using its output parameters in a report

    Hello

    I have a procedure defined in a package on the database. This procedure returns a number of output parameters. How to call this procedure and use the output parameters in my report?

    Thank you, Mark

    Depends on the level at which the procedure should be called. If its at the State level, call the form in the trigger-REPORT-BEFORE (or AFTER-PARAMFORM) and store the off-values space reserved columns. These you can use anywhere in your report.

  • Calling stored procedures

    I have a package with the procedures below.


    I have 12 instructions insert (named procedures P1 to P12) which insert in the TABLE A and TABLE B, each insert another condition where.
    I created P13 procedure in each package so that every month instead of every procedure P1 - P12 I call all the procedures in P13 and P14.
    Are there disadvantages to do? Any suggestions?

    package A

    P1
    (
    INSERT statement... INSERT into TABLE A
    )

    P2
    (
    INSERT statement... INSERT into TABLE A
    )

    P3
    (
    INSERT statement... INSERT into TABLE A
    )

    P4
    (
    INSERT statement... INSERT into TABLE A
    )

    P5
    (
    INSERT statement... INSERT into TABLE A
    )

    P6
    (
    INSERT statement... INSERT into TABLE A
    )

    P7
    (
    INSERT statement... INSERT into TABLE A
    )

    P8
    (
    INSERT statement... INSERT into TABLE A
    )

    P10
    (
    INSERT statement... INSERT into TABLE A
    )

    P11
    (
    INSERT statement... INSERT into TABLE b.
    )


    P12
    (
    INSERT statement... INSERT into TABLE b.
    )

    P13
    (
    P1
    P2
    P3
    P4
    P5
    P6
    P7
    P8
    P9
    P10
    )


    P14
    (
    P11
    P12
    )

    Published by: user7988 on March 17, 2010 06:49

    Are queries for table a similar inserts? Is the using the same tables and joins, but the different criteria? If yes then that Frank pointed out you should look combining queries. You can combine the criteria and use instructions BOX when it is required.

    You may also be able to combine a and b inserts using a multi-tableau insert.

    Not sure what look like queries, but here is a small example of how you might be able to combine the table an inserts;

    create table source_data as (
       select 'CA' state, 'F' payment from dual union all
       select 'CT', 'T' from dual union all
       select 'XX', 'F' from dual);
    
    Table created
    insert into a
      select my_seq.nextval id,
             state,
             case
                when state = 'CA'
                     and payment = 'F' then
                 'REPORT1'
                when state = 'CT' then
                 'REPORT9'
                else
                 null
              end report_num
      from source_data
      where state in ('CA', 'CT');
    
    2 rows inserted
    select * from a;
    
            ID STATE REPORT_NUM
    ---------- ----- ----------
             1 CA    REPORT1
             2 CT    REPORT9
    
  • How to call stored procedures in the OPS

    Hi all

    I n PageUser enter the date and the code, I need to pass those 2 values to my back-end procedure

    name of procedure xxx_opp_rnv (id varchar2, varchar2 valid);

    I am writing this callable statement in am

    ' public void xxcrm_qtn_revison (String opid, String qtnvalidate) {}
    System.out.println ("values" + opid + "" + qtnvalidate);
    String x = "to_date ('" + qtnvalidate + "',' HH24:MI:SS MON-DD-YYYY')"; "
    System.out.println ("The value of x is..." + x);
    try {}
    System.out.println ("' with in the callable statement" ");
    CallableStatement cs is this.getOADBTransaction ().
    getJdbcConnection () .prepareCall ("{call xxcrm_revison_qtn(?,?)}");
    cs.setString(1,opid);
    cs.setString(2,x);
    DSI Execute();
    DSI Close();
    }
    catch (SQLException e) {}
    System.out.println ("exception is" + e);
    }

    }


    the procedure is not executed

    in my creation valid page is that the datatype element is of type dateTime

    I need to pass the id as a string, and valid as Datetime data types to my callable statement

    How is - this posible


    Concerning
    Anthony

    Hello

    Use this code... pass the qtnvalidate as it is...

    donot use String x = "to_date ('" qtnvalidate "", "DD-MON-YYYY HH24:MI:SS'" ")"; "

    ' public void xxcrm_qtn_revison (String opid, String qtnvalidate)

    {
    try {}

    System.out.println ("' with in the callable statement" ");
    CallableStatement cs is this.getOADBTransaction ().
    getJdbcConnection () .prepareCall ("{call xxcrm_revison_qtn(?,?)}");
    cs.setString(1,opid);
    cs.setString(2,qtnvalidate);
    DSI Execute();
    DSI Close();
    }
    catch (SQLException e) {}
    System.out.println ("exception is" + e);
    }

    }

    Now, in the procedure, you can convert the string to a date time

    name of procedure xxx_opp_rnv (id varchar2, varchar2 valid);

    validdate: = to_date (valid, "HH24:MI:SS MON-DD-YYYY)";
    OPID: = to_number (id);

    Try first to print in jdeveloper, what is the format of date time and therefore change the format

    Thank you
    Gerard

    Published by: Gauravv on September 10, 2009 04:16

  • How the procedure call stored procedure Store and no need to wait for the answer?

    There are two store procedure, sp1 and sp2, sp1 include sp2.


    If I have that sp1call but sp1 sp2 don't neet to wait the response of sp2, sp1 sp2 simply start and countinue to run the following command.

    How do I do?

    submit a job (DBMS_JOB) which sp2 excecutes in an autonomous transaction (which starts the task immediately)

  • Error when calling stored procedure of backing bean

    I use Jdeveloper 11.1.1.6 and tries to use the following URL to execute a SP of a bean of support: http://ramannanda.blogspot.com/2011/11/optimized-update-insert-adf.html

    The reason why I'm interested in this is currently I coded my support bean to perform insertions and deletions by the use of my objects in view. I am the scene up to a combined 5-10 K, insertions and deletions and performance is rather slow. If there is a way to adjust the display objects as well as the validation is much faster, it is the preferred method. If this cannot be done then I would understand the approach identified in the URL.

    I've highlighted a section of code below fails when you use the approach of the URL. It-error with the following exception: javax.el.ELException: oracle.jbo.JboException: java.sql.SQLException: internal error: incompatible catalog view


    You have thoughts about what could cause this exception.





    create or replace
    TYP_TEST_R type is object
    (
    Test_Id Number (5.0).
    Test_Num Number (7.0)
    );


    create or replace
    type TYP_TEST_TB as the TYP_TEST_R table;



    {} private void myMethod (MyTableVORowImpl pCurrentRow)
    int i = 0;
    DCIteratorBinding = lDciter
    (DCIteratorBinding) getBindings () .get ("MyTable1Iterator");
    MyAppModuleAMImpl = lMyAppModuleAMImpl
    (MyAppModuleAMImpl) lDciter.getViewObject () .getApplicationModule ();
    Connection = lConnection
    lMyAppModuleAMImpl.getDBTransaction () .createStatement (1) .getConnection ();
    StructDescriptor lTblRecordStructType =
    StructDescriptor.createDescriptor ("DBADMIN. TYP_TEST_R,"
    lConnection);

    ... < additional logic here >...


    Object [] lArray = Object [lSortedDifferences.size (new)];
    all in (...) {
    Number lNumber =...
    Number of lDifferentStore = (Number) lDifferentIterator.next ();


    STRUCT lTempStruct =+ _
    new STRUCT (lTblRecordStructType, lConnection,+ _)
    * new Object() {pCurrentRow.getTestId (), * + _}
    ({ lDifferentStore}) ; +_
    lArray [i] = lTempStruct;
    i = i + 1;
    }

    create table structure descriptor
    ArrayDescriptor = lTableDesc
    ArrayDescriptor.createDescriptor ("DBADMIN. TYP_TEST_TB,"
    lConnection);
    create a type of table with the structure definition
    LTableArray = ARRAY
    New ARRAY (lTableDesc, lConnection, lArray);
    String lCallableProcedureStatement =
    "start DBADMIN. SP_TEST(?,?); end; « ;
    OracleCallableStatement lOracleCallableStatement = null;
    lOracleCallableStatement =
    (OracleCallableStatement) lMyAppModuleAMImpl.getDBTransaction (.createCallableStatement (lCallableProcedureStatement),
    (0);
    lOracleCallableStatement.setARRAY (1, lTableArray);
    lOracleCallableStatement.setString (2,
    (String) ADFUtil.evaluateEL("#{sessionScope['UserName']}"));
    lOracleCallableStatement.executeUpdate ();
    }

    Hello

    the user that executes the statement has the correct grant to the user-defined type?

    concerning
    Peter

  • Problems calling a stored procedure with DG4IFMX

    Hi guys,.

    I try to call stored procedures of database Informix, which is connected by an Oracle for Informix database gateway.

    I ran select, update, delete correctly but when I try to execute a stored procedure, that nothing is happening.

    for example:
    When I run
    call branko"@link_informix (1) «»

    It returns that it is performed successfully, without error, but as you can see below no entry is entered in the branko_test table

    to informix:

    drop the branko procedure;
    Create procedure "informix".branko (integer _vlez)
    returning a Boolean;
    If _vlez = 1 then
    insert into branko_test values ('uspesen test', '1');
    on the other
    insert into branko_test values ('test 2 ', 2' uspesen);

    end if;
    end of procedure;

    the procedure runs ok when called to informix.

    Thanks for any help

    P.S I even tried running:

    declare
    Whole RET;
    Start
    RET: = DBMS_HS_PASSTHROUGH. EXECUTE_IMMEDIATE@link_informix (' branko procedure (2)');
    end;

    but the same thing happens, no entry in the branko_test table.

    Find the root cause:
    When you are using dbaccess to call the original procedure it displays on the screen (expression)
    => remove the return value as it is not managed

    -> looks like not supported return Boolean value. Changes to the procedure of

    drop the branko procedure;
    Create procedure "informix".branko (integer _vlez)

    If _vlez = 1 then
    insert into branko_test values ('uspesen test', '1');
    on the other
    insert into branko_test values ('test 2 ', 2' uspesen);

    end if;
    end of procedure;

    allows me to execute the procedure using passthrough
    DECLARE
    result VARCHAR2 (50);
    BEGIN
    result: = DBMS_HS_PASSTHROUGH. EXECUTE_IMMEDIATE@dg4ifmx (' run the informix.branko procedure (1)');
    END;
    /

    Edited by: kgronau may 6, 2011 07:31

Maybe you are looking for

  • Why when I download a zip file it opens in the elements of the picture?

    I do not know why but when I download a zip file it downloads a zip file, but when I click to open a window appears indicating that windows cannot open this file

  • SOLUTION - how to solve the problem of error TOS0002

    Hello I had a problem with tos0002 error starting after the persistence of image on a new drive.I solved by copying the BOOTSECT. BAK from the disk of Vista on the C: drive. I just copied and kept one you can with Vista, but I guess that's maybe simi

  • Windows update - you want to delete the old OS

    I installed 2 BONES in Notepad. For this I have patitioned hard drive. Now I want to remove Vista and want to keep windows 7 continues, I tried to upgrade windows 7 on windows vista. But we don't don't remove Windows vista. Any suggestions welcome...

  • disconnecting from the ad hoc wireless network

    I have problems with the ad-hoc wireless network connection. Internet connection is not necessary, I want to just connect two laptops vista to play Civilization4. We had two laptops connected properly for a few days and enjoyed the game. But now the

  • Need picture of the power connector for 1010EA HDX18

    Hi, I hope someone can help here.  I received a 1010EA HDX18 does not work - no power, no boot, nothing.  External review, I think that taking on the right rear of the body seems very strange.  Inside the cylinder are exposed pins and apartments that