Stored procedure Issue  in VC - Urgent

Hi all,
I am trying to insert a new record in a SQL Server database, using a stored procedure.
I am inserting this new record from a popup iview, in which the data service is configured.
But when I try to insert a new record, I am getting an error "No value was assigned to parameter(@ParentId)", where ParentId is the first parameter in my stored procedure.
I am using flex 2.0 runtime from EP 7.0 SP13.
Can anyone help me out?
Thanks and Best Regards
Shobin

Hi,
that field is missing the mapping of the input fileds
Check the mapping b/w the input form view or the form form where you are inserting the record to dataservice.
Regards,
Govindu

Similar Messages

  • Calling stored procedure in Forms4.5-URGENT

    HI
    i am using form4.5 and wanna call my stored procedure to form.how can i.
    i tried database_procedure_name(update_web);
    but it din't worked.ny oracle d2k guru tell me its urgent.
    thanx in advance
    Sushant Ashutosh
    [email protected]

    Try logging in to SQL*Plus and running the procedure, e.g....
    SQL> begin
    database_procedure_name(update_web);
    end;
    If it runs OK there, then it should run from within your form (provided that you are logged in as the same user as the test with SQL*Plus.

  • Stored Procedure issue in receiver JDBC synchronous scenario

    Dear Experts,
    Below is the description of the Stored Procedure for my requirement which has 1 input and 7 output.
    CREATE OR REPLACE PROCEDURE emp_det_proc
        p_emp_id IN NUMBER,
        cur_det OUT sys_refCURSOR
    aS
    BEGIN
        OPEN cur_det FOR
        SELECT * FROM EMP_PERSON_VIEW
            WHERE id = p_emp_id;
    END emp_det_proc;
    Inside the procedure , we can see that Select query is done on a VIEW which has some 7 column and these are the output. The data type description of the ID is VARCHAR2 in Oracle Database 11g VIEW, that's why I maintained VARCHAR in Constant mapping at SAP-PI side.
    I am maintaining all the column name present in the view for my JDBC request structure with isOutput and type.
    Below is my JDBC request.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_ECCJDBC_EmpStrdProc_JDBCReq xmlns:ns0="urn:empdet:sap:jdbc:storedprocedure"> 
    - <Statement> 
    - <emp_det_proc action="EXECUTE"> 
    <table>emp_det_proc</table> 
    <ID isInput="true" type="VARCHAR">200178</ID> 
    </emp_det_proc>
    </Statement>
    </ns0:MT_ECCJDBC_EMPStrdProc_JDBCReq>
    I tested with other XSD type like INT/CHAR/ but with the same error.
    Unable to execute statement for table or stored procedure. 'emp_det_proc' (Structure 'Statement') due to java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'EMP_DET_PROC'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    1. I observed that the Key field ID is maintained as NUMBER in Stored Procedure but in the VIEW it is maintained as VARCHAR2.
    Could anyone help me to solve the issue  with any suggestions?
    Regards
    Rebecca

    Dear Ramesh,
    There are change in the datatype of the Stored Procedure Input parameter. Below is the correct procedure description now.
    Select query of the View
    My JDBC structure
    Observation and querry:
    1. In the SP declaration, there is 1 IN parameter which I have  created in JDBC structure as p_moi_id and gave the type as INTEGER.
    Error : JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'moi_det_proc' (structure 'Statement'): java.lang.NumberFormatException: For input string: "2*********&49"
    I assume since the range of the number is limited . Integers are values up to 2147483647 and the number I am using is greater than this values.
    2. I assume I have not included the parameter cur_det as OUT. Instead I have maintained the COLUMN names of Select query of the view. Should I remove all the Out parameters which represents inside the View.
    3. What could be the Data type equivalent to Oracle sys_refCURSOR in SAP PI?
    Please share you suggestion.
    Regards
    Rebecca

  • Legal consolidation stored procedure issue

    Hye everyone,
    I tried to execute the stored procedure SPRUNCONSO and I have this error. For information I already run the FXtrans and my database is empty. I just inputted the values I needed :
    - The method et the percentage in the ownership application
    - The input rates for LC and TOT_EUR in the Rate application
    - Some values in the Reporting application.
    All the input are on the same entity and on the time 2006.JUL.
    I don't have any flow dimension but if I understand well it's not an obligation.
    Executing SPRUNCONSO [REPORTING],[REEL],[TOT_EUR],[SPSCOPE_250359],[SPLOG_135291]
    SPRunConso Version 7.0.115
    Warning : Nothing Extract From Ownership for OPENING Period 
    *ERROR* CSD-150 Problem extracting Data : C_REPART 
    *ERROR* CSD-160 Problem extracting Data : C_CONSO 
    20060700 - 3 Rows Calculated
    20060700 - 3 Rows Updated
    The weird thing is that unless the failing during the execution the rows are crrectly inserted. If I delete the parameter scope_table the execution is succesfull but there is no rows calculated.
    I hope to be clear.
    Thank you in advance for your Help
    Franck

    Hi again Franck,
    In fact, this message is not necessarily an indication of an error in the script  or data, even though it appears so and is misleading. There is nothing wrong when you receive this except for the fact that I believe it to be a bit confusing for users.
    In summary, regarding the two errors : ERROR CSD-150  and ERROR CSD-160, the underlying error is a known issue and should be fixed in a future release.                                                         
    For now, you can use the provided workaround to get rid of those error messages.
    Hope this answers your question.
    Kind Regards,
    Patrick

  • Stored Procedure issue

    I have this stored procedure to check if someone ordered a Cancellation date on the line before cancelling it but when i try to add another condition where it should also check for cancellation code it fails. It works if they are individually used. Any suggestions.
    Original Code
    If (@Object_Type='17' and @Transaction_Type='U')
    Begin
    If exists (Select T1.LineNum from RDR1 T1 INNER JOIN ORDR T0 ON T0.DocENtry = T1.DocEntry where T1.linestatus='c' and T1.U_Cancellation IS NULL  and T0.DocEntry= @list_of_cols_val_tab_del)
    Begin
    set @Error='909'
    Set @error_message='You cannot close an Order without a Cancellation Date'
    End
    End
    Changed code
    If (@Object_Type='17' and @Transaction_Type='U')
    Begin
    If exists (Select T1.LineNum from RDR1 T1 INNER JOIN ORDR T0 ON T0.DocENtry = T1.DocEntry where T1.linestatus='c' and T1.U_Cancellation IS NULL  and t1.u_pocancellationcode='01' and T0.DocEntry= @list_of_cols_val_tab_del)
    Begin
    set @Error='909'
    Set @error_message='You cannot close an Order without a Cancellation Date'
    End
    End

    Just try this query :
    If (@Object_Type='17' and @Transaction_Type='U')
    Begin
    If exists (Select T1.LineNum from RDR1 T1 INNER JOIN ORDR T0 ON T0.DocENtry = T1.DocEntry where T1.linestatus='c' and T1.U_Cancellation IS NULL and ISNULL(t1.u_pocancellationcode,'') ='01' and T0.DocEntry= @list_of_cols_val_tab_del)
    Begin
    set @Error='909'
    Set @error_message='You cannot close an Order without a Cancellation Date'
    End
    End
    Hope this help.
    Regards,
    WhiteWood

  • Call Stored Procedure from Forms 6i -- Urgent Plz...

    Dear All,
    I am first writing a stored procedure as:-
    CREATE OR REPLACE FUNCTION
    good_hire
    (birthdate_in IN DATE,
    reqsal_in IN NUMBER)
    RETURN BOOLEAN
    IS
    too_young BOOLEAN :=
    ADD_MONTHS
    (SYSDATE, -216) >
    birthdate_in;
    too_expensive BOOLEAN :=
    reqsal_in > fin.dept_bal;
    BEGIN
    RETURN NOT (too_young
    OR too_expensive);
    END;
    Now in my forms also i have the same function,which i defined in in my program unit i.e., with the same name good_hire,but with different parameters.
    If I want to call this stored procedure(good_hire)in my form
    I am writing this code in the pre-Insert trigger.
    IF good_hire
    (:newemp.birthdate,
    :newemp.proposed_sal)
    THEN
    SELECT empseq.NEXTVAL
    INTO :newemp.empno
    FROM dual;
    ELSE
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    Notice that i am sending bind variables from my form to the
    stored procedure. Now my question :
    1) Can i pass bind variables to the stored procedures from
    forms or is there any other way i can access the
    stored roceures from forms(Expecting a detailed answer) and
    from which triggers can I access the stored procedures(like pre-
    Insert here)?
    2) If at all I have the same parameters in my program unit
    function and with the same name good_hire, I know that the code
    in the pre-Insert trigger will call only the function in my
    program unit and not the stored procedure, but if I like to
    call my stored procedure instead of the local function good_hire
    then what should I do?
    2)As I said before if i have different parameters, for the
    stored procedure good_hire and local function good_hire and If
    I call good_hire from my pre-insert trigger .. Is it that the
    Forms will decide and call the Local function or stored
    procedure depending on the parameter list?
    I hope all my points are very clear.
    I am expecting the best and detailed answer for my
    Queries, I also hope these Quests will clear the doubts of many
    members in our esteemed group.
    Thnx in Advance...
    Regards
    siree....

    Dear Siree,
    Oh!! how many Questions? Each how much big??
    Ok First of all the answer to your first question.
    You can use the Stored procedures in the same way as the Forms procedures. You can pass bind variables to the stored procedures as well. You can also use the stored procedures in any triggers, I think there are no restrictions for that. The only thing is you should be connected to database while compiling the trigger where you are calling the stored procedure.
    Answer to your second question.
    You cannot direct Forms (I don't know about version 10g), untill 9i, you cannot tell forms to take the stored procedure and leave the local procedure. It will always take the local procedure, once a procedure is called. If not found locally then only it will go for the Stored procedures.
    For your third question.
    As I told you b4 forms searches for the procedure being called locally first, if locally present, does not go to the stored procedure. If declared by different paramaters in the stored procedure and it is called, then it will throw error (as it first searches for the name locally and if found will take up the one present locally and since that procedure is with different parameter, will throw up error). It is after all a stupid machine and can't think like us.
    Regards,
    Senthil .A. Perumal

  • Stored Procedure issue - why is it breaking?

    I have a VB5 application that calls a package in a 9i database. Frequently the package becomes broken. The application then tries again and it ALWAYS works fine the second time.
    I would like to figure out how this package is getting broken, but since I cannot replicate issue at will, it is a devil to track down.
    Is there any sort of trigger I can apply to figure out why the procedure is breaking?
    Edit: Sorry, wrong forum. I will re-post.
    Message was edited by:
    jlaidlaw

    Start with http://www.pinkmutant.com/articles/Leopard/leospot.html and my mod to Finder's Find at http://www.macosxhints.com/article.php?story=20080229204517495 for what you can change so you can find stuff excluded by the default structure.

  • Java versus PL/SQL Stored Procedure Issues

    I am getting a result that is 30 times slower for Java when compared with PLSQL. Can you tell me if that is normal or am I missing something?
    Thanks in advance for your help,
    Gaurav Pal
    Java Developer,
    SCJP 1.1, SCJP 2, SCJD 2
    Timing results
    ---------------- Java ------------------------
    Total Time taken for 10 calls: 4667
    Result: 466 Time: 466
    ---------------- PLSQL ------------------------
    Total Time taken for 10 calls: 150
    Result: 466 Time: 15
    Java Code
    public static int getCursorCount()
    int count = 0;
    //define iterator for select
    count_iter myIter = null;
    try
    #sql myIter = { SELECT lastname FROM employee };
    while(myIter.next())
    count++;
    myIter.close();
    catch(SQLException excp)
    return count;
    PL/SQL Code
    function get_count_cursor_sf
    return
    number
    is
    cursor count_cursor is
    select lastname from employee;
    v_return_count number := 0;
    v_name employee.lastname%type;
    begin
    open count_cursor;
    fetch count_cursor into v_name;
    while (count_cursor%found) loop
    fetch count_cursor into v_name;
    v_return_count := v_return_count + 1;
    end loop;
    --Return the variable
    return v_return_count;
    end ;
    Calling Code
    public class DBCall
    public static void main(String args[])
    try
    makeJavaCalls();
    makePLSQLCalls();
    catch(Exception excp)
    excp.printStackTrace();
    public static Connection getConnection() throws Exception
    Class.forName("oracle.jdbc.driver.OracleDriver");
    return DriverManager.getConnection("jdbc:oracle:thin:@10.0.0.3:1521:oracleee","rda","rdauser");
    public static void makePLSQLCalls() throws Exception
    int count = 10;
    long time = 0;
    int result = 0;
    while(count > 0)
    Connection conn = getConnection();
    CallableStatement cs = conn.prepareCall("{? = call rda_plsql_pkg.get_count_cursor_sf()}");
    cs.registerOutParameter(1, Types.INTEGER);
    long before = System.currentTimeMillis();
    cs.execute();
    result = cs.getInt(1);
    long after = System.currentTimeMillis();
    time = time + (after - before);
    cs.close();
    conn.close();
    count--;
    System.out.println("---------------- PLSQL ------------------------");
    System.out.println("Total Time taken for 10 calls: " + time);
    System.out.println("Result: " + result + " Time: " + (time/10));
    public static void makeJavaCalls() throws Exception
    int count = 10;
    long time = 0;
    int result = 0;
    while(count > 0)
    Connection conn = getConnection();
    CallableStatement cs = conn.prepareCall("{? = call dorknight.getcursorcount()}");
    cs.registerOutParameter(1, Types.INTEGER);
    long before = System.currentTimeMillis();
    cs.execute();
    result = cs.getInt(1);
    long after = System.currentTimeMillis();
    time = time + (after - before);
    cs.close();
    conn.close();
    count--;
    System.out.println("---------------- Java ------------------------");
    System.out.println("Total Time taken for 10 calls: " + time);
    System.out.println("Result: " + result + " Time: " + (time/10));
    null

    A big contributor to the behavior seen here is that there is a one-time overhead per session (= per database connection) to start the JavaVM and also (in 8.1.6 and earlier) to initialize the SQLJ runtime (via reflection).
    Keeping the same connection for subsequent calls to Java (which is the more typical scenario, anyway) will result in a rather considerable speedup.

  • URGENT: Java stored procedure on oracle 92 database is not working

    Hi,
    I am having an issue regarding java stored procedures. I have created a java class that uses the bouncycastleprovider ( bcprov-jdk13-141.jar ) to encrypt strings. I tested against the version of the java virtual machine that comes bundled with oracle and it works perfectly. I then used JDeveloper to load the class on the database with the resolve, noverify and order flags checked and it shows no errors but when I try to execute the stored procedure it throws the following exception:
    java.lang.ExceptionInInitializerError:
    java.lang.SecurityException: Cannot set up certs for trusted CAs: java.net.MalformedURLException: no protocol: US_export_policy.jar
    at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
    at javax.crypto.Cipher.a(DashoA6275)
    at javax.crypto.Cipher.getInstance(DashoA6275)
    at RijndaelEnhanced.encrypt(RijndaelEnhanced.java:57)
    at RijndaelEnhanced.encrypt(RijndaelEnhanced.java:73)
    I loaded jce1_2_2.jar, sunjce_provider.jar, bcprov-jdk13-141.jar. Also replaced the US_export_policy.jar, local_policy.jar with the unrestrictive version. I add the security provider dinamically with a call to Security.insertProviderAt(new org.bouncycastle.jce.provider.BouncyCastleProvider(), 2);
    I also did a select on the user_objects table and all the classes are in VALID status.
    When I run my application using the java virtual machine that is located under C:\Oracle\oracli9i\jdk\jre\bin directory it works fine but when I try to execute on the database it won't work. I found a bug that was if the jce1_2_1.jar file existed in the C:\Oracle\oracli9i\jdk\jre\lib\ext directory ( even if it's extension is renamed ) it won't work because the certification file had expired but I don't know if this has anything to do with this error.
    Am I missing something?
    Please I need an urgent solution to this problem.
    Thanks in advance.
    Bruno Oliveira

    SomeoneElse wrote:
    Waaaaahhhhhhh!I was just thinking the same thing.... ya beat me to it...
    To the OP:
    As an up and coming DB Developer who now works for a small tech firm straight outta college, I can tell you for sure that you will definitely not get anywhere in your impatient life... look behind your back you miserable dude, your job might be in danger since ya got a bad attitude AND you can't figure out an error you are getting from a Java SP. So instead of helping you, I am going to simply tell you how you SHOULD act in a community of practice.
    1. Be nice when looking for help
    2. BE NICE WHEN LOOKING FOR HELP!!!
    Pretty simple right?
    Know what else is really simple? Looking at the topics of each board to make sure ya post in the right board! You people disgust me; somehow getting by in your professional career acting the way you do. I sure hope your "online" persona isn't a reflection of your real attitude towards people, almost pathetic and extremely immature.
    Sorry bout the rant, it is Friday, I know :) Didn't get my coffee this morning. Have a good one all!
    -Tim

  • URGENT: I want to pass a variable to a stored procedure at run time

    Post Author: aruplabs
    CA Forum: Data Connectivity and SQL
    I work for a health care provider and I have reports that pull PHI (Protected Health Information) about patients that needs to be logged according to federal HIPAA regulations. One of the pieces of information that needs to be logged is the username of the person who ran the report. Since these reports will be run from our Crystal Enterprise server I can get this from the CurrentCEUserName variable but I am looking for a way to pass this value to a stored procedure that will not only return the records for the report, but also log the disclosure in our PHI disclosure tracking table. I know you can pass a parameter to a stored procedure but I dont know how, or if it is even possible, to pass a run time variable. This is an urgent problem that I need to find a solution for. Any help would be appreciated.
    Thank you.

    Here it is. Right now, when i press te "Go" it runs for the specific time i've set and when its done the variable "Run" is set true. When i call this VI from another VI it waits for the loop to be finished before it will read the variable.
    Regards
    Viktor
    Attachments:
    Untitled 2.vi ‏26 KB

  • Issue while invoking a stored procedure in DB2 from Oracle OSB flow

    oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/Test_Project/Application/Project1/TestSP [ TestSP_ptt::TestSP(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'TestSP' failed due to: Stored procedure invocation error.
    Error while trying to prepare and execute the NED.LOGIN_MODULE API.
    An error occurred while preparing and executing the NED.LOGIN_MODULE API. Cause: java.lang.NullPointerException
    ; nested exception is:
    BINDING.JCA-11811
    Stored procedure invocation error.
    Error while trying to prepare and execute the NED.LOGIN_MODULE API.
    An error occurred while preparing and executing the NED.LOGIN_MODULE API. Cause: java.lang.NullPointerException
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API.

    This forum is for issues about WebLogic Connector container itself. You may need to post your issue to other forums such as SOA.
    Thanks

  • Calling unix shell script from oracle stored procedure.. urgent!!!!!!!!!!!!

    Hi,
    i havea requirement where in i should be able to call my shell script through oracle stored procedure.i tried the following way..but iam unable to get the result.please find the details below.
    new.sh - my shell script - lctfile (LCTFILE) is the input pa
    v_config_file=`find $FND_TOP -name LCTFILE
    FNDLOAD apps/s0ccer@$dxbs1 0 Y DOWNLOAD $v_config_file /home/bir4163/RPT33/bin/menu.ldt MENU MENU_NAME='AR_NAVIGATE_GUI'
    if [ $? != 0 ];then
    echo "$DATE $0 FNDLOAD DOWNLOAD Failed!" | tee -a $LOG_FILE
    else
    echo "SUCCESS" | tee -a $LOG_FILE
    fi
    CREATE OR REPLACE PROCEDURE test_dbms_scheduler
    AS
    v_text VARCHAR2 (255) := 'AR_NAVIGATE_GUI';
    BEGIN
    DBMS_OUTPUT.put_line ('I am in Procedure');
    DBMS_SCHEDULER.create_job (
    job_name => 'test_dbms_scheduler',
    job_action => '/home/bir4163/RPT33/bin/new.sh',
    number_of_arguments => 1,
    job_type => 'executable',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=SECONDLY; INTERVAL=1',
    enabled => FALSE,
    auto_drop => FALSE,
    comments => 'run shell script'
    DBMS_SCHEDULER.set_job_argument_value (job_name => 'test_dbms_scheduler',
    argument_position => 1,
    argument_value => v_text);
    DBMS_SCHEDULER.enable ('test_dbms_scheduler');
    DBMS_OUTPUT.put_line ('I am back in Procedure');
    EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line (SQLCODE || SQLERRM);
    END;
    But iam unable to test it as i do not have permissions to access dbms_scheduler.can anybody tell me how to solve this using DBMS_PIPE with a sample code.
    please do help its very urgent
    thanks
    ramya

    Hi,
    Register your Shell Script as a concurrent program, Executable execution method "Host", then use fnd_request.submit_request to submit the program.
    Regards,
    Andries

  • Improve the performance in stored procedure using sql server 2008 - esp where clause in very big table - Urgent

    Hi,
    I am looking for inputs in tuning stored procedure using sql server 2008. l am new to performance tuning in sql,plsql and oracle. currently facing issue in stored procedure - need to increase the performance by code optmization/filtering the records using where clause in larger table., the requirement is Stored procedure generate Audit Report which is accessed by approx. 10 Admin Users typically 2-3 times a day by each Admin users.
    It has got CTE ( common table expression ) which is referred 2  time within SP. This CTE is very big and fetches records from several tables without where clause. This causes several records to be fetched from DB and then needed processing. This stored procedure is running in pre prod server which has 6gb of memory and built on virtual server and the same proc ran good in prod server which has 64gb of ram with physical server (40sec). and the execution time in pre prod is 1min 9seconds which needs to be reduced upto 10secs or so will be the solution. and also the exec time differs from time to time. sometimes it is 50sec and sometimes 1min 9seconds..
    Pl provide what is the best option/practise to use where clause to filter the records and tool to be used to tune the procedure like execution plan, sql profiler?? I am using toad for sqlserver 5.7. Here I see execution plan tab available while running the SP. but when i run it throws an error. Pl help and provide inputs.
    Thanks,
    Viji

    You've asked a SQL Server question in an Oracle forum.  I'm expecting that this will get locked momentarily when a moderator drops by.
    Microsoft has its own forums for SQL Server, you'll have more luck over there.  When you do go there, however, you'll almost certainly get more help if you can pare down the problem (or at least better explain what your code is doing).  Very few people want to read hundreds of lines of code, guess what's it's supposed to do, guess what is slow, and then guess at how to improve things.  Posting query plans, the results of profiling, cutting out any code that is unnecessary to the performance problem, etc. will get you much better answers.
    Justin

  • Issue with sending mail through java stored procedure in Oracle

    Hello
    I am using Oracle 9i DB. I created a java stored procedure to send mail using the code given below. The java class works fine standalone. When its run from Java, mail is sent as desired. But when the java stored procedure is called from pl/sql "Must issue a STARTTLS command first" error is thrown. Please let me know if am missing something. Tried the same code in 11.2.0.2 DB and got the same error
    Error:
    javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first. va6sm31201010igc.6
    Code for creating java stored procedure: (T1 is the table created for debugging)
    ==================================================
    create or replace and compile java source named "MailUtil1" AS
    import java.util.Enumeration;
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class MailUtil1 {
    public static void sendMailwithSTARTTLS(String host, //smtp.projectp.com
    String from, //sender mail id
    String fromPwd,//sender mail pwd
    String port,//587
    String to,//recepient email ids
    String cc,
    String subject,
    String messageBody) {
    try{
    Properties props = System.getProperties();
    props.put("mail.smtp.starttls.enable", "True"); // added this line
    props.put("mail.smtp.host", host);
    props.put("mail.smtp.user", from);
    props.put("mail.smtp.password", fromPwd);
    props.put("mail.smtp.port", port);
    props.put("mail.smtp.auth", "true");
    #sql { insert into t1 (c1) values ('1'||:host)};
    Session session = Session.getDefaultInstance(props, null);
    MimeMessage message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    #sql { insert into t1 (c1) values ('2')};
    InternetAddress[] toAddress = new InternetAddress[1];
    // To get the array of addresses
    for( int i=0; i < toAddress.length; i++ ) { // changed from a while loop
    toAddress[i] = new InternetAddress(to);
    //System.out.println(Message.RecipientType.TO);
    for( int i=0; i < toAddress.length; i++) { // changed from a while loop
    message.addRecipient(Message.RecipientType.TO, toAddress);
    if (cc!=null) {
    InternetAddress [] ccAddress = new InternetAddress[1];
    for(int j=0;j<ccAddress.length;j++){
    ccAddress[j] = new InternetAddress(cc);
    for (int j=0;j<ccAddress.length;j++){
    message.addRecipient(Message.RecipientType.CC, ccAddress[j]);
    message.setSubject(subject);
    message.setText(messageBody);
    message.saveChanges();
    #sql { insert into t1 (c1) values ('3')};
    Enumeration en = message.getAllHeaderLines();
    String token;
    while(en.hasMoreElements()){
    token ="E:"+en.nextElement().toString();
    #sql { insert into t1 (c1) values (:token)};
    token ="ConTyp:"+message.getContentType();
    #sql { insert into t1 (c1) values (:token)};
    token = "Encod:"+message.getEncoding();
    #sql { insert into t1 (c1) values (:token)};
    token = "Con:"+message.getContent();
    #sql { insert into t1 (c1) values (:token)};
    Transport transport = session.getTransport("smtp");
    #sql { insert into t1 (c1) values ('3.1')};
    transport.connect(host, from, fromPwd);
    #sql { insert into t1 (c1) values ('3.2')};
    transport.sendMessage(message, message.getAllRecipients());
    #sql { insert into t1 (c1) values ('3.3')};
    transport.close();
    #sql { insert into t1 (c1) values ('4')};
    catch(Exception e){
    e.printStackTrace();
    String ex= e.toString();
    try{
    #sql { insert into t1 (c1) values (:ex)};
    catch(Exception e1)
    Edited by: user12050615 on Jan 16, 2012 12:18 AM

    Hello,
    Thanks for the reply. Actually I have seen that post before creating this thread. I thought that I could make use of java mail to work around this problem. I created a java class that succesfully sends mail to SSL host. I tried to call this java class from pl-sql through java stored procedure. That did not work
    So, is this not supported in Oracle ? Please note that I have tested this in both 9i and 11g , in both the versions I got the error. You can refer to the code in the above post.
    Thanks
    Srikanth
    Edited by: user12050615 on Jan 16, 2012 12:17 AM

  • Issue with calling a stored procedure as an url in APEX 4.x

    We are migrating from APEX 3.2.1 running oracle 10g and using the oracle http server to APEX 4.02 using the embedded pl/sql (xdb) gateway on Oracle 11g R2. On the old server, we were able to execute a stored procedure call that returned custom xml to an anychart. We granted the procedure execute to apex_public_user.
    However, the exact same code base is not running on the new installation. I am thinking that it is a rights/grant/execute issue but have been unsuccessful in finding the correct resolution anywhere on the web.
    Anyone have any suggestions for my administrators to help resolve this issue?
    Thanks,
    Mark

    Also review this post: 11g EPG - wwv_flow_epg_include_modules  - 403 Forbidden

Maybe you are looking for

  • Windows 8 search not working for on particular folder on external HDD

    I have an external HDD which has a library of pdf documents on it (about 11gigs worth) - it's in my index and it used to be perfectly searchable by windows search until I had the files system converted to NTFS from FAT32.  Now it literally will not f

  • Greyed out songs on iPhone and not visible at all in iTunes

    I have recently had to replace my iphone due to the microphone breaking, when restoring my new iphone and attempting to transfer all my music onto it, I noticed it asking me to sign in to the apple store with an email address I have never used or rec

  • Indesign CS4 to PDF 1.3 transparency issue

    We submitted an ad to the local newspaper that we created in Indesign CS4 and Acrobat 9. The ad was exported as a press-quality Acrobat 4 PDF. It is a fairly simple layout, with type and a logo. The headline and logo have a drop shadow applied with m

  • How to convert .caf files to WAV, MP3, WMA etc

    I use QuickVoice free app on my ipad2 to record memos. I've just found out how to convert the files and play them on my Windows computer. First I used this program call QuickVoice Sync to copy my recording on my computer, used this link: www.nFinityI

  • % relative positioning and sizing in Captivate 8?

    I'm doing lots of exploring of the way objects size and position in a responsive project but I just don't get '% relative' option for positioning and sizing. Positioning: It seems to me that Smart Positioning allows one object to be positioned relati