The PLSQL since Application Java procedure call

Hi all
I have a PLSQL procedure that I'm calling from a Java Application. When I call this procedure from an SQL Editor, I can pass in the parameters and the procedure executes successfully (which is inserts records in a table).
However, exactly the same procedure when it is called from an application Java does not seem to return the appropriate results, which is to insert rows in a table.
Am I missing?
Is someone can you please advise me if I have to do something else as well for the PLSQL call work via Java.

Thank you
FM

>
I have a PLSQL procedure that I'm calling from a Java Application. When I call this procedure from an SQL Editor, I can pass in the parameters and the procedure executes successfully (which is inserts records in a table).
However, exactly the same procedure when it is called from an application Java does not seem to return the appropriate results, which is to insert rows in a table.
Am I missing?
Is someone can you please advise me if I have to do something else as well for the PLSQL call work via Java.
>
Wrong forum!

You need this post in the JDBC forum
https://forums.Oracle.com/forums/category.jspa?categoryID=288

Either the procedure works correctly, or it does not; Java has NOTHING to do with it (unless it is written in Java).

If this does not work, then fix it.

If it works correctly then any problem you are having is due to your Java code and/or how the code calls the procedure.

Mark this question ANSWER and repost in the JDBC forum. When you post, provide:

1. your 4 digit Oracle version
2. your client OS and version.
3. the full JDK version
4. the name and the version of the jar file OJDBC that you use
5. the Java code that watch/product problem
6. the procedure signature indicating the names and types of the parameters

Tags: Database

Similar Questions

  • Application Twitter open since Application Java

    Hi guys

    Quick question that I couldn't find the answer to a search:

    It is possible to:

    (1) open the Twitter application with a link of my Java application?

    (2) open the Twitter app to a specific profile page, with a link to my Java application?

    See you soon!

    Jim

    (1) you can open any application using applicationmanager.
    (2) No, not that I know

  • How to have an application Java authenticate with the OIF?

    I have a test environment with the IOF installed. Authentication engine is configured to use an OID installation on the same machine. I have a user test created in OID.

    Does anyone know how to connect to the OIF since a Java application (or any other client application) and perform an authentication and have OIF returns a (signed or unsigned) SAML token to the client on a successful authentication?

    Thank you.

    SAML token back means what, your Java application is a service to provide in a browser POST profile? In this case, your application must have an endpoint HTTP service (receiver service) where the browser (via OIF) display the SAML message. It is not specific to the OIF, you must read on SAML and profiles.

  • Is it possible to invoke the third party application every time that the user receives an incoming call

    Hello

    I have some doubts in regard to invoking an application third, whenever there is an incoming call (by observing the change in status of the phone). The third-party application must be called as soon as the user gets the call and must replace the appication of dial phone by default/native.

    Please suggest me some ideas if the above can be implemented or not. If it can be put in place what is possible?

    Also suggest me if there is another way to achieve this.

    Thanks in advance,

    Arun

    Got the solution after enough research:

    In Blackberry the substitution of native applications in is not possible. When there is a call that is a priority interruption that all applications are moved to the bottom and the phone call will be prioritized. When an incoming call is there is not possible to invoke the third about, we can take control as soon as the call is completed.

  • opening a get PDF "the remote procedure call failed."

    With the help of Windows 8 player get the error when you open a PDF file that worked earlier:

    "The remote procedure call failed."

    Hello

    Thanks for posting your query in Microsoft Community and my apologies for the late reply.

    It could have happened because settings in services. Follow these steps to manage the remote procedure call services.

    a. press the Windows key + R and type services.msc and press enter.

    b. in Services, scroll down to the remote procedure call and make sure the status is started and the type of State is automatic.

    c. now ensure that the status of named Remote procedure Call Locator service is set to Manual.

     

    I also suggest sfc/Scan of the computer. He could repair the corrupted system files. The sfc/scannow command. analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions. When the analysis is complete, the System File Checker tool indicates whether integrity violations were found. If integrity violations are detected, the System File Checker tool difficulty integrity violations. See the following article to do.

     

    Use the System File Checker tool to troubleshoot missing or corrupted on Windows Vista or Windows 7 system files

    Let us know the status of the issue. We would be happy to help you.

  • How to do a select on the results of a stored procedure?

    Hello

    I am new to Oracle. I work with SQL Developer.

    I'm doing a simple select on the results of a stored procedure call. I don't know how to do it. Here's what I have so far:

    declare
    type ref_cursor is ref cursor;
    results ref_cursor;
    Start
    MyStoredProcedure (123 results);
    Select * from results;
    end;
    /

    but he said to me:

    Error from the 1 in the command line:
    declare
    type ref_cursor is ref cursor;
    results ref_cursor;
    Start
    GET_TAX_TYPE_BY_TAX_ENTITY_KEY (60670100000000, results);
    Select * from results;
    end;
    Error report:
    ORA-06550: line 6, column 15:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 6, column 1:
    PL/SQL: SQL statement ignored
    06550 00000 - "line %s, column % s:\n%s".
    * Cause: Usually a PL/SQL compilation error.
    * Action:

    Obviously, select * results; is not the right way to do it. But what is?

    Thanks for any advice forthcoming.

    If a SQL cursor is built by a reporting system, a Java application, a c# program, or a PL/SQL call - the database doesn't care, because he doesn't know the difference. A Select SQL cursor created in PL/SQL through the ref cursor interface, won't be faster than the same SQL select in Eclipse. If the SQL source code is the same, the same cursor SQL program will be used by both.

    What give you BIRT is the flexibility of the use of code Server (PL/SQL) to create the slider - this code doing business and technical decisions on how to design side than SQL, Select. Which is a good thing because it summarized the data model and the complexity BIRT server technique.

    So my choice would be to use the procedural interface and return to the reporting system for the rendering of the ref Cursor.

    The question of a slider running via the slider (selection of a cursor), is questionable. Yes, there are a set of specifications that allows to do this kind of thing. But it must be very firmly justified and careful design because it really is an exception. I personally (blame my DBA) would need a justification because it is much more of an exception. I have never seen it put in place in production in more than a decade of DBA'ing, despite the developers try to use such a hack - as it has always been much more powerful and the deployment of alternatives.

    The concept for robust and efficient code for Oracle is: Maximise SQL. Minimize the PL/SQL (or Java / c# / etc.).

    That means when it comes to database power, write an SQL program to do. Stop thinking of SQL as a language of data recovery a single simplistic statement. Think of it as a programming language. Extremely complex problems can be resolved with a single SQL, which requires easy code 100 + lines of PL/SQL, Java, or c#. Write SQL programs. Not SQL one-liners for a grinding program PL/SQL or Java data.

    Why then PL/SQL? It is the best language to manage the creation of SQL, dealing with the process flow, conditional processing, and so on of exception handling. It is less than SQL (such as Java and c#) in the treatment of the data.

  • Error on Java class calling in the Oracle database

    I have a java class indicated below:

    /*

    * To change this license header, choose license headers in the project properties.

    * To change this template file, choose Tools | Templates

    * and open the template in the editor.

    */

    package oracletree1;

    import java.sql.Connection;

    to import java.sql.DriverManager;

    import java.sql.ResultSet;

    import java.sql.SQLException;

    import java.sql.Statement;

    /**

    *

    * @author oracle

    */

    public class TREEUPDATER {}

    int levels;

    int NodeId;

    int ParentId;

    String FatherID;

    int ChildBed_new;

    int ChildBes_new;

    int ChildMande_new;

    int ChildBed_old;

    int ChildBes_old;

    int ChildMande_old;

    int ParentBed;

    int ParentBes;

    int ParentMande;

    Script string;

    String ValueState;

    String TreeState;

    Public TREEUPDATER() throws SQLException {}

    }

    public void update (levels int, int NodeIds, int childBed_old, int childBes_old, int childMande_old) throws SQLException {}

    This. ChildBed_old = childBed_old;

    This. ChildBes_old = childBes_old;

    This. ChildMande_old = childMande_old;

    This. Levels = levels;

    This. NodeId = NodeIds;

    String [] array;

    try {}

    Class.forName ("oracle.jdbc.driver.OracleDriver");

    } catch (ClassNotFoundException e) {}

    System.out.println ("where is your Oracle JDBC Driver?');

    return;

    }

    System.out.println ("Oracle JDBC Driver registered!");

    Fitting out = null;

    try {}

    connection = DriverManager.getConnection)

    "jdbc:oracle:thin:@192.168.1.12:1521:orcl", "tree1"

    'oracle');

    } catch (SQLException e) {}

    System.out.println ("connection failed! Check the console output");

    return;

    }

    If (connection! = null) {}

    Statement stmt = connection.createStatement ();

    Instruction stmt2 = connection.createStatement ();

    stmt.executeUpdate ("insert into test.java_test (id) values (21)" ");

    ResultSet rs = stmt.executeQuery ("SELECT * from value" + "where nodeid =" + NodeId);

    ResultSet rs2 = stmt.executeQuery ("select * from tree where id =" + NodeId);

    While (RS. Next {}

    This. FatherID = rs2.getNString("FatherID");

    This. ChildBed_new = rs2.getInt ("bed");

    This. ChildBes_new = rs2.getInt ("bes");

    This. ChildMande_new = rs2.getInt ("control");

    table = new String [100000];

    Table = FatherID.split ("_");

    for (int i = 0; i < array.length; i ++) {}

    ResultSet rs3 = stmt2.executeQuery ("SELECT * from tree" + "where id =" + array [i]);

    This. ParentId = rs3.getInt ("id");

    This. ParentBed = rs3.getInt ("bed");

    This. ParentBes = rs3.getInt ("bes");

    This. ParentMande = rs3.getInt ("control");

    connection.setAutoCommit (false);

    ParentBed = ChildBed_new - ChildBed_old;

    ParentBes = ChildBes_new - ChildBes_old;

    This. TreeState = rs2.getNString ("state");

    If (TreeState.equalsIgnoreCase ("BED")) {}

    This. ParentMande = ParentBed - ParentBes;

    } else {}

    This. ParentMande = ParentBes - ParentBed;

    }

    This. Script = ("update the bed = bed set value +" + ParentBed + "and bes = bes +" + ParentBes + "and control = control +"+ ParentMande ")

    + ' where id = "+ ParentId);»

    stmt2. ExecuteUpdate ("" + Script);

    }

    }

    }

    }

    }

    I have a main class, which show below:

    /*

    * To change this license header, choose license headers in the project properties.

    * To change this template file, choose Tools | Templates

    * and open the template in the editor.

    */

    package oracletree1;

    import java.sql.SQLException;

    /**

    *

    * @author oracle

    */

    public class OracleTree1 {}

    /**

    @param args command-line arguments

    */

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

    TODO logical application of the code here

    TREEUPDATER t = new TREEUPDATER();

    }

    }

    I was responsible for these classes in oracle database 11 g 2 and I want to use a trigger to execute the updating() method. If I created a procedure like this:

    CREATE OR REPLACE PROCEDURE REPORT4

    (

    LEVELS IN NUMBERS

    NODEID NUMBER

    CHILDBED_OLD NUMBER

    CHILDBES_OLD NUMBER

    CHILDMANDE_OLD NUMBER

    ) AS

    Name of the java LANGUAGE "TREEUPDATER.updating (1,2,3,4,5);

    But when I want to compile and run this procedure, I get this error:

    Error: PL/SQL: analysis of completed Compilation unit

    Error (9,16): PLS-00311: the declaration of 'TREEUPDATER.updating' (1,2,3,4,5) is incomplete or incorrect

    Can any one solve this?

    Thank you

    The correct syntax for PORCEDURE4 is:

    No it's not. I already gave the correct syntax, which apparently ignored you.

    I don't know how can pass these parameters to this method.

    My question is clear?

    It is clear that you are interested in reading the documentation. All the answers are there.

    You're mixing two things:

    (1) creating the procedure (once), and I already told you how to do it

    (2) the procedure call

    For 1)-do you only once :

    CREATE OR REPLACE PROCEDURE REPORT4)

    LEVELS IN NUMBERS

    NODEID NUMBER

    CHILDBED_OLD NUMBER

    CHILDBES_OLD NUMBER

    CHILDMANDE_OLD NUMBER

    )

    AS

    JAVA LANGUAGE

    NAME of ' oracletree1. TREEUPDATER.updating (int, int, int, int, int)';

    For 2)-procedure call:

    ...

    BEGIN

    ... of the code

    -you call proc with your real settings:

    procedure4 (v_levels, v_nodeid, v_childbed_old, v_childbes_old, v_childmande_old);

    ... rest of your code

    END;

    Pay attention to remarks from other institutions.

  • intermittent connection problem: 'the user profile Service service has no logon. The remote procedure call failed and did not execute. »

    Hello, I'm having intermittent problems with logging in my Windows 7 computer.

    Often after reboot due to applications of Windows Update or any simply restart after the holidays, I have the following message on trying to connect:

    "The service user profile Service has no logon. The remote procedure call failed and did not execute. "

    When I click 'OK', the machine disconnects and try to restart.  This can occur 2 to 5 times before _works_ .  But sometimes it happens at all.  And sometimes he _partially_ connects, but my "reminder" and the "Sidebar Gadgets' not loading not correctly and I get a different RPC error - for example, I lived once a message RPC over Skype cannot work because the remote procedure call failed.

    I'm fairly certain that it is different from the frequently reported issue 'profile of corruption', which was experienced by others.  This problem manifests itself as 'the user profile Service does not log. The user profile could not be loaded "and is reported as a blocking problem consistently reproducible which is set by the 'fixing' of the profile.

    However, the issue I feel is clearly related to an RPC problem is intermittent and not consistent - maybe one of my devices is not reset properly?  Where I can look in the logs of Windows, to provide relevant information on this subject?

    Because my computer was still under warranty, I have raised the issue of Dell and they removed the damaged system file (user account) last week.

    I hope that this will finally fix the problem (previously the error message disappear and reappear after a few weeks later.)  I'll give it a few more weeks to be sure.

  • "search query: = services the remote procedure call failed and did not run".

    My computer crashed two days ago and I'm finally home, but whenever I try to open a window of any folder I keep refusing. In particular the main computer folder. One of the error messages I got is the following:

    search query: = services the remote procedure call failed and did not run

    Followed by this one:

    The remote procedure call failed and did not execute.

    I opened the Task Manager and tried to access the services from there, but whenever I do, the Task Manager window freezes.

    How can I fix it, my computer is so slow running and does hardly anything and guard with all freezing orders that I try.

    Hello

    This error generally, if the system is infected with Virus and malware or system files are corrupt.

    Please, try the methods below and check if the problem persists.

    SFC scanner.

    You can read the following Microsoft article to repair corrupted using SFC tool files. Use the System File Checker tool to repair missing or corrupted system files

    Reference: http://support.Microsoft.com/kb/929833/en-us

    If the problem persists, try a run Microsoft Safety Scanner.

    http://definitionupdates.Microsoft.com/download/definitionupdates/safetyscanner/amd64/msert.exe

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Important: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    Do try the suggestions above and let us know the results.

  • Most Windows 8 Apps crashing. "The remote procedure call failed."

    I recently got a new Dell Inspiron 3520 with 8 Windows pre-installed, and I was put in place by installing it with some software that I use regularly as 7 - zip, Visual Studio 2012, Expression Studio 4 and office of 2013. It seems that after having installed with my PC and get the updates of Windows, most of the modern user interface / WinRT apps crash immediately after opening. This frustrated me as long as nothing was no indication of any errors. Then a light bulb hit me to check the Windows Event Viewer Logs and it is there are tons of errors related to...

    wwahost.exe, as the following error message

    The failing application name: wwahost.exe, version: 6.2.9200.16420, time stamp: 0x505a90d6

    Name of the failed module: KERNELBASE.dll, version: 6.2.9200.16451, time stamp: 0 x 50988950

    Exception code: 0 x 00000004

    Offset: 0x00014b32

    ID of the process failed: 0 x 268

    Start time of application vulnerabilities: 0x01cde8b7be9f707b

    The failing application path: C:\Windows\syswow64\wwahost.exe

    Path of the failing module: C:\Windows\SYSTEM32\KERNELBASE.dll

    Report ID: fc6fc011-54aa-11e2-be70-891f1931d402

    Failed package name: Microsoft.SkypeApp_1.3.0.112_x86__kzf8qxf38zg5c

    On a package of faults application ID: App

    - and -

    The modern user interface applications such as the following error

    Activation of the microsoft.windowsphotos_8wekyb3d8bbwe application! Microsoft.WindowsLive.ModernPhotos failed with the error: the remote procedure call failed. See the Microsoft-Windows-TWinUI/operational log for more information.

    To all the various mistakes, it seems that the App those always fail with the error: "the remote procedure call failed." and the exception wwahost.exe code is always 0 x 4. And the Windows store does not work either but as immersive control panel applications and camera app. I would be very grateful for the help thank you in advance for your time.

    Problem solved. I have graphics on this new machine. I've updated the driver for the graphics card and have not had an accident in three days.

  • When you try to create the safety PIN or password photo, get the error "the remote procedure call failed."

    Logon to an account on the Win8 Pro system.  In the PC settings. Your account, try to create a PIN.  You will be asked your password, and when I enter the password, the tracking error.  "The remote procedure call failed."

    In the application event log, we see:

    The failing application name: CredentialUIBroker.exe, version: 6.2.9200.16384, time stamp: 0x5010a22d

    The failed module name: nvwgf2umx.dll, version: 9.18.13.1070, time stamp: 0x50b976f6

    Exception code: 0xc000041d

    Offset: 0 x 0000000000135122

    ID of the process failed: 0 x 1160

    Start time of application vulnerabilities: 0x01cddfd4b4a988ef

    The failing application path: C:\Windows\System32\CredentialUIBroker.exe

    Path of the failing module: C:\Windows\System32\nvwgf2umx.dll

    Report ID: fdf0d095-4bc7-11e2-be7a-e0cb4e8a55c5

    Faulting full name of the package:

    ID of the failed package-parent application:

    I did a search of exhaust gases and am not finding that anything related.

    Action taken:

    ran sfc/scannow and no reported problems.

    Need to stop the application to quit.

    I found the problem for the updated NVidia driver.  Once I disabled the display driver USB 3.0 that acts as a method to connect to a computer USB 3.0 (also tactile) monitor, the driver installed correctly and does not interfere with any of the Windows applications.
    Also, try to remove all the accounts on your system that are not user accounts that some applications will add them without apparent reason.  Applications still work correctly.  It's just less sure there to access your system.

  • Problem with cursor Max for the PLSQL called by OAF Page

    All,

    We developed a custom and Self Service OFA this page page, we call PLSQL package to validate and insert the data into the database tables. It worked well, but when we deployed this form throughout the Organization (meaning more users), we reach the limits of MAX cursor for a session.

    This for allows Manager to update all their coordinated under, so in a session, a Manager may work on more than one employee so reach the limit of MAX cursor.

    Please help on how we can solve this problem, I checked all of the cursors used in the PLSQL package are closed properly.

    Ex PLSQL Call:

    String createRow = null;

    try {}

    OADBTransaction oadbtransaction = (OADBTransaction) pageContext.getApplicationModule (webBean) .getTransaction ();

    java.sql.Connection connection = oadbtransaction.getJdbcConnection ();

    CallableStatement callablestatement = oadbtransaction.createCallableStatement ("start: 1: = xxx_hr_multiple_rates_pkg.is_create_job_row (pc_job_name = >: 2);") end; ", 1);

    callablestatement.setString (2, primaryJob.getText (pageContext));

    callablestatement.registerOutParameter(1,Types.VARCHAR);

    CallableStatement.Execute ();

    createRow = callablestatement.getString (1);

    String [] retVals = am.invokeMethod ("createWFMJob", parameter1) (String []);

    System.out.println("CreateRow:"+CreateRow);

    CallableStatement.Close ();

    }

    catch (Exception e) {}

    e.printStackTrace ();

    pageContext.writeDiagnostics (this, try (), 1);

    }

    Thank you

    A

    Ankit,

    Please attach your PL/SQL code, so that we can have a look that the issue could be in that.

    In addition,

    Why do you call the code inside this test below? What is the link?

    String [] retVals = am.invokeMethod ("createWFMJob", parameter1) (String []);

    Why do you need the code below? Delete this.

    java.sql.Connection connection = oadbtransaction.getJdbcConnection ();

    Move the callablestatement.close ();  outside of try catch.

    See the link, if you need some examples below:

    Advice from the Oracle Johny: OAF: sample code to call the function PL/SQL of OA Framework

    See you soon

    AJ

  • Call the Javascript htmldb_delete_message PL/SQL procedure

    Hi guys,.

    I am a novice when it comes to JavaScript; I've written a PL/SQL procedure that removes multiple records based on a primary key:

    PROCEDURE clear_alterations (p_eco IN VARCHAR2)
    IS
    BEGIN
    DELETE FROM xxmel_apex_eco_alterations
    WHERE the eco = p_eco;
    END clear_alterations;

    I can run it directly from a normal button, but I want the pop htmldb_delete_message dialog box to confirm whether to delete or not. When the user clicks "OK" I want the file to delete and cancel, do nothing.

    I have managed to get the confirmation box appears, but cannot see how to call the PLSQL based on the OK"" button.

    Any help would be great,
    Thank you
    Chris

    Hello

    Set your target URL button

    javascript:confirmDelete('Delete record?','DELETE_REC');
    

    Then create processes that call your procedure and define the process conditional request DELETE_REC

    Kind regards
    Jari

  • find the last time that a procedure has been called

    Hi DBAs,

    How to find when a procedure or function was called again in 10g. Besides, even when a table last access. If this can be done without activating the audit? is there a such views or tips to find such changes?

    Thank you!

    Without verification, it is not possible, generally speaking.

    If a procedure has side effects, you could potentially look through the database to find these side effects. If inserting a new row in a table with a SYSDATE CREATE_DATE, it would be very useful. If you mean a function that does not have the side effects, however, it is not an option. If the function or procedure works for a relatively long period, his performances can be picked up in an AWR / statspack report. But it is unlikely that each execution would be seized, it is unlikely that the history is kept very long, and it is not always trivial to these research reports for the last time that a procedure has been run. And if you have a relatively quick process, it is unlikely that the executions would be ever recorded.

    Statistics at the level of the segment could give you advice on access to the table. But these statistics are cumulative since the last restart. And there are likely background processes that affect all tables at certain interval (i.e. statistics collection), which is probably not the kind of 'access', you are interested.

    Justin

  • The RPD procedure call. Error ORA-14552 as it has a commit.

    Hi all

    I set up the call to the procedure of the RPD functionality.
    But our data base procedure called if engage in it which I think are not allowed and if we get this error.
    We must undertake once that end us the procedure. Please suggest how we can achieve this.

    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 16001] ODBC error state: S1000 code: message 14552: [Oracle] [ODBC] [Ora] ORA-14552: cannot perform a DDL, validation or restoring inside a query or DML ORA-06512: at the 'DWH '. DWH_PA_TC_ACCRUAL_PKG', line 1565 ORA-14551: cannot perform a DML operation inside an application ORA-06512: at the 'DWH '. TRAILING_COST_FUNCTION', line 8. [nQSError: 16011] ODBC error occurred when executing SQLExtendedFetch to retrieve the results of an SQL statement. (HY000)


    Thank you.
    Pankaj

    Yes...

    Even I will post the same thing...
    Use of Pragma_autonamous_transaction before you start your code...

    Ex:
    Create or replace procedure procedure as
    pragma_autonamous_transaction
    Start
    *...*
    *....*
    *....*
    commit;
    end;

    This particular thing is,
    (1) allow to write TCL commands in the triggers.
    (2) used also in procedure nested to make each independent procedure for TCL.

    Try this...

    Thank you & best regards
    Kishore Guggilla

Maybe you are looking for