"SQL-02103: Inconsistent cursor cache." error on a dual processor multi threaded apps

I have a C++ with Pro*C++ COM object running on a Win2000 OS on
a dual processor Middleware. The program is being called by a
service in a multi threaded way. An oracle error like ORA-2103
and SQL-02103 will be generated after running the program. We've
tried putting mutex on every SQL statement in Pro*C and it works
but the systems became very very slow. We concluded that the
error might be cause by a collision of threads accessing the
same Table or different tables having foreign constraints. This
is so because the error keeps coming from a statement accessing
Table A and following errors comes from a Table B having a
foreign key on Table A.
Our only solution now is to put Mutex on Statements accessing
same tables or tables with foreign constraints but this will
make our system run very very slow. I dont know if the problem
is in our Oracle Database because we already upgraded our system
from 8.1.6 to 8.1.7. The wierd thing on this is that the system
is running smoothly without oracle errors on a SINGLE PROCESSOR
Middleware. Hope you can give me any insights on this problem.

I have a C++ with Pro*C++ COM object running on a Win2000 OS on
a dual processor Middleware. The program is being called by a
service in a multi threaded way. An oracle error like ORA-2103
and SQL-02103 will be generated after running the program. We've
tried putting mutex on every SQL statement in Pro*C and it works
but the systems became very very slow. We concluded that the
error might be cause by a collision of threads accessing the
same Table or different tables having foreign constraints. This
is so because the error keeps coming from a statement accessing
Table A and following errors comes from a Table B having a
foreign key on Table A.
Our only solution now is to put Mutex on Statements accessing
same tables or tables with foreign constraints but this will
make our system run very very slow. I dont know if the problem
is in our Oracle Database because we already upgraded our system
from 8.1.6 to 8.1.7. The wierd thing on this is that the system
is running smoothly without oracle errors on a SINGLE PROCESSOR
Middleware. Hope you can give me any insights on this problem.

Similar Messages

  • "SQL-02103 Inconsistent cursor cache." error on dual processor multi threaded system

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

  • "SQL-02103: Inconsistent cursor cache." error on dual processor multi thread apps

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

  • Inconsistent cursor cache  error still presisting

    Hey I have asked this question before but no solution has been provided me. I have been facing a very serious problem. I have oracle 11g on windows 2003 on 64 bit machine. With 2 processor 8GB RAM. Sga/pga automatically features turn on and 6GB assign to memory_max_target, memory_target . My problem is when I run update 600 hundred statements in one go and every update statement update record between 1 to 30000 and after 20 records I use commit. But after 20 to 30 record oracle go down (shutdown) when i check alert log It advise to check Trace file and in trace file I got this error ORA-02103: PCC: inconsistent cursor cache (out-of-range cuc ref). I turn on my cache sharing to force but no way. Is there any other fast way to update records??
    cursor_sharing string force
    cursor_space_for_time boolean FALSE
    open_cursors integer 300
    session_cached_cursors integer 50
    my update statement are following
    Update jg_6july_dg0 Set Operator_code= '915724' where Operator_code= '015325';
    Update jg_6july_dg0 Set Operator_code= '915715' where Operator_code= '015323';
    .Update jg_6july_dg0 Set Operator_code= '915712' where Operator_code= '015374';
    Cursor Caching I think is not a problem either it is a oracle bug or I’m doing something wrong. I can’t believe that oracle does not have solution for such little problem. My question is why oracle shutdown?? Waiting for you reply

    sir no such error i got nothing. sir proces of rqasing SR is quite cumbersome. i'm stuck where SR first page ask Type of Problem it is hide how i set its value one more strange thing i have change the setting of SGA or PGA now the error in my alter log has been changed i have pasted here some part of alterlog plz check and told me what should i do now.
    Checkpoint not complete
    Current log# 2 seq# 1844 mem# 0: E:\APP\ADMINISTRATOR\ORADATA\ORCL\ONLINELOG\O1_MF_2_4VH0YMCK_.LOG
    Current log# 2 seq# 1844 mem# 1: E:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ONLINELOG\O1_MF_2_4VH0YMLC_.LOG
    Fri Apr 03 19:15:50 2009
    Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_lgwr_5088.trc (incident=164082):
    ORA-00494: enqueue [CF] held for too long (more than 900 seconds) by 'inst 1, osid 3604'
    Incident details in: e:\app\administrator\diag\rdbms\orcl\orcl\incident\incdir_164082\orcl_lgwr_5088_i164082.trc
    Killing enqueue blocker (pid=3604) on resource CF-00000000-00000000
    by killing session 545.1
    Killing enqueue blocker (pid=3604) on resource CF-00000000-00000000
    by terminating the process
    LGWR (ospid: 5088): terminating the instance due to error 2103
    Fri Apr 03 19:15:51 2009
    Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_j000_4256.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02103: PCC: inconsistent cursor cache (out-of-range cuc ref)
    Fri Apr 03 19:15:52 2009
    Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_j001_4764.trc:
    ORA-02103: PCC: inconsistent cursor cache (out-of-range cuc ref)
    Instance terminated by LGWR, pid = 5088Fri Apr 03 19:25:08 2009
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    Picked latch-free SCN scheme 3
    Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
    Autotune of undo retention is turned on.
    IMODE=BR
    ILAT =61
    LICENSE_MAX_USERS = 0
    SYS auditing is disabled
    Starting up ORACLE RDBMS Version: 11.1.0.7.0.
    Using parameter settings in server-side spfile E:\APP\ADMINISTRATOR\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEORCL.ORA
    System parameters with non-default values:
    processes = 500
    sessions = 555
    sga_max_size = 5G
    nls_length_semantics = "BYTE"
    resource_manager_plan = ""
    sga_target = 5G
    memory_target = 0
    memory_max_target = 7360M
    control_files = "E:\APP\ADMINISTRATOR\ORADATA\ORCL\CONTROLFILE\O1_MF_4VH0YL9L_.CTL"
    control_files = "E:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\CONTROLFILE\O1_MF_4VH0YLF0_.CTL"
    db_block_size = 16384
    compatible = "11.1.0.0.0"
    db_files = 7000
    db_create_file_dest = "E:\app\Administrator\oradata"
    db_recovery_file_dest = "E:\app\Administrator\flash_recovery_area"
    db_recovery_file_dest_size= 2G
    undo_tablespace = "UNDOTBS1"
    undo_retention = 900
    sec_case_sensitive_logon = FALSE
    remote_login_passwordfile= "EXCLUSIVE"
    db_domain = ""
    dispatchers = "(PROTOCOL=TCP) (SERVICE=orclXDB)"
    audit_file_dest = "E:\APP\ADMINISTRATOR\ADMIN\ORCL\ADUMP"
    audit_trail = "DB"
    db_name = "orcl"
    open_cursors = 300
    pga_aggregate_target = 2112M
    enable_ddl_logging = FALSE
    aq_tm_processes = 0
    diagnostic_dest = "E:\APP\ADMINISTRATOR"
    Fri Apr 03 19:25:09 2009
    PMON started with pid=2, OS id=2752
    Fri Apr 03 19:25:09 2009
    VKTM started with pid=3, OS id=1252 at elevated priority
    VKTM running at (20)ms precision
    Fri Apr 03 19:25:09 2009
    DIAG started with pid=4, OS id=2596
    Fri Apr 03 19:25:09 2009
    DBRM started with pid=5, OS id=1436
    Fri Apr 03 19:25:09 2009
    PSP0 started with pid=6, OS id=5104
    Fri Apr 03 19:25:09 2009

  • "Inconsistent cursor cache. Out of range cursor" error on dual processor multi thread

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

  • ORA-02103: PCC: inconsistent cursor cache

    I have been hit by one error ORA-02103: PCC: inconsistent cursor cache (out-of-range cuc ref). it occur when user execute thousand of update statement in one go. I have place commit after 50 records. But problem is still there. It shutdown the oracle. I have to again startup oracle database. I’m running query from Toad. Server machine remotely connected with Toad using TNS. Why this error occur or plz guide what is the best way to update records. I have also used parallel Hint. Committing after 50 record reduce error occurrence but problem not solve completely

    As per ora description:
    Error: SQL 2103
    Text: Inconsistent cursor cache (out-of-range CUC ref)
    Cause: The precompiler generates a unit cursor entry (UCE) array. An element
    in this array corresponds to an entry in the cursor cache (CUC). While
    doing a consistency check on the cursor cache, SQLLIB found that the
    UCE array contains an ordinal value that is either too large or less
    than zero. This happens only if your program runs out of memory.
    Action: Allocate more memory to your user session, then rerun the program. If
    the error persists, call customer support for assistance.
    How user is connected dedicated or shared? How much memory is used during update? Is it enough?
    Is parameter open_cursors high enough?
    And as You can see from error description - call Oracle support. Raise SR to Oracle - they will investigate and ask dump files and look through them and propose a solution.

  • SQL-02103

    This happend during a prepare for a select statement using embedded C (proc). The select statement had a length of 20. Here's more info about the error from the database:
    out of memory (could not allocate)
    inconsistent cursor cache (out-or_range CUC ref)
    SQL-02103: Inconsistent cursor cache. Out of range cursor cache refere
    Database: Oracle 10g version 10.1.0.3.0
    OS: Redhat Enterprise ES version 3 update 4, linux 2.4.21-27
    on a dual processor intel.
    Can anyone tell me why this occurs and how I can fix it?
    The machine had memory and swap space available.
    Thanks,
    Lamar

    SQL-02103 Inconsistent cursor cache. Out of range cursor cache reference
    Cause: This internal error typically indicates a memory-related error.
    Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

  • Error behaviour in multi-threaded mode

    I'm running TestStand 3.0 in sequential mode. In the middle of my sequence I have a multi-threaded (6 threads) section with the appropriate Waits. My problem is that if an Error occurs while inside the multi-threaded section, then execution bypasses the Waits and I lose all the result data from the other threads.
    Is there anything that I can do to get the error thread to force each of the other threads to go through their Wait so that I can get their report data.
    Hurst

    Hi,
    Try using the New Execution option instead of New Thread.
    Or In the Properties set the step to ignore runtime errors. Then put your own error trapping in
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Error reading data from static cursor cache.

    Hi,
    Does anyone know what causes this error below. It just started happening out of the blue. I'm running Apache Tomcat 4.1 on Win 2000 server with MS SQL Server 2000 database.
    Error:
    java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error reading data from static cursor cache.
    Thanks,
    TR

    hi,
    i had a similar sort of error, something along the lines of "error setting up static cursor cache" using the SQL JDBC drivers on Win2K. i deleted the file entries in the TEMP folder of c:\documents and settings\<user>\Local Settings\TEMP and everything was cool after it. i'm not sure what the exact issue is (probably something like maximum folder size had been reached). i ran the FileMon utility from www.sysinternals.com and it reported a DISK_FULL error on a temporary file being read by the process. to cut a long story short, everything is NOW cool.
    cheer,
    dara

  • The SQL has aged out of the cursor cache.

    Hi,
    on 10g R2, Ihave the following :
    The SQL has aged out of the cursor cache.
    Does-it mean that undo_retention is not enough big?
    For the moment it is 10800, 3 hours.
    Thanks.

    Hi,
    The issue is that when in sql advisory I click on "Schedule SQL tunning advisor" it gives me "The SQL has aged out of the cursor cache".
    If shared_pool is =0 , (automatic management) would it be usefull to define shared_pool_reserved_size value ?
    In documentation it is said :
    7.3.8.2 When SHARED_POOL_RESERVED_SIZE Is Too Small
    The reserved pool is too small when the value for REQUEST_FAILURES is more than zero and increasing. To resolve this, increase the
    value for the SHARED_POOL_RESERVED_SIZE and SHARED_POOL_SIZE accordingly. The settings you select for these parameters
    depend on your system's SGA size constraints.
    Increasing the value of SHARED_POOL_RESERVED_SIZE increases the amount of memory available on the reserved
    list without having an effect on users who do not allocate memory from the reserved list.And actually I have REQUEST_FAILURES =15.
    Thank you.

  • ORA-13773: insufficient privileges to select data from the cursor cache

    We are trying to create STS using the below query:
    exec sys.dbms_sqltune.create_sqlset(sqlset_name => 'TEST_STS', -
    sqlset_owner => 'SCOTT');
    The below procedure will load sql starting with 'select /*MY_CRITICAL_SQL*/%' from cursor cache into STS TEST_STS.
    DECLARE
    stscur dbms_sqltune.sqlset_cursor;
    BEGIN
    OPEN stscur FOR
    SELECT VALUE(P)
    FROM TABLE(dbms_sqltune.select_cursor_cache(
    'sql_text like ''select /*MY_CRITICAL_SQL*/%''',
    null, null, null, null, null, null, 'ALL')) P;
    dbms_sqltune.load_sqlset(sqlset_name => 'TEST_STS',
    populate_cursor => stscur,
    sqlset_owner => 'SCOTT');
    END;
    We were getting the following error: ORA-13761: invalid filter
    After granting the below privileges to the user we are getting the below error:
    Err msg:
    ERROR at line 1:
    ORA-13773: insufficient privileges to select data from the cursor cache
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 2957
    ORA-06512: at line 10
    For SQL Tuning Sets:
    GRANT ADMINISTER ANY SQL TUNING SET TO scott;
    For Managing SQL Profiles:
    GRANT CREATE ANY SQL PROFILE TO scott;
    GRANT ALTER ANY SQL PROFILE TO scott;
    GRANT DROP ANY SQL PROFILE TO scott;
    For SQL Tuning Advisor:
    GRANT ADVISOR TO scott;
    Others:
    GRANT SELECT ON V_$SQL TO SCOTT;
    GRANT SELECT ON V_$SQLAREA TO SCOTT;
    GRANT SELECT ON V$SQLAREA_PLAN_HASH TO SCOTT;
    GRANT SELECT ON V_$SQLSTATS TO SCOTT;
    grant select on sys.DBA_HIST_BASELINE to SCOTT;
    grant select on sys.DBA_HIST_SQLTEXT to SCOTT;
    grant select on sys.DBA_HIST_SQLSTAT to SCOTT;
    grant select on sys.DBA_HIST_SQLBIND to SCOTT;
    grant select on sys.DBA_HIST_OPTIMIZER_ENV to SCOTT;
    grant select on sys.DBA_HIST_SNAPSHOT to SCOTT;
    Any info from your end to resolve the issue will be of great help.
    Thanks

    What is the alert log reporting. Are you seeing any other errors than these in the alert log too?

  • MS SQL Server with Cursor Problem

    Dear all:I use JDBC type four connect with MS SQL Server and the language is jsp.
    I run it on my local computer is ok.If I run it on the other computer.I get this error messege.
    javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Error setting up static cursor cache.
    If someone get some or can surve this qusition.
    Please tell me.thinks you kind.

    Jamie,
    Did you ever get a reply from anyone regarding this problem. I too am having a similar problem and would like to know the solution.

  • Cursor Invalidate error - ora-12842

    Hi All,
    A user is getting CURSOR INVALIDATE error on Select statement. Some times it works fine and some time it gives this error.
    Can any one tell me is it some thing related to the database settings or the only reason is SQL coding. DB - 9.2.0.6
    Thanks a lot..

    This error is caused by an event outside of the user's session, such as DDL against the object(s) they're querying or somebody flushing the db cache. Hence the irregular pattern of occurrences. Is there anything in the alert log or a trace file which might help you with your troubleshooting?
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Invalid Cursor Position Error

    Help!
    I am using JRun3.1 and developing a web interface to a database. In this particular screen, I am using CachedRowSet (I downloaded this and added it to jrun classpath). I am getting "Invalid cursor position" error.
    I feel there is a problem with the usebean tag.
    This is my code:
    what is wrong with this?
    <%@ page language = "java" import="java.sql.*, java.util.*, javax.sql.*, sun.jdbc.rowset.*" %>
    <%
    String indSub = request.getParameter("indSub");
    String areaname = request.getParameter("selarea");
    %>
    <jsp:useBean id="crs" class="CachedRowSet" scope="session" >
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    crs.setUrl("jdbc:odbc:asphData");
    crs.setCommand("SELECT siccode, sicdesc from siccode where sictitle = '" + indSub + "'");
    crs.execute();
    %>
    </jsp:useBean>
    <%@ include file="header2.htm" %>
    <link rel="stylesheet" href="http://localhost:8100/empData/almis.css" type="text/css">
    <br>
    <br>
    <table align="center">
    <tr><td class="moduleDesign" align="center">Employers Database</td></tr>
    </table>
    <br><br>
    <font size="+2" face="verdana sans-serif">
    <form action="employerDetail.jsp" method="post">
    <p><center><font color="Blue">Employers in the �<%= indSub %>� Industry
    <br>
    SIC Code:�<%= crs.getString("siccode") %>
    <br>State: Utah<br>
    Region: �<%=areaname %><br>
    </font></center></p>
    <p>
    <b>Description:</b>�<%= crs.getString("sicdesc") %>
    </p>
    </form>
    <jsp:include page="footer2.htm" />
    </body>
    </html>
    srajaman2

    Never mind!
    I have to issue a next() command to get to the first line of the resultset!
    srajaman2

  • Java.sql.SQLException: Invalid cursor position on saving

    Dear all
    I'm having a problem with saving components on a JSF page. The page is plit in two parts:
    1. Save report details, which are being saved correctly. Here is the code
    public String btnSaveReport_action() {
            // TODO: Process the button click action. Return value is a navigation
            // case name where null will return to the same page.
            System.out.println("Saving the report ... forsi");
            int seqNumber = SequenceNumber.getNextSequenceNo("TB_REPORTS");
            getSessionBean1().setReportFK(seqNumber);
            String reportId = "REP_" + ((String)tfReportName.getText()).replace(' ', '_').trim();
            System.out.println("ReportFK in btnSaveReport: " + getSessionBean1().getReportFK());
            //SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
            System.out.println("Start Date: " + calRepStartDate.getSelectedDate());
            //error(calRepStartDate.getValue().toString());
            //System.out.println("getvalue" + calRepStartDate.getValue());
            try {
                rk = tb_reportsDataProvider.appendRow();
                tb_reportsDataProvider.setCursorRow(rk);
                System.out.println("Setting Values ...");
                tb_reportsDataProvider.setValue("REP_PK", new Integer(seqNumber));
                tb_reportsDataProvider.setValue("REP_ID", reportId);
                tb_reportsDataProvider.setValue("REP_ACTIVE", "Y");
                tb_reportsDataProvider.setValue("REP_SESSION_FK", new Integer(getSessionBean1().getSessionId()));
                tb_reportsDataProvider.setValue("REP_NAME", (String)tfReportName.getText());
                tb_reportsDataProvider.setValue("REP_START_DATE", new java.sql.Date(calRepStartDate.getSelectedDate().getTime()));
                tb_reportsDataProvider.setValue("REP_END_DATE", new java.sql.Date(calRepEndDate.getSelectedDate().getTime()));
                System.out.println("Committing Changes ...");
                tb_reportsDataProvider.commitChanges();
                System.out.println("Refreshing Row ...");
                tb_reportsDataProvider.getCachedRowSet().refreshRow();
                getSessionBean1().getTb_reportsRowSet().refreshRow();           
    //            tb_reportsDataProvider.refresh();
    //            System.out.println("Refreshing Row ...");
    //            tb_reportsDataProvider.setCursorRow(tb_reportsDataProvider.findFirst("REP_PK",new Integer(seqNumber)));
                info("Report Data Saved Successfully!");
            } catch (SQLException sqle) {
                /* error("Cannot update report (SQLException): " +
                        reportId +
                        " : " + sqle.getMessage()); */
                log("Cannot update report (SQLException): " +
                        reportId +
                        " : " + sqle);
                info("Could not save report: " + sqle.getMessage());
                sqle.printStackTrace();
            //tfReportName.setValueBinding("sourceData", getApplication().
            //    createValueBinding("#{newReport.tb_reportsDataProvider}"));
            //tfReportName.setValueBinding("text", getApplication().createValueBinding            ("#{newReport.tb_reportsDataProvider.value['REP_NAME']}"));
            // calRepStartDate.setValueBinding("sourceData", getApplication().
            //    createValueBinding("#{newReport.tb_reportsDataProvider}"));
            //calRepStartDate.setValueBinding("selectedDate", getApplication().createValueBinding            ("#{newReport.tb_reportsDataProvider.value['REP_START_DATE']}"));
            //calRepEndDate.setValueBinding("sourceData", getApplication().
            //    createValueBinding("#{newReport.tb_reportsDataProvider}"));
            //calRepEndDate.setValueBinding("selectedDate", getApplication().createValueBinding            ("#{newReport.tb_reportsDataProvider.value['REP_END_DATE']}"));
            info("Report Name: " + tb_reportsDataProvider.getValue("REP_NAME"));
            tfReportName.validate(this.getFacesContext());
            calRepStartDate.validate(this.getFacesContext());
            calRepEndDate.validate(this.getFacesContext());
            tfReportName.setDisabled(true);
            calRepStartDate.setDisabled(true);
            calRepEndDate.setDisabled(true);
            btnNewQuery.setDisabled(false);
            btnSaveReport.setDisabled(true);
            return null;
        }The problem is that the reportFK is losing its value when I submit the page the second time! I am trying to get the value from the provider or from the rowset, but none work. Here is the code I am trying ...
    public String btnSaveQuery_action() {
            // TODO: Process the button click action. Return value is a navigation
            // case name where null will return to the same page.
            int seqNumber  = 0;
            // Save the query header details to the database  
            try {
                // Start with the query - needed for the link table
                seqNumber = SequenceNumber.getNextSequenceNo("TB_QUERY");
                String queryId = "QRY_" + ((String)tfQueryName.getText()).replace(' ', '_').trim();
                tb_queryDataProvider.setCursorRow(queryRowKey);
                tb_queryDataProvider.setValue("QRY_PK", new BigDecimal(seqNumber));
                tb_queryDataProvider.setValue("QRY_CODE", queryId);
                tb_queryDataProvider.setValue("QRY_NAME", (String)tfQueryName.getText());
                tb_queryDataProvider.setValue("QRY_ACTIVE", "Y");
                tb_queryDataProvider.setValue("QRY_SESS_FK", new BigDecimal(getSessionBean1().getSessionId()));
                System.out.println("Committing Changes ...");
                tb_queryDataProvider.commitChanges();
                System.out.println("Refreshing Row ...");
                tb_queryDataProvider.setCursorRow(tb_queryDataProvider.findFirst("QRY_PK",new Integer(seqNumber)));
                getSessionBean1().getTb_queryRowSet().refreshRow();
                info("Query Data Saved Successfully!");
            } catch (Exception ex) {
                error("Error while saving query: " + ex.getMessage());
                log("Error while saving query" + ex);
                ex.printStackTrace();
            // Now save the link
            try {
                // Start with the query - needed for the link table
                String sql = "INSERT INTO TB_LINK_REPORT_QUERY ( " +
                   "LRQ_PK, LRQ_REP_FK, LRQ_QRY_FK, " +
                   "LRQ_TYPE, LRQ_START_DATE, LRQ_END_DATE, " +
                   "LRQ_ACTIVE, LRQ_SESS_FK) " +
                   "VALUES (?,?,?,?,?,?,?,?)";
                System.out.println("Trying to do the link");
                int linkSeqNumber = SequenceNumber.getNextSequenceNo("TB_LINK_REPORT_QUERY");           
                PreparedStatement pstmt = DBConnection.getConnection().prepareStatement(sql);
                if (getSessionBean1().getReportFK() == -1 || getSessionBean1().getReportFK() == 0)
                    System.out.println("reportFK = -1 or 0!!! Trying from provider.");
                    System.out.println("Report PK is: " + getSessionBean1().getTb_reportsRowSet().getBigDecimal("REP_PK"));
                    getSessionBean1().setReportFK(((Integer)tb_reportsDataProvider.getValue("REP_PK")).intValue());
                System.out.println("Report Foreign Key: " + getSessionBean1().getReportFK());
                System.out.println("Query Foreign Key: " + seqNumber);
                pstmt.setInt(1, linkSeqNumber);
                pstmt.setInt(2, getSessionBean1().getReportFK());
                pstmt.setInt(3, seqNumber);
                pstmt.setString(4, (String)dropDownQueryType.getSelected());
                pstmt.setDate(5, new java.sql.Date(calendarQueryStartDate.getSelectedDate().getTime()));
                pstmt.setDate(6, new java.sql.Date(calendarQueryEnd.getSelectedDate().getTime()));
                pstmt.setString(7, "Y");
                pstmt.setInt(8, getSessionBean1().getSessionId());
                System.out.println("Committing Changes for Link ...");
                pstmt.executeUpdate();
                DBConnection.getConnection().commit();
                System.out.println("Refreshing Row in link ...");
                getSessionBean1().getTb_link_report_queryRowSet().setObject(
                        1, new Integer(linkSeqNumber));
                getSessionBean1().getTb_link_report_queryRowSet().setObject(
                        2, new Integer(getSessionBean1().getReportFK()));
                getSessionBean1().getTb_link_report_queryRowSet().setObject(
                        3, calendarQueryStartDate.getSelectedDate());
                getSessionBean1().getTb_link_report_queryRowSet().setObject(
                        4, calendarQueryEnd.getSelectedDate());
                tb_link_report_queryDataProvider.refresh();
                info("Link Data Saved Successfully!");
            } catch (Exception ex) {
                error("Error while saving query: " + ex.getMessage());
                log("Error while saving link: " + ex);
                ex.printStackTrace();
            return null;
        }The part saving the query with the provider is working correctly. But the part with the link is not working at all (the part with the PreparedStatement). The fact is that the PreparedStatement cannot be executed because I am getting the error at the line
    System.out.println("Report PK is: " + getSessionBean1().getTb_reportsRowSet().getBigDecimal("REP_PK"));Can anyone help please?
    Thanks and Regards
    Joseph

    guys if any of you have an idea just post it. It would be of great help for me. I can't figure out my mistake and its been 2days already and still i am stuck with my problem.
    It displays the table but there is an error "java.sql.SQLException: Invalid cursor position" so i cannot put the counter to the session.

Maybe you are looking for

  • 11.5.10.2 to R12 - Reducing Upgrade Downtime

    Hi, We'r in the process of upgrading 11.5.10.2 instance to R12. Please anybody who has already done the upgrade, can tell us the way by which we can reduce the Upgrade DOWNTIME to a considerable extent (apart from what Oracle Recommends). Looking for

  • Error in starting Tomcat server

    Hi, I'm new in JSP. I have downloadec Tomcat 4.0 and followed instruction to install and tested out the servlet (HelloServlet). By testing one JSP & HelloServlet are OK but when I start the server, I got the following error messages, appreciate any h

  • How to use to_Char in obiee

    Evaluate( 'to_char(%1,%2)' as char,SUM(EQ_HOLDING_FACT.shares),'FM999,999,999,990') A general error has occurred. [nQSError: 42015] Cannot function ship the following expression: Evaluate( to_char(%1,%2),D1.c18, 'FM999,999,999,990') how to resolve it

  • Any direct link to download Maverick installer from safari?

    I have problems logging in to my app store . I even created an additional new apple ID. The app store however doesnt let me login and asks me to review my account information. When i click the Review button,there is no further progress.

  • AirPort doesn't have a Valid IP Address after Moving

    After moving to a new apartment, I've been having a lot of trouble with my AirPort. At first, only my computer was able to connect, even though I kept getting warnings that it didn't have a valid IP address.  No other devises, including other compute