Javamail fetch returns string 'POP3'

When I try to fetch mail, I only get the string 'POP3'.
There is no exception generated.
This worked fine in the past, does this have something to do with security.
I'm lost.
Thx. in advance.

You might want to change your code, then. My crystal ball is not working right now so I can't make any suggestions about what part of your code you should look at.

Similar Messages

  • Exception when fetch message from pop3 mail server

    below exception occur whenever i fetched message from pop3 mail server. Its occur for perticular message. so i catched javax.mail.MessagingException but this is not working and rest of the messages skips.
    plz help me , its urgent.
    javax.mail.MessagingException: error loading POP3 headers;
      nested exception is:
            java.io.IOException: Unexpected response: ------=_NextPart_000_01B9_01C8
    A1AB.148BE090
            at com.sun.mail.pop3.POP3Message.loadHeaders(POP3Message.java:467)
            at com.sun.mail.pop3.POP3Message.getHeader(POP3Message.java:275)
            at javax.mail.internet.MimeMessage.getSubject(MimeMessage.java:717)
            at fetch1.<init>(fetch1.java:92)
            at fetch1.main(fetch1.java:185)
    Caused by: java.io.IOException: Unexpected response: ------=_NextPart_000_01B9_0
    1C8A1AB.148BE090
            at com.sun.mail.pop3.Protocol.simpleCommand(Protocol.java:361)
            at com.sun.mail.pop3.Protocol.multilineCommand(Protocol.java:373)
            at com.sun.mail.pop3.Protocol.top(Protocol.java:271)
            at com.sun.mail.pop3.POP3Message.loadHeaders(POP3Message.java:451)
            ... 4 more
    Press any key to continue...Code :-
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.Flags.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class fetch3
         fetch3()
              try
                   // Setup properties
                   Properties props = System.getProperties();
                   props.put("mail.pop3.host","myMailserver ip");     
                   // Setup authentication, get session
                   Authenticator auth = new PopupAuthenticator();
                   Session session = Session.getDefaultInstance(props, auth);
                   // Get the store
                   Store store = session.getStore("pop3");
                   store.connect();
                   // Get folder
                   Folder folder = store.getFolder("INBOX");
                   folder.open(Folder.READ_WRITE);
                   Flags flag = folder.getPermanentFlags();
                   // Get directory
                   Message message[] = folder.getMessages();
                   // Display from (only first) and subject of messages
                   for (int i=0, n=message.length; i<n; i++)
                   System.out.println ("------------------------------------------------------");
                        System.out.println(" From     : "+message.getFrom()[0]);
                        System.out.println(" To : "+message[i].getAllRecipients()[0]+" "+message[i].getAllRecipients().length);
                        System.out.println(" Replyto : "+message[i].getReplyTo()[0]);
                        System.out.println(" Subject : "+message[i].getSubject());
                        System.out.println ("type "+message[i].getContent());
                        Part messagePart=message[i];
                        Object content=messagePart.getContent();
                        // -- or its first body part if it is a multipart message --
                        if (content instanceof Multipart)
                             messagePart=((Multipart)content).getBodyPart(0);
                        //     System.out.println("[ Multipart Message ]");
                        // -- Get the content type --
                        String contentType=messagePart.getContentType();
                        // -- If the content is plain text, we can print it --
                        System.out.println("CONTENT:"+contentType);
                        if (contentType.startsWith("text/plain") || contentType.startsWith("text/html") || contentType.startsWith("multipart/alternative"))
                             InputStream is = messagePart.getInputStream();
                             BufferedReader reader
                             =new BufferedReader(new InputStreamReader(is));
                             String thisLine=reader.readLine();
                             while (thisLine!=null)
                                  System.out.println(thisLine);
                                  thisLine=reader.readLine();
                        System.out.println ("------------------------------------------------------");
                   // Close connection
                   folder.close(false);
                   store.close();
              catch(Exception e)
                   e.printStackTrace();
         public static void main(String s[])
              new fetch3();
    Regards 
    Sagar
    Edited by: sagar_birari on 23 Apr, 2008 1:18 PM
    Edited by: sagar_birari on 23 Apr, 2008 4:30 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    it shows below output
    C:\>java -Dmail.debug=true fetch1
    DEBUG: JavaMail version 1.4ea
    DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.5.0_06\lib\java
    mail.providers (The system cannot find the file specified)
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.providers
    DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
    DEBUG: Tables of loaded providers
    DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax
    .mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsyste
    ms, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com
    .sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLSt
    ore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsyst
    ems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.su
    n.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=jav
    ax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc],
    com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP
    3Store,Sun Microsystems, Inc]}
    DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.
    sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STOR
    E,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Prov
    ider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc],
    pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems
    , Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
    Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.S
    MTPTransport,Sun Microsystems, Inc]}
    DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.address.map
    DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.5.0_06\lib\java
    mail.address.map (The system cannot find the file specified)
    DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.
    POP3Store,Sun Microsystems, Inc]
    DEBUG POP3: connecting to host "pop3_server_ip", port 110, isSSL false
    S: +OK Hello there.
    C: USER [email protected]
    S: +OK Password required.
    C: PASS mypass
    S: +OK logged in.
    DEBUG: setDebug: JavaMail version 1.4ea
    C: STAT
    S: +OK 16 143077
    C: NOOP
    S: +OK Yup.Edited by: sagar_birari on 24 Apr, 2008 1:16 PM
    Edited by: sagar_birari on 24 Apr, 2008 1:18 PM

  • Returning strings from OLE2 Word object (Forms 4.5)

    Below is an example of how to return string and numeric values from OLE2 objects. In this example the OLE2 object is a MS Word document, and I want to fetch all the bookmarks in the Document into a Forms 4.5 Varchar2. To do this I first need to get the count of bookmarks.
    Getting a string property from an OLE2 object is a common OLE2 requirement but is poorly documented. This is the ONLY way it can be done, as OLE2.INVOKE_CHAR returns a single character not a string. Use OLE2.INVOKE_OBJ, then OLE2.GET_CHAR_PROPERTY which does return a string, as shown below, to return a string from an OLE object (or OLE property).
    Also note how you can only get the child object from its parent, not the grandchild (etc) object, so multiple (cascading) GET_OBJ_PROPERTY calls are required.
    /* by: Marcus Anderson (Anderson Digital) (MarcusAnderson.info) */
    /* name: Get_Bookmarks */
    /* desc: Returns a double quoted CSV string containing the document*/
    /* bookmarks. CSV string will always contain a trailing comma*/
    /* EG: "Bookmark1","Bookmark2",Bookmark3",Bookmark4", */
    /*               NB: This requires that Bookmarks cannot contain " chr */
    PROCEDURE Get_Bookmarks (pout_text OUT VARCHAR2)
    IS
    v_text           VARCHAR2(80);
    v_num                         NUMBER(3);
         v_arglist OLE2.LIST_TYPE;
         v_Application     OLE2.OBJ_TYPE;
    v_ActiveDoc      OLE2.OBJ_TYPE;
    v_Bookmarks          OLE2.OBJ_TYPE;
    v_Item                    OLE2.OBJ_TYPE;
    v_i                              NUMBER(3);
    BEGIN
              v_Application     := LDWord.MyApplication; -- Word doc opened elsewhere
                   /* Set v_num = ActiveDocument.Bookmarks.Count */
    v_ActiveDoc := OLE2.GET_OBJ_PROPERTY (v_Application, 'ActiveDocument');
    v_Bookmarks := OLE2.GET_OBJ_PROPERTY (v_ActiveDoc , 'Bookmarks');
    v_num := OLE2.GET_NUM_PROPERTY (v_Bookmarks, 'Count'); -- NB: Returns numeric property
                   /* Build the output string, pout_text. */
    FOR v_i in 1..v_num LOOP
                        /* Set v_item = ActiveDocument.Bookmarks.Item(v_i) */
    v_arglist := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG (v_arglist, v_i);
    v_Item := OLE2.INVOKE_OBJ (v_Bookmarks, 'Item', v_arglist); -- NB: returns parent object (array element)
    OLE2.DESTROY_ARGLIST (v_arglist);
                        /* Set v_text = ActiveDocument.Bookmarks.Item(v_i).Name */
    v_text := OLE2.GET_CHAR_PROPERTY (v_Item, 'Name');                    -- NB: Returns string/varchar2 property
    pout_text := pout_text || '"' || v_text || '",' ;
    END LOOP;
    END;

    Please repost in the Forms discussion forum.
    - OTN

  • ADF pivot table HeaderCellContext always returns String

    I am creating a pivot table using my own array of a custom class: PivotCell[][].
    Everything works fine and I am able to render data and cell wise colors etc.
    When I try to fetch value from headerCellContext, it returns string.
    It works with DataCellContext where I get my custom object.
    private class MyHeaderCellFormat extends CellFormat {
    public MyHeaderCellFormat(HeaderCellContext headerCellContext) {
    _headerCellContext = headerCellContext;
    Object value = _headerCellContext.getValue();
    Please help.

    Hi,
    according to the documentation, this should not be the case. As you can see, the documentation explicitly calls toString() for the string representation: http://docs.oracle.com/cd/E28389_01/web.1111/b31973/dv_crosstab.htm#CHDGCBIG . You can narrow down the problem by using the default cell format and see what this returns
    Frank

  • ORA-01422- exact fetch returns more than requested number of rows in D2K Report

    Hi All,
    Greetings.
    I am using a report which is being called from the from in one of my application. The report is working fine from quiet a long time. I have an error with a particular record alone and it is working fine for all other records.
    When I try to run the report, I am getting the error as Rep-1401- 'cf_vatformula' : Fatal pl/sql error occured.
                                                                                ORA-01422- Exact fetch returns more than requested number of rows.
    I opened the formula column and run the sql codes that are used in the formula column cf_vat and all of them are working fine. None of them are fetching more a single row. But, when I run the report, I am getting the same error as mentioned above.
    Please help me resolve the issue ASAP. Thanks in Advance.
    Regards,
    Bhaskar.

    Hi InoL,
    Thanks for your time.
    I am sure that there is no other procedure used in cf_vatformula. It has select queries in and all of them are fetching the data not more than a single row.
    I have tested each and every select query with every possible output.
    Regards,
    Bhaskar.

  • Returning String data through argument

    I need to write a method to call the following method:
    int myFunc(char *buf, int code);
    Where I need the return value integer and I also want to get back the char * as a string.
    I am thinking the most straightforward thing to do would be:
    public native int myFunc(StringBuffer sb, int code);
    and then in my native code create the return string and use the MethodID functions to call the StringBuffers append() method.
    I considered making two functions - one to get the string and one to check for an error, but figured that could cause threading implications in the future.
    I assume this is a common issue, is there a recommended solution?
    Thanks,
    mike

    Sorry I didn't reply earlier- never really came back to this thread - the solution I suggested in my first message worked great for me.
    Here's what it looks like (the relevant bits at least):
    * Class: com_nmss_ms_log_hsLogger
    * Method: lgGetText
    * Signature: (Ljava/lang/StringBuffer;Ljava/lang/String;I)I
    JNIEXPORT jint JNICALL Java_com_nmss_ms_log_hsLogger_lgGetText
    (JNIEnv *env, jobject obj, jobject stringBuf, jstring id, jint msgId, jchar ss_id)
    char buff[501];
    int result, i;
    jstring retString;
    jclass cls = (*env)->GetObjectClass(env, stringBuf);
    jmethodID mid = (*env)->GetMethodID(env, cls, "append", "(Ljava/lang/String;)Ljava/lang/StringBuffer;");
    result = logGetText(log_handle, msgId, buff, 500);
    retString = (*env)->NewStringUTF(env, buff);
    (*env)->CallObjectMethod(env, stringBuf, mid, retString);
    return result;
    }

  • PROCEDURE PROBLEM - Exact Fetch Returns More Than Requested Number of Rows

    Here is my procedure:
    CREATE OR REPLACE PROCEDURE question4
      ( cust_first IN customer.custfirstname%TYPE,
       cust_last IN customer.custlastname%TYPE,
       customer_no OUT customer.customerSsn%TYPE,
       cust_address OUT customer.address%TYPE,
       loanID OUT loan.loanNo%TYPE,
       application_date OUT loan.appdate%TYPE,
       remaining_payments OUT loan.remainingpaymentsdue%TYPE,
       loan_amount OUT loan.loanamount%TYPE,
       loan_term OUT loan.loanterm%TYPE,
       interest_rate OUT loan.interestrate%TYPE,
       monthly_payment OUT loan.monthlypayment%TYPE)
       AS
    BEGIN
      SELECT customerssn, address  INTO customer_no, cust_address FROM CUSTOMER WHERE custfirstname= cust_first AND custlastname = cust_last;
      SELECT loanno, remainingpaymentsdue, loanamount, loanterm, interestrate, monthlypayment, appdate INTO loanID, remaining_payments, loan_amount, loan_term, interest_rate, monthly_payment, application_date FROM LOAN WHERE customerSsn = customer_no;
      EXCEPTION
        WHEN OTHERS
        THEN
        NULL;
    END;Here is the anonymous block showing the use of my procedure.
    SET SERVEROUTPUT ON
    DECLARE
      customer_number customer.customerSsn%TYPE := NULL;
      customer_address customer.address%TYPE := NULL;
      loan_number loan.loanNo%TYPE := NULL;
      app_date loan.appdate%TYPE := NULL;
      rem_payment loan.remainingpaymentsdue%TYPE := NULL;
      l_amount loan.loanamount%TYPE := NULL;
      l_term loan.loanterm%TYPE := NULL;
      i_rate loan.interestrate%TYPE := NULL;
      m_payment loan.monthlypayment%TYPE := NULL;
      view_customerSSN NUMBER;
      view_address VARCHAR2(50);
      view_loanID NUMBER;
      view_date DATE;
      view_remaining_payment NUMBER;
      view_loan_amount NUMBER(8,2);
      view_loan_term VARCHAR2(10);
      view_interest_rate FLOAT(20);
      view_monthly_payment NUMBER(8,2);
    BEGIN
      question4 ('Tim', 'Thompson',  customer_number, customer_address, loan_number, app_date, rem_payment, l_amount, l_term, i_rate, m_payment);
      IF (customer_number IS NULL OR customer_address IS NULL OR loan_number IS NULL OR app_date IS NULL
      OR rem_payment IS NULL OR l_amount IS NULL OR l_term IS NULL OR i_rate IS NULL OR m_payment IS NULL) THEN
         DBMS_OUTPUT.PUT_LINE ('NULL VALUE');
      ELSE
        view_customerSSN := customer_number;
        view_address := customer_address;
        view_loanID := loan_number;
        view_date := app_date;
        view_remaining_payment := rem_payment;
        view_loan_amount := l_amount;
        view_loan_term := l_term;
        view_interest_rate := i_rate;
        view_monthly_payment := m_payment;
        DBMS_OUTPUT.PUT_LINE ('CUSTOMER NO : ' ||  view_customerSSN);
        DBMS_OUTPUT.PUT_LINE ('CUSTOMER ADDRESS : ' ||  view_address);
        DBMS_OUTPUT.PUT_LINE ('LOAN NO : ' ||  view_loanID);
        DBMS_OUTPUT.PUT_LINE ('LOAN APPLICATION DATE : ' ||  view_date);
        DBMS_OUTPUT.PUT_LINE ('REMAINING PAYMENTS : ' ||  view_remaining_payment);
        DBMS_OUTPUT.PUT_LINE ('LOAN AMOUNT : ' ||  view_loan_amount);
        DBMS_OUTPUT.PUT_LINE ('LOAN TERM : ' ||  view_loan_term);
        DBMS_OUTPUT.PUT_LINE ('INTEREST RATE : ' ||  view_interest_rate);
        DBMS_OUTPUT.PUT_LINE ('MONTHLY PAYMENT : ' ||  view_monthly_payment);
      END IF;
    END;
    /Error Message:
    Error report:
    ORA-06550: line 21, column 3:
    PLS-00306: wrong number or types of arguments in call to 'QUESTION4'
    ORA-06550: line 21, column 3:
    PL/SQL: Statement ignored
    *06550. 00000 - "line %s, column %s:\n%s"*
    **Cause: Usually a PL/SQL compilation error.*
    **Action:*
    What is the problem here? Could you anyone help me?
    Thanks for your help from now on.
    Have a beautiful day...
    Edited by: RobertPires on May 1, 2011 5:13 PM
    Edited by: RobertPires on May 1, 2011 8:19 PM

    Thanks for your help, Sir. As you see it as above, I fixed the order of parameters, but since I would like to display multiple records, my procedure did not work properly and I got this error message:
    Error report:
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "S4048958.QUESTION4", line 20
    ORA-06512: at line 21
    *01422. 00000 - "exact fetch returns more than requested number of rows"*
    **Cause: The number specified in exact fetch is less than the rows returned.*
    **Action: Rewrite the query or change number of rows requested*
    I guess I need to create a cursor in my procedure, but I dunno how. Could you give me some suggestion for this please?
    Thanks again...

  • ORA-01422 exact fetch returns more than requested number of rows on invoice

    Hello developer,
    Current I m facing problem ORA-01422 exact fetch returns more than requested number of rows in Invoce Standard form when we select PO_Default invoice type for some specific PO Number not for all. I m not able to handle the error bcoz im new in oracle apps. it's urgent for user requirement. Plz guide me how to take approch to handle the situation.........
    select Po_Default invoice type=>enter po number=>press ok button=>got error ORA-01422
    I got query from POST_QUERY TRIGEER like
    function get_po_number (l_po_number varchar2,l_vendor_id OUT number) return number is
    l_po_header_id number;
    --Bug fix:1096002
    --Removed the function call UPPER from the WHERE clause so that the query
    --becomes case sensitive.
    -- BUG 2519682 vendor_id added in the Select statement and futher in the fetch statement
    cursor po_number_cursor is
    SELECT po_header_id,vendor_id
    FROM po_headers
    WHERE type_lookup_code IN ('STANDARD', 'BLANKET', 'PLANNED')
    AND approved_flag = 'Y'
    AND segment1 = l_po_number
    -- Bug 2289727. Enhanced Matching Controls to Finally Closed POs
    AND (NVL(closed_code, 'X') <> 'FINALLY CLOSED'
    OR :parameter.show_final_closed_po_flag = 'Y')
    AND PCARD_ID IS NULL; --bug4627502
    /* Commented out since this is not relevant even if executed.
    AND (segment1 LIKE SUBSTR(l_po_number, 1, 2) || '%' OR
    segment1 LIKE SUBSTR(l_po_number, 1, 1) ||
    SUBSTR(l_po_number, 2, 1) || '%' OR
    segment1 LIKE SUBSTR(l_po_number, 1, 1) ||
    SUBSTR(l_po_number, 2, 1) || '%' OR
    segment1 LIKE SUBSTR(l_po_number, 1, 2) || '%' );
    begin
    open po_number_cursor;
    fetch po_number_cursor INTO l_po_header_id,l_vendor_id;
    close po_number_cursor;
    return(l_po_header_id);
    end get_po_number;
    plz help me how to resolved this issue it's urgent.
    thanks in advance.........

    This bug is documented in the following note on metalink.oracle.com
    APXINWKB - Creating PO Default Invoice Errors with ORA-01422 Exact Fetch Returns More Than Requested Number Of Rows [ID 946578.1]
    The solution is to apply patch 8765847.
    Hope this answers your question,
    Sandeep Gandhi

  • RACUST errors out - racina: ORA-01422: exact fetch returns more than reques

    Hi,
    We are using standard RACUST interface( r12, 12.0.0). All the records are successsfully validated however, the standard program errors out at run time with the following error
    racina: ORA-01422: exact fetch returns more than requested number of rows

    Pl see if MOS Doc 802175.1 (Customer Interface Creates Duplicate Party Sites Used in Multi-Org (MOAC)) can help
    HTH
    Srini

  • Return String array in server side

    i wrote a bean which contains a function return String array (
    String[] ). It shows no error on compile time, and also in
    generate jar file. However, when i generate it to an ear file,
    the syntax of the wsdl file is not correct so the client can't
    call this function becuase the xml can't parse the wsdl.
    When i change the return type to String, everything is ok. Does
    anybody know what's happen? I really have no idea on it, thx.

    This is why I wanted to see some code. I wanted to see how you are trying to move the array from one class to another.
    This should work... provided that the array is initialised correctly in ClassA. If you are doing it like this, please post some code and I'll help you fix it.
    class ClassA{
    public String[] getMyArray(){
    return myArray;
    class ClassB{
    public void myMethod(){
    ClassA myA = new ClassA();
    String[] newArray = myA.getMyArray();
    }

  • Error during recover datafile - ORA-01422: exact fetch returns more than ..

    Hi,
    we have got actual a serious problem in our database. Some days ago we created a new datafile for a tablespace in the wrong directory:
    ALTER TABLESPACE "ANZSIIDX" ADD DATAFILE '/oralunadata/anzora8/ANZSIIDX08.dbf' SIZE 500M
    We recognized our mistake and generated the datafile with the same name in teh right directory:
    ALTER TABLESPACE "ANZSIIDX" ADD DATAFILE '/oralunaindex/anzora8/ANZSIIDX08.dbf' SIZE 500M
    We set the "wrong" datafile offline in order to rename and replace this in file in the right directory:
    alter database datafile '/oralunadata/anzora8/ANZSIIDX08.dbf' offline;
    ALTER TABLESPACE 'ANZSIIDX'
    RENAME DATAFILE '/oralunadata/anzora8/ANZSIIDX08.dbf',
    TO '/oralunaindex/anzora8/ANZSIIDX09.dbf';
    After this we wanted to bring the datafile online again with a recovery but
    this fails with teh strange error-message:
    SQL> recover datafile 109;
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 20
    ORA-00279: change 10322956311023 generated at 04/10/2013 18:51:23 needed for
    thread 1
    ORA-00289: suggestion : /oralunaarchiv/anzora8/anzora8_1_315326_636567403.arc
    ORA-00280: change 10322956311023 for thread 1 is in sequence #315326
    A similar thing happens with our RMAN backup from last weekend, which failed:
    channel c4: backup set complete, elapsed time: 00:32:33
    input datafile fno=00109 name=/oralunadata/anzora8/ANZSIIDX08.dbf
    input datafile fno=00103 name=/oralunaindex/anzora8/ITOPROTOKOLLEIDX01.dbf
    input datafile fno=00097 name=/oralunadata/anzora8/ITOPROTOKOLLE03.dbf
    input datafile fno=00096 name=/oralunadata/anzora8/ITOPROTOKOLLE02.dbf
    channel c4: specifying datafile(s) in backupset
    channel c4: starting compressed incremental level 0 datafile backupset
    continuing other job steps, job failed will not be re-run
    ORA-00600: internal error code, arguments: [krbbfmx_notfound], [109], [12801], [], [], [], [], []
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-00604: error occurred at recursive SQL level 1
    Has anybody an idea, how can we bring back the datafile online in order to run succesfull an RMAN backup?
    Actually we see just the workaraound to move the objects from the affected tablespace to new tablespace
    and the drop the empty tablespace what would be quite time consuming and not really practicable for us.
    kind regards,
    Marco

    Hi,
    actual we see this in v$datafile:
    /oralunaindex/anzora8/ANZSIIDX01.dbf     15     ANZSIIDX     10737418240     1310720     AVAILABLE     15     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX02.dbf     46     ANZSIIDX     10737418240     1310720     AVAILABLE     46     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX03.dbf     58     ANZSIIDX     10737418240     1310720     AVAILABLE     58     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX04.dbf     65     ANZSIIDX     10737418240     1310720     AVAILABLE     65     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX05.dbf     78     ANZSIIDX     10737418240     1310720     AVAILABLE     78     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX06.dbf     85     ANZSIIDX     10737418240     1310720     AVAILABLE     85     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX07.dbf     88     ANZSIIDX     10737418240     1310720     AVAILABLE     88     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX09.dbf     109     ANZSIIDX               AVAILABLE     109                                   RECOVER
    /oralunaindex/anzora8/ANZSIIDX08.dbf     110     ANZSIIDX     10737418240     1310720     AVAILABLE     110     NO     0     0     0     10737352704     1310712     ONLINE
    We dont use RMAN-Catalog for backup the information is only stored in the controlfile.
    The recovery datafile command with full path including for the datafile failed with the same error message:
    SQL> connect / as sysdba
    Connected.
    SQL> recover datafile '/oralunaindex/anzora8/ANZSIIDX09.dbf';
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 20
    ORA-00279: change 10322956311023 generated at 04/10/2013 18:51:23 needed for
    thread 1
    ORA-00289: suggestion : /oralunaarchiv/anzora8/anzora8_1_315326_636567403.arc
    ORA-00280: change 10322956311023 for thread 1 is in sequence #315326
    I guess it is a bug of oracle which will sometimes occur when you give two datafiles the same name in different directories that this poduces errors as above in the RMAN inerface(packages)!?
    Maybe we could force to set he tablespace offline, rename the new added datafiles and ry to bring the tablespace online but nobody knows if it works really and we get the tablespace online again?
    Therefore at the moment maybe it's the best way to move the objects away from this tablespace and than drop them, isn't it?
    regards,
    Marco

  • Why returning string from java stored function failed ?  HELP ME, PLEASE

    Hi everybody,
    I created java stored function: it's doing http post, parsing xml from http reply, and returning string result.
    Sometimes, it doesn't return any value. What can be a reason ?
    The high level procedure, has following form:
    class SBE {
    public static String call(String arg0) {
    SBE sbe=new SBE("d:\\oracle\\ora81\\network\\log\\SBE.log");
    String result=SBEParser.go(sbe.sendRequest(arg0, ""), sbe.logger);
    sbe.logger.log(result);
    sbe.logger.log("Finish SBE intetraction");
    return result;
    PLSQL wrapper has a simple form:
    create or replace package PG_SBE as
    function CALL(arg0 in varchar2) return varchar2;
    end;
    create or replace package body PG_SBE as
    function CALL(arg0 varchar2) return varchar2 as language java name 'SBE.call(java.lang.String) return java.lang.String';
    end;
    In log file ("d:\\oracle\\ora81\\network\\log\\SBE.log"), I can find message :
    "Finish SBE intetraction"
    but query:
    select pg_sbe.call("any argument") from dual;
    doesn't finish.
    What can be a reason ? What can I do to trace stage of convertion java string to varchar ?
    Please help me...
    Best regards
    Marek

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Stefan Fdgersten ([email protected]):
    Maybe your call is wrong... Shouldn't there be a "?" instead of "1"?
    Your code:
    String myquery = "begin :1 := jspTest; end;";
    I provide my (working) call from java as an example. Maybe it is of any help... :)
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public Vector getAllHosts() throws SQLException {
    //return getHosts(false, -1);
    Connection conn = null;
    CallableStatement cs = null;
    Vector hostV = new Vector();
    try {
    conn = getConnection();
    String query = "{ ? = call curTestPkg.curTestFunc}";
    cs = conn.prepareCall(query);
    cs.registerOutParameter(1, OracleTypes.CURSOR);
    cs.execute();
    ResultSet rs = ((OracleCallableStatement)cs).getCursor(1);
    while (rs.next()) {
    Host host = new Host(
    rs.getInt("hostid")
    , rs.getString("name")
    , rs.getString("descr")
    , rs.getString("os"));
    hostV.add(host);
    cs.close();
    return hostV;
    } finally {
    close(conn, cs);
    <HR></BLOCKQUOTE>
    hi Stefan thanx.....even after changing the call statement i get the same error. i changed query string as...
    String myquery = "{ ? = call jspTest}";
    CallableStatement cst = con.prepareCall(myquery);
    Can u please check out my call sepc that i have written in pl/sql and plz let me know it there is any error in that.
    PS : THIS IS THE FIRST TIME I AM WORKING WITH PL/SQL AND IT IS URGENT

  • Why returning string from java stored function failed ?

    I created java stored function: it's doing http post, parsing xml from http reply, and returning string result.
    Sometimes, it doesn't return any value. What can be a reason ?
    The high level procedure, has following form:
    class SBE {
    public static String call(String arg0) {
    SBE sbe=new SBE("d:\\oracle\\ora81\\network\\log\\SBE.log");
    String result=SBEParser.go(sbe.sendRequest(arg0, ""), sbe.logger);
    sbe.logger.log(result);
    sbe.logger.log("Finish SBE intetraction");
    return result;
    PLSQL wrapper has a simple form:
    create or replace package PG_SBE as
    function CALL(arg0 in varchar2) return varchar2;
    end;
    create or replace package body PG_SBE as
    function CALL(arg0 varchar2) return varchar2 as language java name 'SBE.call(java.lang.String) return java.lang.String';
    end;
    In log file ("d:\\oracle\\ora81\\network\\log\\SBE.log"), I can find message :
    "Finish SBE intetraction"
    but query:
    select pg_sbe.call("any argument") from dual;
    doesn't finish.
    What can be a reason ? What can I do to trace stage of convertion java string to varchar ?
    Please help me...
    Marek

    This comes up periodically. It just isn't possible using that type of approach. Probably the best you could do is the create an ADT (containing collections) and use that to pass a 'batch' of information.
    Hopefully this will get addressed in the next release of the database.

  • Stuck with Exact fetch returns more than requested number of rows!

    Hi
    I've written the following code where i want to insert an id number into a package to update a record.
    declare myvar NUMBER; begin SELECT App.id into myvar FROM people_units pu LEFT OUTER JOIN(
    SELECT pu.id,pu.record_date,pu.unit_instance_code,pu.person_code,pu.calocc_code,pu.record_date As received
    FROM people_units pu) App ON pu.person_code = App.person_code AND Trunc(pu.record_date) = Trunc(App.record_date)
    WHERE pu.id = 79474; ebs_units_pkg.AddProgressHistory(myvar,'AUTO');end;
    when i run the query in SQL i get the error message ORA-01422 - Exact fetch returns more than expected number of rows.
    Can anyone help me rseolve this error? The select statement may return more than one row which im guessing is the cause of the problem. If the select statement does return more than one value. 2 rows for example, i would like the package to update the 2 rows. Ive never really done any work with PL/SQL before so at a loss at where to begin!!

    Do the select and the update all in one step. It will be much easier then.
    Example:
    UPDATE people_units
    SET yourColumn = calculatedValue
    WHERE id = 79474

  • LKM getinfo returned string not visible in IKM

    ODI 11.1.1.6.2
    We are staging a number of tables using DB links and I have created an Oracle to Oracle LKM that has a single step to capture the source table name and DB Link so that it can be referenced by the IKM;
       <% v_src_table=odiRef.getSrcTablesList(0, "", "[SCHEMA].[TABLE_NAME]", ", ", "") + "@" + odiRef.getInfo("SRC_DSERV_NAME"); %>
    The IKM has a single step with an Oracle Insert that references the variable that was defined in the LKM;
       from <%=v_src_table%>
    The returned string is complete when referenced in a subsequent step within the LKM, however, only the schema name, table name and the '@' are returned to the IKM query. The DB link name is not. I have tried a number of different technologies and variables but I cannot pass the DB link name to the IKM.
    Does anyone know of a way to pass the string returned from getinfo  in an LKM to an IKM?

    I was able to force the LKM to evaluate SRC_DSERV_NAME by adding a step for substring. This solution does not require getFrom and is used for loading single tables across a DB Link. Views are not required.
    LKM
       <%
         String v_src_table=odiRef.getSrcTablesList(0, "", "[SCHEMA].[TABLE_NAME]", ", ", "") ;
       %>
       <?
          v_src_dserv= odiRef.getInfo("SRC_DSERV_NAME");
          v_src_dserv = v_src_dserv.substring(0);
       ?>
    IKM
       from    <%=v_src_table%>@<?=v_src_dserv?>_<%=odiRef.getInfo("DEST_DSERV_NAME")%>_extract
    Our DB Link naming convention is <src_dserv_name>_<dest_dserv_name>_EXTRACT, making the solution context aware.

Maybe you are looking for