Java.sql.SQLException: ORA-08103: object no longer exists

hi, Everyone:
i want to insert one colume to a temp table,
so i did the following
1: drop the table
2: recreate the table with the new colume in it.
we i run my application, there is a
"java sql exception ORA-08103: object no
longer exists ". looks like the table
doesn't exist in database any more. but
it is really still there.
thanks
hongjie
null

I was able to resolve this error by using on commit preserve rows, instead of on commit delete.

Similar Messages

  • ORA-08103: object no longer exists during APEX 2.2 to 3.0 upgrade

    I am trying to upgrade an APEX 2.2 installation on 10.2.0.2 Enterprise Edition on SLES-10 with 400MB shared_pool and 1 GB sga_target. During the upgrade, the session crashes due to ORA-00600: internal error code, arguments: [ktspgfb-1]. I cannot drop the FLOWS_030000 user and 523 corrupt blocks in sys7.dbf including objects source$, argument$ and obj$. So far, I have restored the database and corrupted it 3 times. Each time, I redownloaded apex.zip from technet.oracle.com.
    Here are the errors:
    ...PAGE 1300: Application Comparison
    ...PAGE 1301: Application Comparison Counts
    ...PAGE 1400: Report Layouts
    ...PAGE 1401: Create Report Layout
    ...PAGE 1402: Create Report Layout
    ...PAGE 1405: Edit Report Layout
    ...PAGE 1406: Create Report Query
    ...PAGE 1500: Application Builder
    ...PAGE 1550: User Interface Defaults
    ...PAGE 1552: UI Defaults - Column Defaults LOV
    ...PAGE 1553: UI Defaults - Column Defaults
    ...PAGE 1555: UI Defaults - Table Defaults
    begin
    ERROR at line 1:
    ORA-08103: object no longer exists
    ORA-06512: at "FLOWS_030000.WWV_FLOW_API", line 7733
    ORA-06512: at line 18
    ERROR:
    ORA-00603: ORACLE server session terminated by fatal error
    ERROR:
    ORA-03114: not connected to ORACLE
    SP2-0359: memory exhausted
    Mon Apr 30 11:31:46 2007
    Incremental checkpoint up to RBA [0x175.153ac.0], current log tail at RBA [0x175.2e77b.0]
    Mon Apr 30 11:32:05 2007
    Beginning log switch checkpoint up to RBA [0x176.2.10], SCN: 8173962186001
    Thread 1 advanced to log sequence 374
    Current log# 1 seq# 374 mem# 0: /lv01/oracle/dev10data/log01.dbf
    Mon Apr 30 11:34:24 2007
    Errors in file /lv01/oracle/dev10db/10.2.0/admin/dev10_plato/udump/dev10_ora_11590.trc:
    ORA-00600: internal error code, arguments: [ktspgfb-1], [], [], [], [], [], [], []
    Mon Apr 30 11:34:49 2007
    Errors in file /lv01/oracle/dev10db/10.2.0/admin/dev10_plato/udump/dev10_ora_11590.trc:
    ORA-00603: ORACLE server session terminated by fatal error
    ORA-00600: internal error code, arguments: [ktspgfb-1], [], [], [], [], [], [], []
    Mon Apr 30 11:35:02 2007
    Errors in file /lv01/oracle/dev10db/10.2.0/admin/dev10_plato/bdump/dev10_pmon_7541.trc:
    ORA-00600: internal error code, arguments: [ktspgfb-1], [], [], [], [], [], [], []
    Mon Apr 30 11:35:15 2007
    Errors in file /lv01/oracle/dev10db/10.2.0/admin/dev10_plato/bdump/dev10_pmon_7541.trc:
    ORA-00600: internal error code, arguments: [ktspgfb-1], [], [], [], [], [], [], []
    Mon Apr 30 11:37:18 2007
    Completed checkpoint up to RBA [0x176.2.10], SCN: 8173962186001
    Mon Apr 30 11:37:43 2007
    Errors in file /lv01/oracle/dev10db/10.2.0/admin/dev10_plato/bdump/dev10_p000_12471.trc:
    ORA-00600: internal error code, arguments: [ktspgfb-1], [], [], [], [], [], [], []
    Mon Apr 30 11:37:54 2007
    SMON: Parallel transaction recovery slave got internal error
    SMON: Downgrading transaction recovery to serial
    I now have 523 corrupt blocks in sys7.dbf:
    DBVERIFY: Release 10.2.0.2.0 - Production on Mon Apr 30 11:50:21 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    DBVERIFY - Verification starting : FILE = /lv01/oracle/dev10data/sys7.dbf
    Page 188161 is marked corrupt
    Corrupt block relative dba: 0x01c2df01 (file 7, block 188161)
    Completely zero block found during dbv:
    Page 188162 is marked corrupt
    Corrupt block relative dba: 0x01c2df02 (file 7, block 188162)
    Completely zero block found during dbv:
    Page 188163 is marked corrupt
    Corrupt block relative dba: 0x01c2df03 (file 7, block 188163)
    Completely zero block found during dbv:
    Page 188164 is marked corrupt
    Corrupt block relative dba: 0x01c2df04 (file 7, block 188164)
    Completely zero block found during dbv:
    Any ideas why this is happening? I see a number of current bugs for ORA-00600: ktspgfb-1, but most knowledge base articles refer to 9.0.1 or 9.2.

    After upgrading to 10.2.0.3 and doubling the shared_pool_size and sga_target, I was able to upgrade to APEX 3.0 without errors.

  • ORA-08103: object no longer exists

    Dear Experts,
    I have a very tricky situation here.
    A background job runs daily on our Production, which kinds of populates a lot of tables in another database (warehouse).
    This morning, the job failed with an error: ORA-08103: object no longer exists
    This error came while populating a table through a procedure.
    I checked that the procedure and table both are in valid state and there are proper grants in place.
    Also, we had faced the same problem few days back for the same table. We did not change anything. Simply re-ran the job and it went fine. Now also, we are re-running teh job and waiting to check if it goes fine.
    Any ideaas why this error would come?
    Thanks.

    Leo, Thanks very much for your inputs. The proceudre does not use any views.
    Here is the code:
    PROCEDURE GS_SKILLS_SP
    IS
    err_num NUMBER:=0;
    err_msg VARCHAR2(100):=null;
    status  VARCHAR2(1):='Y';
    proc_name VARCHAR2(60):='GS_SKILLS_SP';
    table_name VARCHAR2(100):='GS_SKILLS_DIM';
    BEGIN
    RPT_GS.Z_PRO_TRUNCATE_TABLE('GS_SKILLS_DIM');
    INSERT INTO GS.GS_SKILLS_DIM
           (SKILL_ID,
        SKILL_CODE,
        SKILL_NAME,
        DESCRIPTION,
        PARENT_SKILL_ID,
        SKILL_PATH,
        IS_ACTIVE,
        PARENT_SKILL_PATH,
        PC_ID,
        PC_NAME,
        DIS_ID,
        DIS_NAME,
        LEVEL_ID,
        LEVEL_NAME)
    SELECT  SK.SKILL_ID,
        SK.SKILL_CODE,
        SK.SKILL_NAME,
        SK.DESCRIPTION,
        SK.PARENT_SKILL_ID,
        SK.SKILL_PATH,
        SK.IS_ACTIVE,
        SK.PARENT_SKILL_PATH,
        null,
        null,
        null,
        null,
        null,
        null
    FROM    SKILLS_DIM    SK
    WHERE UPPER(SK.SKILL_CODE) LIKE 'GS%'
    AND SK.IS_ACTIVE = 'Y'
    UNION
    SELECT  SK.SKILL_ID,
        SK.SKILL_CODE,
        SK.SKILL_NAME,
        SK.DESCRIPTION,
        SK.PARENT_SKILL_ID,
        SK.SKILL_PATH,
        SK.IS_ACTIVE,
        SK.PARENT_SKILL_PATH,
        SK_ASSOC.PC_ID,
        SK_ASSOC.PC_NAME,
        SK_ASSOC.DIS_ID,
        SK_ASSOC.DIS_NAME,
        SK_ASSOC.LEVEL_ID,
            SK_ASSOC.LEVEL_NAME
    FROM    SKILLS_DIM        SK,
        SKILLS_OBS_ASSOC_DIM SK_ASSOC
    WHERE SK.SKILL_ID=SK_ASSOC.SKILL_ID
    AND UPPER(SK.SKILL_CODE) LIKE 'GS%'
    and sk.is_active='Y'
    AND SK_ASSOC.LOB_NAME = 'Global Services' ;
    COMMIT;
    INSERT INTO GS.GS_SKILLS_DIM
           (SKILL_ID,
        SKILL_CODE,
        SKILL_NAME,
        DESCRIPTION,
        PARENT_SKILL_ID,
        SKILL_PATH,
        IS_ACTIVE,
        PARENT_SKILL_PATH,
        PC_ID,
        PC_NAME,
        DIS_ID,
        DIS_NAME,
        LEVEL_ID,
        LEVEL_NAME)
    SELECT  SK.SKILL_ID,
        SK.SKILL_CODE,
        SK.SKILL_NAME,
        SK.DESCRIPTION,
        SK.PARENT_SKILL_ID,
        SK.SKILL_PATH,
        SK.IS_ACTIVE,
        SK.PARENT_SKILL_PATH,
        null,
        null,
        null,
        null,
        null,
        null
    FROM    SKILLS_DIM    SK
    /*WHERE UPPER(SK.SKILL_CODE) LIKE 'GS%'
    AND SK.IS_ACTIVE = 'Y'*/
    /*changed on 16/04/2008 for RQ34634(PRIME168) */
    where sk.is_active='Y'
    and exists(select 1 from GS.GS_RES_PROFICIENCY_DIM gs_sk where gs_sk.skill_code=sk.skill_code)
    and not exists(select 1 from gs.gs_skills_dim rpt_sk where rpt_sk.skill_code=sk.skill_code)
    UNION
    SELECT  SK.SKILL_ID,
        SK.SKILL_CODE,
        SK.SKILL_NAME,
        SK.DESCRIPTION,
        SK.PARENT_SKILL_ID,
        SK.SKILL_PATH,
        SK.IS_ACTIVE,
        SK.PARENT_SKILL_PATH,
        SK_ASSOC.PC_ID,
        SK_ASSOC.PC_NAME,
        SK_ASSOC.DIS_ID,
        SK_ASSOC.DIS_NAME,
        SK_ASSOC.LEVEL_ID,
            SK_ASSOC.LEVEL_NAME
    FROM    SKILLS_DIM        SK,
        SKILLS_OBS_ASSOC_DIM SK_ASSOC
    WHERE SK.SKILL_ID=SK_ASSOC.SKILL_ID
    /*changed on 16/04/2008 for RQ34634(PRIME168) */
    and sk.is_active='Y'
    and exists(select 1 from GS.GS_RES_PROFICIENCY_DIM gs_sk where gs_sk.skill_code=sk.skill_code)
    and not exists(select 1 from gs.gs_skills_dim rpt_sk where rpt_sk.skill_code=sk.skill_code)
    AND SK_ASSOC.LOB_NAME = 'Global' ;
    COMMIT;
    IF (err_num = 0) then
       INSERT INTO GS_ERROR
                 (PROC_NAME,
              TABLE_NAME,
                  ERR_CODE,
                  ERR_MSG,
                  CREATED_DATE,
                  STATUS)
                  VALUES(proc_name,table_name,err_num,err_msg,SYSDATE,status);
        COMMIT;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
          err_num:=SQLCODE;
          err_msg:=SUBSTR(SQLERRM,1,100);
          status:='N';
          ROLLBACK;
          INSERT INTO GS_ERROR
                 (PROC_NAME,
              TABLE_NAME,
                  ERR_CODE,
                  ERR_MSG,
                  CREATED_DATE,
                  STATUS)
                  VALUES(proc_name,table_name,err_num,err_msg,SYSDATE,status);
          COMMIT;
    END GS_SKILLS_SP;

  • Issue with Materialized View ORA-08103: object no longer exists

    I have a materialized view which gets refreshed(COMPLETE Refresh) every 2 minutes. However there are few scheduled programs which queries this materialized view, some of the queries in the scheduled program take longer to run. When the materialized view refresh time overlaps with this query executing from the program i get this error: ORA-08103: object no longer exists.
    I know that COMPLETE refresh doing TRUNCATE + INSERT is causing the issue, could someone suggest a workaround for this. But i need to do a COMPLETE refresh.

    Why would a TRUNCATE cause an "object no longer exists" ?
    Which job encounters this error ? The MV Refresh job or the programs that are querying the MV ? How does it resolve ? Automatically -- meaning that the next refresh/query does not raise the error ?

  • Error -- ORA-08103: object no longer exists

    Hi all,
    i am getting this error during calling procedure from .Net code.
    procedure is in the database.
    any help appriciated

    Connect directly to the DB where your procedure is located with the same user you use in .net to connect to DB
    Create a temp table.
    Instead of calling the procedure try selecting from the temp table.
    If you can reach that temp table you should be able to see the procedure.
    Make sure the procedure is compiled succesfully.It should be in valid state.
    Cheers!!!
    Bhushan

  • Java.sql.SQLException:ORA-01801:date format is too long for internal buffer

    Hi,
    I am getting the following exception when i trying to insert data in to a table through a stored procedure.
    oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-01801: date format is too long for internal buffer
    when execute this stored procedure from ana anonymous block , it gets executed successfully, but i use a OracleCallableStatement to execute the procedure i am getting this error.
    Please let me know how to resolve this error.
    Is this error something to do with the Database Configuration ?
    Thanks & Regards
    Meenal

    I don't know if this will help, but we were getting this error in several of the standard OA framework pages and after much pain and aggravation it was determined that visiting the Sourcing Home Page was changing the timezone. For most pages this just changed the timezone that dates were displayed in, but some had this ORA-01801 error and some others had an ORA-01830 error (date format picture ends before converting entire input string). Unfortunately, if you are not using Sourcing at your site, this probably won't help, but if you are, have a look at patch # 4519817.
    Note that to get the same error, try the following query (I got this error in 9.2.0.5 and 10.1.0.3):
    select to_date('10-Mar-2006', 'DD-Mon-YYYY________________________________________________HH24:MI:SS') from dual;
    It appears that you can't have a date format that is longer than 68 characters.

  • Oracle error 1403:java.sql.SQLException: ORA-01403: no data found ORA-06512

    My customer has an issue, and error message as below:
    <PRE>Oracle error 1403: java.sql.SQLException: ORA-01403: no data found ORA-06512:
    at line 1 has been detected in FND_SESSION_MANAGEMENT.CHECK_SESSION. Your
    session is no longer valid.</PRE>
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.
    Following is the data collection from customer:
    1. Run UNIX command to check .class file version:
    strings $JAVA_TOP/oracle/apps/bne/utilities/BneViewerUtils.class | grep Header--> S$Header: BneViewerUtils.java 120.33.12010000.17 2010/11/21 22:19:58 amgonzal s$
    2. Run SQL to check you patch level:
    SELECT * FROM fnd_product_installations WHERE patch_level LIKE '%BNE%';--> R12.BNE.B.3
    3. Run SQL to check patch '9940148' applied or not:
    SELECT * FROM ad_bugs ad WHERE ad.bug_number = '9940148';--> No Rows returned
    4. Run SQL to check patch '9785477' applied or not:
    SELECT * FROM ad_bugs WHERE bug_number in ('9785477');-->
    BUG_ID APPLICATION_SHORT_NAME BUG_NUMBER CREATION_DATE ARU_RELEASE_NAME CREATED_BY LAST_UPDATE_DATE LAST_UPDATED_BY TRACKABLE_ENTITY_ABBR BASELINE_NAME GENERIC_PATCH LANGUAGE
    576982 11839583 2011/8/7 上午 08:20:36 R12 5 2011/8/7 上午 08:20:36 5 pjt B n US
    516492 9785477 2011/6/12 上午 11:42:45 R12 5 2011/6/12 上午 11:42:45 5 bne B n US
    546109 9785477 2011/6/12 下午 01:17:41 R12 5 2011/6/12 下午 01:17:41 5 bne B n ZHT
    5. Run SQL to check the status of object ‘FND_SESSION_MANAGEMENT’
    SELECT * FROM dba_objects do WHERE do.object_name = 'FND_SESSION_MANAGEMENT';-->
    OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS TEMPORARY GENERATED SECONDARY NAMESPACE EDITION_NAME
    APPS FND_SESSION_MANAGEMENT 219425 PACKAGE 2004/10/30 下午 01:52:35 2011/8/7 上午 08:18:39 2011-08-07:08:18:26 VALID N N N 1
    APPS FND_SESSION_MANAGEMENT 226815 PACKAGE BODY 2004/10/31 上午 01:05:40 2011/8/7 上午 08:18:54 2011-08-07:08:18:27 VALID N N N 2
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? Does customer still need to apply patch '9940148' based on action plan of
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.
    Thanks,
    Jackie

    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Idle for how long? Is the issue with all sessions?
    Please see these docs/links
    User Sessions Get Timed Out Before Idle Time Parameter Values Are Reached [ID 1306678.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Timeout+AND+R12&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.Can you find any details about the error in Apache log files and in the application.log file?
    Any errors in the database log file?
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? No.
    Does customer still need to apply patch '9940148' based on action plan ofIf the issue not with Web ADI, then ignore this patch. However, if you use Web ADI you could query AD_BUGS table and verify if you have the patch applied.
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.If you could not find any details in the logs, please enable debug as per (R12, 12.1 - How To Enable and Collect Debug for HTTP, OC4J and OPMN [ID 422419.1]).
    Thanks,
    Hussein

  • Exception in thread "main" java.sql.SQLException: ORA-01704: string literal

    Hi Everyone,
    I am Using This Code to read the Mail from server and inserting those into database but i am getting error like
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import java.sql.*;
    public class ReadMail_OLD {
    static StringBuffer s= new StringBuffer();
    static StringBuffer s1= new StringBuffer();
    public static void main(String args[]) throws Exception {
    String host = "***.****.co.in";
    String user = "***@***.**.**";
    String password = "******";
    String Message_2000 = new String();
    String Message_2001 = new String();
    Connection conn;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@1.2.3.5:1050:abcgdb", "abc", "efg");
    Statement stm = conn.createStatement();
    String strsql = "insert into READ_MAIL_MSG (MESSAGE_ID,SENT_DATE,MAIL_FROM,MAIL_TO,MAIL_SUBJECT,MESSAGE) values (" ;
    // Get system properties
    Properties properties = System.getProperties();
    // Get the default Session object.
    Session session = Session.getDefaultInstance(properties);
    // Get a Store object that implements the specified protocol.
    Store store = session.getStore("pop3");
    //Connect to the current host using the specified username and password.
    store.connect(host, user, password);
    //Create a Folder object corresponding to the given name.
    Folder folder = store.getFolder("inbox");
    // Open the Folder.
    folder.open(Folder.READ_ONLY);
    Message[] message = folder.getMessages();
    // Display message.
    for (int i = 0; i < message.length; i++)
    //System.out.println("------------ Message " + (i + 1) + " ------------");
    //System.out.println("SentDate : " + message.getSentDate());
    //System.out.println("From : " + message[i].getFrom()[0]);
    //System.out.println("Subject : " + message[i].getSubject());
    //System.out.print("Message : ");
    InputStream stream = message[i].getInputStream();
    int j = 0;
    Message_2000 = "";
    Message_2001 = "";
    while(stream.available()>0 && j < 500)
    // read the byte and convert the integer to character
    s.append((char) stream.read());
    j = j+1;
    Message_2000 = s.toString();
    Message_2001 = Message_2000.replace("'"," ");
    System.out.println(strsql+"'"+(i + 1)+"','"+message[i].getSentDate()+"','"+message[i].getFrom()[0]+"','***@***.co.in','"+message[i].getSubject()+"','"+s.toString()+"')");
    stm.execute(strsql+"'"+(i + 1)+"','"+message[i].getSentDate()+"','"+message[i].getFrom()[0]+"','***@****.co.in','"+message[i].getSubject()+"','"+Message_2001+"')");
    folder.close(true);
    store.close();
    when i execute this some messages get inserted into table but for some messages
    Exception in thread "main" java.sql.SQLException: ORA-01704: string literal too long
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1141)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2149)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2032)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2894)
    at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:942)
    at ReadMail_OLD.main(ReadMail_OLD.java:64)
    Edited by: 997089 on May 1, 2013 9:29 PM
    Edited by: 997089 on May 1, 2013 9:30 PM

    Hi All,
    Thanks for Your Reply .
    I got the answer i have made a mistake in loop after every iteration i have not cleared the stringBuffer Varaible so the after one or two iteration it givesthe error.
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import java.sql.*;
    public class ReadMail_OLD {
    static StringBuffer s= new StringBuffer();
    static StringBuffer s1= new StringBuffer();
    public static void main(String args[]) throws Exception {
    String host = "***.****.co.in";
    String user = "***@***.**.**";
    String password = "******";
    String Message_2000 = new String();
    String Message_2001 = new String();
    Connection conn;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@1.2.3.5:1050:abcgdb", "abc", "efg");
    Statement stm = conn.createStatement();
    String strsql = "insert into READ_MAIL_MSG (MESSAGE_ID,SENT_DATE,MAIL_FROM,MAIL_TO,MAIL_SUBJECT,MESSAGE) values (" ;
    // Get system properties
    Properties properties = System.getProperties();
    // Get the default Session object.
    Session session = Session.getDefaultInstance(properties);
    // Get a Store object that implements the specified protocol.
    Store store = session.getStore("pop3");
    //Connect to the current host using the specified username and password.
    store.connect(host, user, password);
    //Create a Folder object corresponding to the given name.
    Folder folder = store.getFolder("inbox");
    // Open the Folder.
    folder.open(Folder.READ_ONLY);
    Message[] message = folder.getMessages();
    // Display message.
    for (int i = 0; i < message.length; i++)
    //System.out.println("------------ Message " + (i + 1) + " ------------");
    //System.out.println("SentDate : " + message.getSentDate());
    //System.out.println("From : " + message.getFrom()[0]);
    //System.out.println("Subject : " + message.getSubject());
    //System.out.print("Message : ");
    InputStream stream = message.getInputStream();
    int j = 0;
    Message_2000 = "";
    Message_2001 = "";
    while(stream.available()>0 && j < 500)
    // read the byte and convert the integer to character
    s.append((char) stream.read());
    j = j+1;
    Message_2000 = s.toString();
    Message_2001 = Message_2000.replace("'"," ");
    System.out.println(strsql+"'"+(i + 1)+"','"message.getSentDate()"','"message.getFrom()[0]"','***@****.co.in','"message.getSubject()"','"s.toString()"')");
    stm.execute(strsql+"'"+(i + 1)+"','"message.getSentDate()"','"message.getFrom()[0]"','***@****.co.in','"message.getSubject()"','"Message_2001"')");
    s.delete(0, s.length());
    folder.close(true);
    store.close();
    Thanks for Reply
    Edited by: 997089 on May 1, 2013 9:28 PM
    Edited by: 997089 on May 1, 2013 9:30 PM

  • Caused by: java.sql.SQLException: ORA-00060: deadlock detected while waitin

    Hi,
    I'm getting following exception:
    Caused by: net.sf.hibernate.exception.GenericJDBCException: could not update: [com.sample.database.hibernate.mappings.reference.impl.TaskImpl#156979998]
         at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90)
         at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:79)
         at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:30)
         at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1332)
         at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:683)
         at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:623)
         at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52)
         at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2438)
         at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
         at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2260)
         at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
         at com.sample.database.hibernate.util.HibernateUtil.doSessionWork(HibernateUtil.java:83)
         ... 8 more
    Caused by: java.sql.SQLException: ORA-00060: deadlock detected while waiting for resource
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:158)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:685)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1138)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3018)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3090)
         at com.mchange.v2.sql.filter.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:71)
         at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:666)
         ... 15 more
    what could be the reason??
    thanks.

    The error is coming from an application. Please check the alert log file of the database and further there will be a trace file mentioned in the alert log file in which you will have information of the object which is causing deadlock.
    Regards

  • JDeveloper tutorial fails with java.sql.SQLException: ORA-00600

    In following the steps to the JDeveloper tutorial, after I successfully created and tested my connections, I proceeded on to run ImageLoader.java (Under DatabaseSetup.jws), and it returns an exception. The debug output log is as follows:
    Diagnostics: Routing diagnostics to standard output (use -Djbo.debugoutput=silent to remove)
    Successfully loaded properties file using: getResourceAsStream("/oracle/jbo/common/Diagnostic.properties");
    [00] Diagnostic Properties: Timing:false Functions:false Linecount:true Threshold:6
    [01] CommonMessageBundle (language base) being initialized
    [02] Stringmanager using default locale: 'null'
    [03] BC4JDeployPlatform: LOCAL
    [04] Propertymanager: searching for file and system based properties
    [05] {{ begin Loading BC4J properties
    [06] -----------------------------------------------------------
    [07] BC4J Property jbo.default.language='en' -->(MetaObjectManager) from System Default
    [08] BC4J Property jbo.default.country='US' -->(MetaObjectManager) from System Default
    [09] BC4J Property DeployPlatform='LOCAL' -->(SessionImpl) from Client Environment
    [10] Skipping empty Property ConnectionMode from System Default
    [11] Skipping empty Property HostName from System Default
    [12] Skipping empty Property ConnectionPort from System Default
    [13] Skipping empty Property ApplicationPath from System Default
    [14] Skipping empty Property java.naming.security.principal from System Default
    [15] Skipping empty Property java.naming.security.credentials from System Default
    [16] BC4J Property jbo.use.pers.coll='false' -->(SessionImpl) from System Default
    [17] BC4J Property jbo.pers.max.rows.per.node='70' -->(SessionImpl) from System Default
    [18] BC4J Property jbo.pers.max.active.nodes='10' -->(SessionImpl) from System Default
    [19] BC4J Property jbo.pcoll.mgr='oracle.jbo.pcoll.OraclePersistManager' -->(SessionImpl) from System Default
    [20] BC4J Property jbo.fetch.mode='AS.NEEDED' -->(MetaObjectManager) from System Default
    [21] Skipping empty Property JBODynamicObjectsPackage from System Default
    [22] BC4J Property MetaObjectContextFactory='oracle.jbo.server.xml.DefaultMomContextFactory' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [23] BC4J Property MetaObjectContext='oracle.jbo.server.xml.XMLContextImpl' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [24] BC4J Property java.naming.factory.initial='oracle.jbo.common.JboInitialContextFactory' -->(SessionImpl) from Client Environment
    [25] BC4J Property IsLazyLoadingTrue='true' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [26] BC4J Property ActivateSharedDataHandle='false' -->(MetaObjectManager) from System Default
    [27] Skipping empty Property HandleName from System Default
    [28] Skipping empty Property Factory-Substitution-List from System Default
    [29] Skipping empty Property jbo.project from System Default
    [30] BC4J Property jbo.max.cursors='50' -->(MetaObjectManager) from System Default
    [31] BC4J Property jbo.dofailover='true' -->(MetaObjectManager) from System Default
    [32] BC4J Property jbo.doconnectionpooling='false' -->(MetaObjectManager) from System Default
    [33] BC4J Property jbo.recyclethreshold='10' -->(MetaObjectManager) from System Default
    [34] BC4J Property jbo.passivationstore='null' -->(MetaObjectManager) from System Default
    [35] BC4J Property RELEASE_MODE='Reserved' -->(MetaObjectManager) from System Default
    [36] BC4J Property jbo.maxpoolcookieage='-1' -->(MetaObjectManager) from System Default
    [37] Skipping empty Property PoolClassName from System Default
    [38] BC4J Property jbo.maxpoolsize='2147483647' -->(MetaObjectManager) from System Default
    [39] BC4J Property jbo.initpoolsize='0' -->(MetaObjectManager) from System Default
    [40] BC4J Property jbo.poolrequesttimeout='30000' -->(MetaObjectManager) from System Default
    [41] BC4J Property jbo.assoc.consistent='true' -->(MetaObjectManager) from System Default
    [42] BC4J Property jbo.SQLBuilder='Oracle' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [43] BC4J Property jbo.ConnectionPoolManager='oracle.jbo.server.ConnectionPoolManagerImpl' -->(MetaObjectManager) from System Default
    [44] BC4J Property jbo.TypeMapEntries='Oracle' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [45] BC4J Property jbo.jdbc.trace='false' -->(MetaObjectManager) from System Default
    [46] BC4J Property oracle.jbo.defineColumnLength='true' -->(MetaObjectManager) from System Default
    [47] Skipping empty Property jbo.tmpdir from System Default
    [48] Skipping empty Property jbo.server.internal_connection from System Default
    [49] Skipping empty Property SessionClass from System Default
    [50] Skipping empty Property TransactionFactory from System Default
    [51] BC4J Property jbo.debugoutput='console' -->(Diagnostic) from System Property
    [52] BC4J Property jbo.debug.prefix='DBG' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [53] BC4J Property jbo.logging.show.timing='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [54] BC4J Property jbo.logging.show.function='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [55] BC4J Property jbo.logging.show.level='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [56] BC4J Property jbo.logging.show.linecount='true' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [57] BC4J Property jbo.logging.trace.threshold='6' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [58] BC4J Property jbo.jdbc.driver.verbose='false' -->(Diagnostic) from System Default
    [59] BC4J Property jbo.ejb.txntimeout='60' -->(SessionImpl) from System Default
    [60] BC4J Property jbo.ejb.txntype='global' -->(MetaObjectManager) from System Default
    [61] Skipping empty Property oracle.jbo.schema from System Default
    [62] WARNING: Unused property: LC='Calling Function' found in /oracle/jbo/common/Diagnostic.properties resource
    [63] }} finished loading BC4J properties
    [64] -----------------------------------------------------------
    Diagnostics: Routing diagnostics to standard output (use -Djbo.debugoutput=silent to remove)
    [65] Diagnostic Properties: Timing:false Functions:false Linecount:true Threshold:6
    [66] JavaVMVersion: 1.2.351 odv
    [67] JavaVMVendor: Oracle Corp.
    [68] JavaVMName: OJVM VM
    [69] OperatingSystemName: Windows NT
    [70] OperatingSystemVersion: 5.0
    [71] OperatingSystemUsername: Administrator
    [72] Connected to Oracle JBO Server - Version: 3.2.9.76.3
    [73] {{+++ id=10000 type: 'BC4J_CREATE_ROOTAM' Create Root Application Module 'ImageLoader.ImageLoaderModule'
    [74] {{+++ id=10001 type: 'METAOBJECT_LOAD' Loading meta-object: ImageLoader.ImageLoaderModule
    [75] {{+++ id=10002 type: 'METAOBJECT_LOAD' Loading meta-object: ImageLoader.ImageLoader
    [76] Loading from /ImageLoader/ImageLoader.xml file
    [77] Loading from indvidual XML files
    [78] Loading the Containees for the Package 'ImageLoader.ImageLoader'.
    [79] }}+++ End Event10003 null
    [80] Loading from /ImageLoader/ImageLoaderModule.xml file
    [81] }}+++ End Event10002 null
    [82] {{+++ id=10003 type: 'METAOBJECT_LOAD' Loading meta-object: ImageLoader.InventoryItem1View
    [83] Loading from /ImageLoader/InventoryItem1View.xml file
    [84] ViewObjectImpl's default fetch mode = 0
    [85] {{+++ id=10004 type: 'METAOBJECT_LOAD' Loading meta-object: ImageLoader.InventoryItem
    [86] Loading from /ImageLoader/InventoryItem.xml file
    [87] Loading Typemap entries from oracle.jbo.server.OracleTypeMapEntries
    [88] CSMessageBundle (language base) being initialized
    [89] }}+++ End Event10005 null
    [90] OracleSQLBuilder reached getInterface
    [91] Oracle SQL Builder Version 3.2.0.0.0
    [92] }}+++ End Event10004 null
    [93] {{+++ id=10005 type: 'BC4J_CREATE_VIEWOBJECT' Create ViewObject 'InventoryItem1View'
    [94] }}+++ End Event10006 null
    [95] Created root application module: 'ImageLoader.ImageLoaderModule'
    [96] Locale is: 'en_US'
    [97] }}+++ End Event10001 null
    [98] Using DatabaseTransactionFactory implementation oracle.jbo.server.DatabaseTransactionFactory
    [99] DBTransactionImpl Max Cursors is 50
    [100] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    [101] {{+++ id=10006 type: 'JDBC_CONNECT' null
    [102] Trying connection/1: url='jdbc:oracle:thin:bc4j/bc4j@localhost:1521:oracle9i'...
    [103] }}+++ End Event10007 null
    [104] Successfully logged in
    [105] JDBCDriverVersion: 8.1.7.0.0
    [106] DatabaseProductName: Oracle
    [107] DatabaseProductVersion: Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production With the Partitioning option JServer Release 9.0.1.1.1 - Production
    [108] Column count: 8
    [109] {{+++ id=10007 type: 'EXECUTE_QUERY' ViewObject executeQueryForCollection InventoryItem1View
    [110] {{+++ id=10008 type: 'VIEWOBJECT_GETSTATEMENT' Viewobject: InventoryItem1View getting prepared statement
    [111] ViewObject : Created new QUERY statement
    [112] SELECT InventoryItem.ID, InventoryItem.NAME, InventoryItem.DESCRIPTION, InventoryItem.IMAGE, InventoryItem.PRICE, InventoryItem.ONHAND, InventoryItem.SUPPLIER_ID, InventoryItem.CATEGORY_ID FROM INVENTORY_ITEM InventoryItem
    [113] {{+++ id=10009 type: 'JDBC_CREATE_STATEMENT' createPreparedStatement - prefetch size: 1
    [114] }}+++ End Event10010 null
    [115] }}+++ End Event10009 ViewObject : Creating new QUERY statementSELECT InventoryItem.ID, InventoryItem.NAME, InventoryItem.DESCRIPTION, InventoryItem.IMAGE, InventoryItem.PRICE, InventoryItem.ONHAND, InventoryItem.SUPPLIER_ID, InventoryItem.CATEGORY_ID FROM INVENTORY_ITEM InventoryItem
    [116] QueryCollection.executeQuery failed...
    [117] java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []
         java.lang.Class java.net.URLClassLoader.findClass(java.lang.String)
         java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean)
         java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean)
         java.lang.Class sun.misc.Launcher$AppClassLoader.loadClass(java.lang.String, boolean)
         java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)
         java.util.Enumeration oracle.jbo.common.WeakHashtableImpl.elements()
         java.util.Enumeration oracle.jbo.common.WeakHashtable.elements()
         void oracle.jbo.server.ViewObjectImpl.freeStatement(java.sql.PreparedStatement, boolean)
         void oracle.jbo.server.QueryCollection.executeQuery(java.lang.Object[], int)
         void oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(java.lang.Object, java.lang.Object[], int)
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
         void oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed()
         boolean oracle.jbo.server.ViewRowSetIteratorImpl.hasNext()
         boolean oracle.jbo.server.ViewRowSetImpl.hasNext()
         boolean oracle.jbo.server.ViewObjectImpl.hasNext()
         void ImageLoader.ImageLoader.main(java.lang.String[])
    [118] SELECT InventoryItem.ID, InventoryItem.NAME, InventoryItem.DESCRIPTION, InventoryItem.IMAGE, InventoryItem.PRICE, InventoryItem.ONHAND, InventoryItem.SUPPLIER_ID, InventoryItem.CATEGORY_ID FROM INVENTORY_ITEM InventoryItem
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT InventoryItem.ID, InventoryItem.NAME, InventoryItem.DESCRIPTION, InventoryItem.IMAGE, InventoryItem.PRICE, InventoryItem.ONHAND, InventoryItem.SUPPLIER_ID, InventoryItem.CATEGORY_ID FROM INVENTORY_ITEM InventoryItem
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
         void oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed()
         boolean oracle.jbo.server.ViewRowSetIteratorImpl.hasNext()
         boolean oracle.jbo.server.ViewRowSetImpl.hasNext()
         boolean oracle.jbo.server.ViewObjectImpl.hasNext()
         void ImageLoader.ImageLoader.main(java.lang.String[])
    ## Detail 0 ##
    java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
         void oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed()
         boolean oracle.jbo.server.ViewRowSetIteratorImpl.hasNext()
         boolean oracle.jbo.server.ViewRowSetImpl.hasNext()
         boolean oracle.jbo.server.ViewObjectImpl.hasNext()
         void ImageLoader.ImageLoader.main(java.lang.String[])
    Exception in thread main
    At first I thought maybe this is a configuration specific problem -- but I was able to replicate this on two separate machine with clean Win2K and Oracle9i installs.
    It seems like it is not finding a particular class, which leads me to believe that some particular jar is probably missing -- can anyone help me figure out which one? Or is there something else that may be going wrong?
    TIA

    You need to make sure you're using the Oracle9i JDBC driver, or using the Oracle 8.1.7.2 JDBC driver as I mentioned above.
    If you are using JDeveloper9i release 9.0.2 or 9.0.3, the driver you need is in <jdevhome>\jdbc\lib
    Otherwise, you can also download the drivers from OTN.

  • Java.sql.SQLException: ORA-01031: insufficient privileges

    Hi I'm using oracle 8.1.6 here is a small code
    import java.sql.*;
    import oracle.jdbc.driver.*;
    class JDBCVersion
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver
    (new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@DEV","test","test");
    // Create Oracle DatabaseMetaData object
    DatabaseMetaData meta = conn.getMetaData ();
    // gets driver info:
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    it gives an exception
    java.sql.SQLException: ORA-01031: insufficient privileges
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1597)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:354)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at JDBCVersion.main(JDBCVersion.java:12)
    has anyone got an idea.. what's happening..TNS is set .. and if i use thin driver.. instead of oci.. it runs fine.. infact on oracle user env .. it runs ok.. but with any other unix user.. it gives this exception.. i tried .. using the same env variables in oracle user too..
    thanks a lot
    -alok

    I think it's not oracle privileges ... as i have tried with dba privilege and without dba privileges, the same thing runs as oracle (unix) user.. but not by any other user.... any clues??
    -alok
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alok Gupta:
    Hi I'm using oracle 8.1.6 here is a small code
    import java.sql.*;
    import oracle.jdbc.driver.*;
    class JDBCVersion
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver
    (new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@DEV","test","test");
    // Create Oracle DatabaseMetaData object
    DatabaseMetaData meta = conn.getMetaData ();
    // gets driver info:
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    it gives an exception
    java.sql.SQLException: ORA-01031: insufficient privileges
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1597)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:354)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at JDBCVersion.main(JDBCVersion.java:12)
    has anyone got an idea.. what's happening..TNS is set .. and if i use thin driver.. instead of oci.. it runs fine.. infact on oracle user env .. it runs ok.. but with any other unix user.. it gives this exception.. i tried .. using the same env variables in oracle user too..
    thanks a lot
    -alok<HR></BLOCKQUOTE>
    null

  • Java.sql.SQLException: ORA-01002: fetch out of sequence

    We are getting 'Fetch out of sequence' error whrn we try to execute a 'for update' query.
    We are first inserting values into the DLX_ASSET table and if there is image to be inserted the particualr row is fetched using the query. The insert query inserts values into the database.
    'SELECT HIGH_RES_IMAGE FROM DLX_ASSET WHERE ASSET_ID ="+assetId+ " FOR UPDATE'. While executing this query we are getting this exception. This is not happening when we are trying it from our local machine. But its happening everywhere else where its deployed.
    We are using Websphere Application Server 6 and Oracle 9i. We have set autommit to false before the method is called and are commiting the transaction only after the whole set of queries are executed.
    Please see below the code snippet,
                                  /* UPDATE HIGH RESOLUTION IMAGE INTO DLX_ASSET TABLE */
                                  logger.logInfo("inside IF condition ,,,,,,,,,,,"+assetId);
                                  String query ="SELECT HIGH_RES_IMAGE FROM DLX_ASSET WHERE ASSET_ID ="+assetId+ " FOR UPDATE ";
                                  logger.logInfo("QUERY is...."+query);
                                  logger.logInfo("Connection closed:"+ con.isClosed());
                                  psHighResObj =(OraclePreparedStatement) con.prepareStatement(query);
                                  logger.logInfo("inside updating high res AFTER prepare statement"+psHighResObj);
                                  rsHighRes = (OracleResultSet) psHighResObj.executeQuery();                              logger.logInfo("inside updating high res image 1");
                                  while (rsHighRes.next()) {
                                       logger.logInfo("inside while high res image 2");
                                       highResImg =(OrdImage)rsHighRes.getCustomDatum(1,OrdImage.getFactory());
                                       highResImg.loadDataFromInputStream(assetCustomTo.getHighResolutionImageIn());
                                       assetCustomTo.getHighResolutionImageIn().close();
                                       logger.logInfo("before update high res");
                                       UPDATE_QRY = "UPDATE DLX_ASSET SET HIGH_RES_IMAGE = ? WHERE ASSET_ID=" + assetId;
                                       stmt1 =(OraclePreparedStatement) con.prepareCall(UPDATE_QRY);
                                       highResImg.setSource(assetCustomTo.getHighresFileType(),"",assetCustomTo.getSys_file_name1());
                                       highResImg.setContentLength(Integer.parseInt(assetCustomTo.getHighresFileSize()));
                                       highResImg.setProperties();
                                       logger.logInfo(" after update query asset id: " + assetId);
                                       logger.logInfo(" query high res:: " + UPDATE_QRY);
                                       stmt1.setCustomDatum(1, highResImg);
                                       stmt1.execute();
                                       logger.logInfo("after update high res");
                                  //checking if thumbnail is present: if bulk upload thumb nail won't be present
    the exception is occuring in the line 'rsHighRes = (OracleResultSet) psHighResObj.executeQuery();'
    This is exception trace
    java.sql.SQLException: ORA-01002: fetch out of sequence
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java(Inlined Compiled Code))
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java(Compiled Code))
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java(Compiled Code))
    at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:1198)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2400)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
    at com.deluxe.imax.dataaccess.impl.extended.TelevisionAssetCustomDAOImpl.createWebElectronicTrailersAsset(Unknown Source)
    at com.deluxe.imax.business.television.ejb.TelevisionFacadeJBean.createWebElectronicTrailersAsset(Unknown Source)
    at com.deluxe.imax.business.television.handler.TelevisionHandler.createWebElectronicTrailersAsset(Unknown Source)
    at com.deluxe.imax.business.television.action.WebNewAction.processExecute(Unknown Source)
    at com.deluxe.imax.business.framework.BaseAction.execute(Unknown Source)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1284)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1241)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:136)
    at com.deluxe.imax.business.framework.security.SecurityFilter.doFilter(Unknown Source)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:671)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3003)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)
    at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1958)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:88)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.ja
    Please share your feedback.
    Thanks in advance!
    Edited by: Sanu Sasidharan on May 11, 2011 4:26 AM

    Hi Peter,
    We tried pointing to the same database from local as well as QA. Works from local but not from QA.
    assetId is the generated primary key in the same method.
    Yes the exception is thrown from execute statement itself. the logger put just after the execute is not coming.
    This is the method
    public boolean createWebElectronicTrailersAsset(TelevisionResultDTO[] teleResultDTO, OracleConnection con) throws DAOException {
              methodName ="createWebElectronicTrailersAsset(TelevisionResultDTO[] teleResultDTO,OracleConnection con) :: ";
              //Value to be returned by method
              boolean createInd = false;
              OraclePreparedStatement psHighResObj = null;
              OraclePreparedStatement psThumbnailObj = null;
              OracleResultSet rsHighRes = null;
              OracleResultSet rsThumbnail = null;
              PreparedStatement psmt = null;
              OraclePreparedStatement stmt1 = null;
              OraclePreparedStatement stmt2 = null;
              OrdImage highResImg = null;
              OrdImage thumbnailImg = null;
              ImaxGroupsTO groupsTO = null;
              try {
                   long tvAssetId = 0;
                   long assetId = 0;
                   long cst_dwnld_asset_id = 0;
                   AssetCustomTO assetCustomTo = null;
                   AssetCustomDownloadTO assetCustDwnldTO = null;
                   CustomTVAssetTO tvAssetTo = null;
                   String DLX_ASSET_QRY = "";
                   String UPDATE_QRY = "";
                   String DLX_ASSET_TV_QRY = "";
                   String DLX_CUSTOM_DOWNLOAD_ASSET = "";
                   int k = 1;
                   for (int iCount = 0; iCount < teleResultDTO.length; iCount++) {
                        tvAssetId = (int) OraclePKGenerator.getInstance().getKey(InternalConstants.TV_ASSET_SEQUENCE);
                        assetId =(long) OraclePKGenerator.getInstance().getKey(InternalConstants.ASSET_SEQUENCE);
                        assetCustomTo = teleResultDTO[iCount].getAssetCustomTO();
                        tvAssetTo = teleResultDTO[iCount].getTv_Asset();
                        groupsTO= teleResultDTO[iCount].getGroupsTO();
                        if (assetCustomTo.getHighResolutionImageIn() != null) {
                             DLX_ASSET_QRY ="INSERT INTO DLX_ASSET("
                                                      + "ASSET_ID,"
                                                      + "CREATED_BY,"
                                                      + "CREATED_DATE,"
                                                      + "REVISED_BY,"
                                                      + "REVISED_DATE,"
                                                      + "FILE_NAME,"
                                                      + "FILE_SIZE,"
                                                      + "FILE_TYPE,"
                                                      + "SYS_FILE_NAME,"
                                                      + "HIGH_RES_IMAGE,"
                                                      + "THUMBNAIL_IMAGE,"
                                                      + "ASSET_STATUS_ID,"
                                                      + "DMX_PART1_REF,"
                                                      + "DMX_PRODUCT_ID_REF,"
                                                      + "DMX_PRODUCT_DESC_REF,"
                                                      + "ASSET_AVAIL_1_IND,"
                                                      + "DMX_PART_2,"
                                                      + "DMX_PRODUCT_2,"
                                                      + "DMX_PRODUCT_DESC_2,"
                                                      + "ASSET_AVAIL_2_IND,"
                                                      + "EFFECTIVE_DATE,"
                                                      + "EXPIRATION_DATE,"
                                                      + "FILE_NAME1,"
                                                      + "SYS_FILE_NAME1,"
                                                      + "ASSET_TYPE_ID,"
                                                      + "MATERIALS_CATEGORY,"
                                                      + "PART_1_NOTES,"
                                                      + "PART_2_NOTES,"
                                                      + "PHY_ORDER_STATUS)"
                                                      + "VALUES (?,?,SYSDATE,?,SYSDATE,?,?,?,?,ORDSYS.ORDImage.init(),"
                                                      +" ORDSYS.ORDImage.init(),?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                        }else if(){
    // condition if images are not uploaded
                             psmt = con.prepareStatement(DLX_ASSET_QRY);
                             k=1;
                             psmt.setLong(k++, assetId);
                             psmt.setString(k++, assetCustomTo.getCreated_by());
                             psmt.setString(k++, assetCustomTo.getRevised_by());
                             if(assetCustomTo.getAssetTextIn()!=null ){
                                  psmt.setString(k++, assetCustomTo.getFile_name());
                                  psmt.setString(k++, assetCustomTo.getFile_size());
                                  psmt.setString(k++, assetCustomTo.getFile_type());
                                  psmt.setString(k++, assetCustomTo.getSys_file_name());
                                  /* UPLOAD PREVIEW VIDEO FILE INTO FILE SYSTEM .....*/
                                  Util.upLoadFile(assetCustomTo.getAssetTextIn(),assetCustomTo.getSys_file_name());     
                             }else if(assetCustomTo.getAssetTextIn()==null && assetCustomTo.getSys_file_name() != null
                                            && assetCustomTo.getSys_file_name().trim().length() != 0){
                                       psmt.setString(k++, assetCustomTo.getFile_name());
                                       psmt.setString(k++, assetCustomTo.getFile_size());
                                       psmt.setString(k++, assetCustomTo.getFile_type());
                                       psmt.setString(k++, assetCustomTo.getSys_file_name());
                             } else{
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                             psmt.setLong(k++, assetCustomTo.getAsset_status_id());
                             if(assetCustomTo.getDmx_product_desc_1()!=null && assetCustomTo.getDmx_product_desc_1().trim().length()!=0){
                                  psmt.setLong(k++, assetCustomTo.getDmx_part_1());
                                  psmt.setLong(k++, assetCustomTo.getDmx_productId_1());
                                  psmt.setString(k++, assetCustomTo.getDmx_product_desc_1());
                                  psmt.setString(k++, assetCustomTo.getAsset_order_status_1());                    
                             }else{
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getDmx_product_desc_2()!=null && assetCustomTo.getDmx_product_desc_2().trim().length()!=0){
                                  psmt.setLong(k++, assetCustomTo.getDmx_part_2());
                                  psmt.setLong(k++, assetCustomTo.getDmx_productId_2());
                                  psmt.setString(k++, assetCustomTo.getDmx_product_desc_2());
                                  psmt.setString(k++, assetCustomTo.getAsset_order_status_2());                    
                             }else{
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getEffectiveDate()!=null){
                                  psmt.setTimestamp(k++, assetCustomTo.getEffectiveDate());
                             }else{
                                  psmt.setNull(k++,Types.TIMESTAMP);
                             if(assetCustomTo.getExpirationDate()!=null){
                                  psmt.setTimestamp(k++, assetCustomTo.getExpirationDate());     
                             }else{
                                  psmt.setNull(k++,Types.TIMESTAMP);
                             psmt.setString(k++, assetCustomTo.getHighresFileName());     
                             if(assetCustomTo.getSys_file_name1()!=null && assetCustomTo.getSys_file_name1().trim().length()!=0){
                                  psmt.setString(k++, assetCustomTo.getSys_file_name1());
                             }else{
                                  psmt.setNull(k++, Types.VARCHAR);
                             psmt.setLong(k++, assetCustomTo.getAsset_type_id());
                             psmt.setLong(k++, assetCustomTo.getMaterialCategory());
                             if(assetCustomTo.getPart_notes_1()!=null && assetCustomTo.getPart_notes_1().trim().length()!=0){
                                  psmt.setString(k++, assetCustomTo.getPart_notes_1());
                             }else{
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getPart_notes_2()!=null && assetCustomTo.getPart_notes_2().trim().length()!=0){
                                  psmt.setString(k++, assetCustomTo.getPart_notes_2());
                             }else{
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getDmx_product_desc_1()!=null){
                                  psmt.setLong(k++,assetCustomTo.getPhy_asset_status());     
                             }else{
                                  psmt.setNull(k++,Types.INTEGER);
                             psmt.execute();
                             if (assetCustomTo.getHighResolutionImageIn() != null) {
                                  /* UPDATE HIGH RESOLUTION IMAGE INTO DLX_ASSET TABLE */
                                  logger.logInfo("inside IF condition ,,,,,,,,,,,"+assetId);
                                  String query ="SELECT HIGH_RES_IMAGE FROM DLX_ASSET WHERE ASSET_ID ="+assetId+ " FOR UPDATE ";
                                  psHighResObj =(OraclePreparedStatement) con.prepareStatement(query);
                                  logger.logInfo("inside updating high res AFTER prepare statement"+psHighResObj);
                                  rsHighRes = (OracleResultSet) psHighResObj.executeQuery();
                                  while (rsHighRes.next()) {
                                       highResImg =(OrdImage)rsHighRes.getCustomDatum(1,OrdImage.getFactory());
                                       highResImg.loadDataFromInputStream(assetCustomTo.getHighResolutionImageIn());
                                       assetCustomTo.getHighResolutionImageIn().close();
                                       UPDATE_QRY = "UPDATE DLX_ASSET SET HIGH_RES_IMAGE = ? WHERE ASSET_ID=" + assetId;
                                       stmt1 =(OraclePreparedStatement) con.prepareCall(UPDATE_QRY);
                                       highResImg.setSource(assetCustomTo.getHighresFileType(),"",assetCustomTo.getSys_file_name1());
                                       highResImg.setContentLength(Integer.parseInt(assetCustomTo.getHighresFileSize()));
                                       highResImg.setProperties();
                                       stmt1.setCustomDatum(1, highResImg);
                                       stmt1.execute();
    The connection in the method is passed from the service layer.
    Thanks
    Edited by: Sanu Sasidharan on May 12, 2011 2:30 AM

  • Exception in thread "main" java.sql.SQLException: ORA-00604

    Just tried to compile the code "Example 2-1 Determing the JDBC Driver Version" from "2day plus Java Developoer Guide"..
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.jdbc.pool.OracleDataSource;
    public class JDBCVersion
    public static void main (String args[]) throws SQLException
    OracleDataSource ods = new OracleDataSource();
    ods.setURL("jdbc:oracle:thin:hr/hr@localhost:1521/XE");
    Connection conn = ods.getConnection();
    // Create Oracle DatabaseMetaData object
    DatabaseMetaData meta = conn.getMetaData();
    // gets driver info:
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    So, when I have to execute this programm:
    Exception in thread "main" java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
    ORA-12705: Cannot access NLS data files or invalid environment specified
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
    at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:785)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:362)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
    at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:297)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:221)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:165)
    at oracle.JDBCVersion.main(JDBCVersion.java:12)
    Pls, help me w/that. TNX.

    Hi,
    I remember it also doesn't work for me. Try this:
    DriverManager.getConnection("jdbc:oracle:thin:@<mc-name>:<port-no>:<sid>", "scott", "tiger");
    Kuba

  • Mysterious java.sql.SQLException: ORA-00600:

    Hi All,
    I'm running oracle 9.0.2 on windows xp, 512meg mem.
    No problem accessing the db via isql, no problem with jdbc
    doing inserts but can't query?!
    DriverManager.registerDriver((Driver)drvClass.newInstance());
    m_con = DriverManager.getConnection(jdbc:oracle:thin:@127.0.0.1:1521:oracle, "SCOTT","TIGER");
    stmt = m_con.createStatement();
    rs = stmt.executeQuery("SELECT EMPNO,ENAME FROM EMP WHERE EMPNO=7900");
    while(rs.next()) System.out.println(rs.getString("ENAME"));
    Running the above gets this result:
    java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
         at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:889)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1681)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1870)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:538)
         at testprg.DbTest2.main(DbTest2.java:17)
    Exception in thre[i]Long postings are being truncated to ~1 kB at this time.

    Take a look at the version of the JDBC driver. There a thread in a metalink forum regarding the same 600 error.
    Ken

  • Java.sql.SQLException: ORA-01006: bind variable does not exist

    The java code is given below...
    /*UPDATE D9T652_DISBRSMNT_PRMTR
                        SET
                             Stmnt_Page_Wgt_Ozs = wtStatementStockSheet,
                        Chk_Page_Wgt_Ozs = wtCheckStockSheet,
                        Flat_Envelope_Wgt_Ozs = wtFlatEnv,
                        Half_Fold_Envelope_Wgt_Ozs = wtHalfFoldEnv,
                        Last_Chngd_By = TRIM(userId),
                        Last_Chngd_Dt = sysdate
                        WHERE
                             Ins_Sys_Id = Ins_Sys_Id_Constant_For_Compass AND
                             Last_Chngd_Dt = SELECT MAX(Last_Chngd_Dt)
              FROM D9T652_DISBRSMNT_PRMTR
              WHERE Ins_Sys_Id = Ins_Sys_Id_Constant_For_Compass
    updateDbPmtr= new StringBuffer(" UPDATE ")
    .append(SqlConst.PARAM)
    .append(" SET ")
    .append(SqlConst.PARAM).append(".").append(SqlConst.PARAM_DSBRSMNT_PRMTR_ID).append(" = 100, ")
    .append(SqlConst.PARAM).append(".").append(SqlConst.PARAM_MIN_DSBRSMNT_AMT).append(" = ? ").append(",")
    .append(SqlConst.PARAM).append(".").append(SqlConst.PARAM_OVRRD_MIN_DSBRSMNT_DT).append(" = ").append(currentTimeStamp).append(",")
    .append(SqlConst.PARAM).append(".").append(SqlConst.PARAM_SPCL_HNDLG_AMT).append(" = ? ").append(", ")
    .append(SqlConst.PARAM).append(".").append(SqlConst.PARAM_STMNT_DT).append(" = ").append(currentTimeStamp).append(" , ")
    .append(SqlConst.PARAM).append(".").append(SqlConst.PARAM_LAST_CHNGD_BY).append(" ='?' ").append(" , ")
    .append(SqlConst.PARAM).append(".").append(SqlConst.PARAM_LAST_CHNGD_DT).append(" = ").append(currentTimeStamp)
    .append(" WHERE ")
    .append(SqlConst.PARAM).append(".").append(SqlConst.PARAM_INS_SYS_ID).append(" = ? ")
    .append(" AND ")
    .append(SqlConst.PARAM).append(".").append(SqlConst.PARAM_LAST_CHNGD_DT)
    .append(" = ")
    .append(" ( SELECT ")
    .append(" MAX( ").append(SqlConst.PARAM_LAST_CHNGD_DT).append(" ) ")
    .append(" FROM ").append(SqlConst.PARAM)
    .append(" WHERE ")
    .append(SqlConst.PARAM_INS_SYS_ID).append(" = ? )").toString();
    conn = SqlUtil.getConnection();
    conn.setAutoCommit(false);     
    prepStmtDsbrsmntPmtr = conn.prepareStatement(updateDbPmtr);                     
    prepStmtStckWght      = conn.prepareStatement(updateStkWght);
                        String minDsbrsmntAmount     = parametersListForm.getParametersForm().getMinDisbursementAmt();
                        String specialHndlAmount     = parametersListForm.getParametersForm().getSpecialHandlingAmt();
                        String statementDt               = parametersListForm.getParametersForm().getStatementDate();
                        String overrideCycleDt          = parametersListForm.getParametersForm().getOverrideCycleDate();
                        String lastMdfdBy               = parametersListForm.getParametersForm().getLastModifiedBy();
                        String lastMdfdDt               = parametersListForm.getParametersForm().getLastModifiedDate();
                        String wtStmtStkSheet          = parametersListForm.getParametersForm().getWtStatementStockSheet();
                        String wtHlfFoldEnvelope     = parametersListForm.getParametersForm().getWtHalfFoldEnv();
                        String wtFltEnvelope          = parametersListForm.getParametersForm().getWtFlatEnv();
                        String wtChkStkSheet          = parametersListForm.getParametersForm().getWtCheckStockSheet();
    prepStmtDsbrsmntPmtr.setLong(1,Integer.parseInt(minDsbrsmntAmount));
    prepStmtDsbrsmntPmtr.setLong(2, Long.parseLong(specialHndlAmount));
    prepStmtDsbrsmntPmtr.setString(3,lastMdfdBy);
    prepStmtDsbrsmntPmtr.setLong(4,1);
    prepStmtDsbrsmntPmtr.setLong(5,1);
    int rUpdtInParam = prepStmtDsbrsmntPmtr.executeUpdate();
    ========================================================================
    I am getting following errors...
    [8/6/04 19:17:14:286 GMT+05:30] 19192340 SystemErr R java.sql.SQLException: ORA-01006: bind variable does not exist
    [8/6/04 19:17:14:302 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:314)
    [8/6/04 19:17:14:317 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:117)
    [8/6/04 19:17:14:349 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:306)
    [8/6/04 19:17:14:364 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:43)
    [8/6/04 19:17:14:380 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:41)
    [8/6/04 19:17:14:411 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:941)
    [8/6/04 19:17:14:427 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:662)
    [8/6/04 19:17:14:442 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:214)
    [8/6/04 19:17:14:474 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:135)
    [8/6/04 19:17:14:489 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:227)
    [8/6/04 19:17:14:505 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:72)
    [8/6/04 19:17:14:536 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:190)
    [8/6/04 19:17:14:552 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:406)
    [8/6/04 19:17:14:567 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:57)
    [8/6/04 19:17:14:583 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:461)
    [8/6/04 19:17:14:614 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:414)
    [8/6/04 19:17:14:630 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:614)
    [8/6/04 19:17:14:661 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:57)
    [8/6/04 19:17:14:677 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:461)
    [8/6/04 19:17:14:692 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:414)
    [8/6/04 19:17:14:708 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:614)
    [8/6/04 19:17:14:739 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:414)
    [8/6/04 19:17:14:755 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:614)
    [8/6/04 19:17:14:770 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:414)
    [8/6/04 19:17:14:802 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:614)
    [8/6/04 19:17:14:817 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:414)
    [8/6/04 19:17:14:833 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:614)
    [8/6/04 19:17:14:864 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:190)
    [8/6/04 19:17:14:880 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:406)
    [8/6/04 19:17:14:896 GMT+05:30] 19192340 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:614)
    ========================================================================
    Database Table:-
    Desc D9T651_DSBRSMNT_PRMTR:
    Name Null? Type
    DSBRSMNT_PRMTR_ID NOT NULL NUMBER(38)
    INS_SYS_ID NUMBER(38)
    MIN_DSBRSMNT_AMT NUMBER(15,2)
    OVRRD_MIN_DSBRSMNT_DT DATE
    SPCL_HNDLG_AMT NUMBER(15,2)
    STMNT_DT DATE
    CRTD_BY VARCHAR2(30)
    CRTD_DT DATE
    LAST_CHNGD_BY VARCHAR2(30)
    LAST_CHNGD_DT DATE

    What exactly are you trying to do? If you're trying to run an update statement, it's simpler if you do this:
    PreparedStatement pstmt = null;
    Connection conn = ?????;
    String updateStr = "UPDATE D9T652_DISBRSMNT_PRMTR " +
    "SET " +
    "Stmnt_Page_Wgt_Ozs = ?, " +
    "Chk_Page_Wgt_Ozs = ?, " +
    "Flat_Envelope_Wgt_Ozs = ?, " +
    "Half_Fold_Envelope_Wgt_Ozs = ?, " +
    "Last_Chngd_By = TRIM(?), " +
    "Last_Chngd_Dt = ? " +
    "WHERE " +
    "Ins_Sys_Id = Ins_Sys_Id_Constant_For_Compass AND " +
    "Last_Chngd_Dt = (SELECT MAX(Last_Chngd_Dt) " +
    "FROM D9T652_DISBRSMNT_PRMTR " +
    "WHERE Ins_Sys_Id = Ins_Sys_Id_Constant_For_Compass) "
    From the String constructed above, the first ? mark will be bind to 1, second to 2..... etc and you can set the appropriate types.
    pstmt = conn.prepareStatement(updateStr);
    pstmt.setString(1, request.getParameter("formValue1")); // this is assuming you want to store string value in DB field
    pstmt.setInt(2, Integer.parseInt(request.getParameter("formValue2"))); // this is assuming you want to store int value in DB field
    pstmt.setTimestamp(3, new java.sql.Timestamp(new java.util.Date().getTime())); // this is assuming you want to store current time in DB Date field
    ..... etc
    ..... etc
    ...... etc
    int rows = pstmt.executeUpdate();
    Hope this helps!!

Maybe you are looking for

  • How to send e-mail using PL/SQL

    I need to send e-mail using PL/SQL. Is it possible? Thanks in advance, Agnaldo

  • ADS Patch after EP Patch doesn't work

    Hello, we had an EP6 SP15 with Adobe Document Service. Because of the WebDynpro Error we updated to SP16, also the ADS. But now the Adobe Document Service doesn't work. We get the exception: com.sap.tc.webdynpro.pdfobject.core.PDFObjectRuntimeExcepti

  • Health probe - not running and trying to see why?

    Hi, Im trying to fix our exchange server 2013 (patched upto and including CU8) when I run the following command get-healthreport -server servername | where {$_.alertvalue -ne "healthy"} | ft -auto Server State         HealthSet         AlertValue Las

  • Importing standard SAPScript text - not asking for transport request!

    Hi! I tried to import some standard SAPScript text running program RSTXSCRP. Everything was fine, but I was not asked for package and for a transport request... is it ok? How can I send this standard text to Quality system? Will reward, Mindaugas

  • Ability to do a 'live shooting'?

    I just downloaded Lightroom for my PC and my iBook. After taking a look around, I'm falling in love with the quality of the program. My only question is how do I do a live shooting? I have a extended USB cable that connects my camera to my pc and whe