ALTER CURRVAL OF SEQUNCE

I am SQL Loading a table with a view to using the it as part of a nightly update process. Further updates to the table will happen via a stored proc. When loading the table I'm using the SQL Loader sequence function to allocate a primary key. After loading the table I would like to update the sequence being used by the stored procedure so that the CURRVAL of the sequence is the same as the maximum value that has been allocated to the values in the table.
Is there any way to do this other than to drop the sequence and recreate it, setting the min value to the maximum value allocated by the SQL Load step ?
null

You have 2 options here:
I would use a before insert trigger to generate the sequence numbers as the records are loaded. You would not have a problem then.
If you have to do it the way you described you will need to either drop/recreate the sequence or alter the sequence so that the increment is set to the difference between the sqlloader number and the next val for the sequence number, then issue a select on the sequence then reset the increment to 1.
Hope this helps
Ron
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Ian Dukes ([email protected]):
I am SQL Loading a table with a view to using the it as part of a nightly update process. Further updates to the table will happen via a stored proc. When loading the table I'm using the SQL Loader sequence function to allocate a primary key. After loading the table I would like to update the sequence being used by the stored procedure so that the CURRVAL of the sequence is the same as the maximum value that has been allocated to the values in the table.
Is there any way to do this other than to drop the sequence and recreate it, setting the min value to the maximum value allocated by the SQL Load step ?
<HR></BLOCKQUOTE>
null

Similar Messages

  • ORA-1109 signalled during: alter database close

    Hi
    i have found the following error in alert log after i shut down my database for cold backup
    alter database close
    ORA-1109 signalled during: alter database close...
    Please advice is there any threat because of this error and whats the reason for the occurence of this error.
    Version of DB: 10.2.0.4.0
    I have DR configured for this db also..
    Regards,
    Arun Kumar

    Thats not the command i am using..
    I just use shutdown immediate.. when i use that command i get the sequnce of steps logged in alert log..
    there i find the error.. see below..(a part of alert log content)
    Shutting down instance: further logons disabled
    Sun Aug  9 19:12:39 2009
    Stopping background process CJQ0
    Sun Aug  9 19:12:39 2009
    Stopping background process MMNL
    Sun Aug  9 19:12:40 2009
    Stopping background process MMON
    Sun Aug  9 19:12:41 2009
    Shutting down instance (immediate)
    License high water mark = 5
    Sun Aug  9 19:12:41 2009
    Stopping Job queue slave processes, flags = 7
    Sun Aug  9 19:12:41 2009
    Job queue slave processes stopped
    Sun Aug  9 19:12:41 2009
    alter database close
    ORA-1109 signalled during: alter database close...*
    Sun Aug  9 19:12:41 2009
    alter database dismount
    Completed: alter database dismount
    ARCH: Archival disabled due to shutdown: 1089
    Shutting down archive processes
    Archiving is disabled
    Archive process shutdown avoided: 0 active
    ARCH: Archival disabled due to shutdown: 1089
    Shutting down archive processes

  • How handle currval if nextval fails

    hi,
    i have to insert the following rows in the table if
    Insert into BOOK (BOOK_ID, CNT, ALT_CNT, ROW_INSERT_TMSTMP, ROW_LAST_UPDT_TMSTMP, BOOK_ID,VERSION)
    SELECT SEQ_BOOK_ID.nextval, 50 , 500 ,sysdate,sysdate, '123456xyz' ,1 FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM BOOK B WHERE b.BOOK_ID = '123456xyz' );
    Insert into BOOK_OWNER (BOOK_OWNER_ID, BOOK_ID, USER_ID,VERSION)
    SELECT SEQ_BOOK_OWNER_ID.nextval, SEQ_BOOK_ID.currval, '30327def',1 FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM BOOK_OWNER AO WHERE AO.USER_ID= '30327def');
    commit;
    in above #1st statement checking if the value exists in book and inserting if the first insert fails the secound insert statement uses the "SEQ_BOOK_ID.currval" of the parent. if #1 insert fails how to handle the currval of the secound statement?
    using oralce 10g

    Hi,
    [email protected] wrote:
    also would like to know in anyof the condition the nextval will fail? i mean for some of the records insertion in getting the primery key violation.
    like i am doing one time migration with huge data in to the database around 200 to 300 similar insert statements and some times i am getting the primery key voilation i suspect nextval is failing not able to figure it out.That sounds like some rows were entered with a primary key that was not generated by the sequence.
    You should change the sequence so that it is generating numbers higher than anything already in the table.
    First, find out what the highest id in the table is. For example:
    SELECT  MAX (book_id)
    FROM    book;Say this tells you that book_id=12345 is already in the table. Now find out how high the sequence is. For example:
    SELECT  seq_book_id.NEXTVAL
    FROM    dual;Say this returns 12000, which means you have to add 345 to the sequence.
    You don't want to drop and re-create the sequence; that might make procedures invalid, or lose grants.
    You could reference .NEXTVAL 345 times, or you could say:
    ALTER SEQUENCE  seq_book_id  INCREMENT BY 345;
    SELECT  seq_book_id.NEXTVAL
    FROM    dual;
    ALTER SEQUENCE  seq_book_id  INCREMENT BY 1;This assumes the sequence had originally been incrementing by 1.
    The problem is liable to keep happening as long as the table is incremented without using the sequence.
    You can add a trigger to guarantee that the sequence is used.

  • Porting Sybase @@identity to seq.currval

    I am currently porting a Sybase app to Oracle.
    I have a fairly mature app to port. Four years of history, several big customers, NT services, native browsers on Mac and NT and WEB stuff too.
    One of the Sybase @@identity features is that transactions that make use of it do not need to know 'which sequence' to request a currval from. @@identity is always the value of the last identity column incremented. I have currently written code which generates Oracle sequence triggers for all my tables that need them. They follow the Oracle Migration Workbench approach, however, and create a different sequence for each table. If I stick with this, I will have to hunt down every usage of @@identity and make manual changes that reference the correct sequence. I cannot just introduce a brain dead substitution involving seq.currval whenever @@identity passes through my single execSQL() function... Since some of my SQL is generated (not hard coded) this means I have to tinker a good deal of source code to get this right.
    First, is there some Oracle facility that I am unaware of that acts like the Sybase @@identity global variable and returns the last sequence value irrespective of which sequence produced it?
    Second, if I 'share' a single sequence among all of my tables (I don't care about identity gaps) are there performance or other problems I should be aware of?
    Many thanks in advance.
    Al
    null

    It would be possible to get each Trigger that generates the seq.currval to also update a variable defined within a global Package i.e. a Package that has EXECUTE priviledges granted to PUBLIC; for example, the following Package :
    SQL> connect system/manager
    Connected.
    SQL> grant connect, resource to globalUser identified by oracle;
    Grant succeeded.
    SQL> CREATE OR REPLACE PACKAGE globalUser.identityPkg AS
    2 oracleIdentity NUMBER;
    3 END identityPkg;
    4 /
    Package created.
    SQL> grant execute on identityPkg to public;
    Grant succeeded.
    SQL> -- The following code demonstrates how this package variable can be altered by any user.
    SQL> connect scott/tiger;
    Connected.
    SQL> begin
    2 globalUser.identityPkg.oracleIdentity := 100;
    3 end;
    4 /
    PL/SQL procedure successfully completed.
    SQL> variable testNum number;
    SQL> begin
    2 select globalUser.identityPkg.oracleIdentity into :testNum from dual;
    3 end;
    4 /
    PL/SQL procedure successfully completed.
    SQL> print testNum;
    TESTNUM
    100
    In this fashion, even if multiple sequences were implemented, the last value of the last sequence used would always be assigned to this package variable, thus emulating the Sybase @@IDENTITY feature.

  • How can I alter a calendar script to place progressive dates on every day in the calendar year?

    Is there an easy way either to alter the calendar script or create something that will allow for variable text in each day of the year?
    I am creating a calendar for a cattle rancher, and he wants to include a gestation calendar in the design.
    So...instead of the Julian date on every caledar day, he would like to include the date that a calf will be born if the cow had been bred on a particular day.  For example:  On the calendar date, January 1, in that box, another smaller date will appear - 10/9, On January 2 - 10/10 and so on. But, I need this progression to continue throughout the whole year.
    I have attempted to manually enter each date in a separate table and super impose it over the calendar, but this is very slow and very tedious. There has to be a faster way.
    I am comfortable looking at code and can often times figure out which fields to change, but I am a bit lost on this one. Where do I start?
    Please help!
    Thanks!

    That helped, but still did not solve the "continous scroll" question.
    I did however discover that if you go to Search and type in a "common" letter like "s", a Continuous List view will appear.
    Any further help on how to do this as a default view would be appreciated from any and all.
    Thanks for the help and for the link paulcb.

  • Error while altering a table in Oracle Portal

    i have a table with primary key. i realize that the primary is not required and when i get rid of primary key thru Oracle Portal and say OK ... i am encountered with the following error -
    Error:
    ORA-25150: ALTERING of extent parameters not
    permitted (WWV-11230)
    Failed to parse as PORTAL30 - alter table
    BPSITEST.JEN_TEST_PRIMARY_KEYS
    drop PRIMARY KEY
    modify(
    EMP_ID NUMBER(10),
    LAST_NAME VARCHAR2(10),
    FIRST_NAME VARCHAR2(10))
    PCTFREE 10
    PCTUSED 40
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    NEXT 256K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    ENABLE CONSTRAINT SYS_C003038 ENABLE CONSTRAINT
    SYS_C003039 ENABLE CONSTRAINT SYS_C003040
    (WWV-08300)
    Any Ideas .... anyone ... ??
    thanx
    null

    ORA-00054: resource busy and acquire with NOWAIT specified The table is currently in use by something else.
    Werner

  • Error while altering a table.

    Hi All,
    When i tried to alter a table. I got the following error.
    SQL> ALTER TABLE SALES_ORDER_TRANS_IHST ADD(SUPER VARCHAR2(1),REASON_CD VARCHAR2(10));
    ERROR at line 1:
    ORA-00069: cannot acquire lock -- table locks disabled for SALES_ORDER_TRANS_IHST
    Then I tried to enable table lock for that table. Again got error.
    SQL> ALTER TABLE SALES_ORDER_TRANS_IHST enable table lock;
    ALTER TABLE SALES_ORDER_TRANS_IHST enable table lock
    ERROR at line 1:
    ORA-00054: resource busy and acquire with NOWAIT specified

    ORA-00054: resource busy and acquire with NOWAIT specified The table is currently in use by something else.
    Werner

  • Altering a table in a materialized view environment

    Hello everybody!.
    My question is as simple as this:
    When I have a single master - multiple materialized views environment , and I want to alter the master table (usually adding a column) , how do I propagate the change to the materialized view sites ?
    In Oracle's documentation manuals it is written the process ONLY for the master sites.If I manually just alter the materialized views to the mat.views sites , the new columns DON'T take data from the master table!
    It would be very nice if someone could help me.
    Thanks everybody on advance!.
    Thanasis Avdis

    Hi,
    you must dorp and recreate materialized view.

  • Table schema not being updated after a SQL 'alter'

    Hi all,
    I have a problem to do with altering table columns and queries relating to that table thereafter.
    I have a table which has been queried using an OracleDataAdapter.Fill(DataSet), if I add a column using say using an OracleCommand.ExecuteNonQuery() or sqlplus session (and doing a 'commit' after) the column does not show up on subsequant 'Fill' queries unless I reopen the DB connection.
    Just as an example, here is my test table which is defined as:
    create table steveTest
         id numeric,
         name varchar(15),
         address varchar(25)
    with a few rows of data in...
    If I query the table using ODP.NET (10 & 11)
    OracleDataAdapter oraDap = new OracleDataAdapter("select * from steveTest",oraCon);
    oraDap.Fill(ds);
    Everything is fine until I add/remove a column with say sqlplus or via an OracleCommand.ExecuteNonQuery()
    e.g     "alter table steveTest add address2 varchar2(30)"
    Subsequent Fill or data reader queries only show the unchanged table schema, without the newly added column. If I remove a column the symptoms are worse and I receive a "ORA-01007: variable not in select list"
    I can only think that ODP.NET is caching the schema for that table on that particular connection. Is there anyway to forcefully clear this out?
    I have tried OracleConnection.PurgeStatementCache(); but this doesn't seem to help me.
    My connection string is defined as:
    Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.27)(PORT=1521)))
    (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xe)));
    User Id=system;
    Password=mypass;
    HA Events=true;
    Validate Connection=true;
    Pooling=false;
    Enlist=false;
    Statement Cache Purge=true;
    Statement Cache Size=0;
    The application I am writing is a middle tier application which handles various DB drivers and maintains several 'connection queues' which multiple lightweight client applications can use concurrently. As you can imagine, a possible scenario may arise where a table is queried, altered and then queried again which causes the above issue. The only way I can stop this from happening is if I close/open the DB connection but I don't want to do this after every alter statement.
    I have tried this on Oracle Express 10g and Oracle 10g servers with ODP.NET clients (10.2.0.100/2.111.6.0). Just a point I thought worth mentioning, this does not happen in sqlplus.
    Any help would be much appreciated.
    Regards,
    Steve

    maybe u can check by debuggin the incoming idoc in we19.
    1. check the data u are sending from the source system
    2. check for the field before and ater change in the target system.
    maybe the field is update with the same content. also check the status record of the idoc
    Message was edited by:
            Prabhu  S

  • Altering database during migration from MS Access 2000

    Hi to all Oracle forum members.
    I want to migrate a MS Access 2000 database to Oracle 9i release 2. I want to know how can I alter the database design during the migration progress. My plan is to split an existing table to more and re-arrange the data and maybe introduce some new tables as well. These changes cane be made using the Migration Workbench or after migrating to Oracle? What is the most efficient way to do that and how can I accomplish these changes?
    Thanks in advance...
    A desperate new Oracle user... :)

    Hello patriotaki! I used Oracle Migration Workbench and everything seems to be fine..just take care on code page migration isssues ...have fun!!!

  • Refreshing Entity Objects after Altering the table

    Hi,
    My Entity Object is based on a table... and View Objects on the Entity Objects. Now if I alter the table (just changing the width of the column), that change is not visible on the Entity Object. Is there any way I can automatically refresh the Entity Objects after altering the table(only column width is changed).
    (Changes made to Entity Objects manually are reflected in the View Object correctly.)
    Regards
    Faiyaz

    'changing the width of the column' means changing the size of the column in the table description in the database. For e.g.. In the original table I had a column OIL_KEY NUMBER(6). Now I change the column to be of size 12 i.e. OIL_KEY NUMBER(12). This does not get refreshed in the Entity Object.

  • How to tell if a user is issuing 'alter session statements'

    When I run 'alter session' from sqlplus in my schema, this does not get parsed and go to v$sql or show up in v$open_cursor. I have a user that is running queries from informatica. He says he is passing alter session statements through informatica, I want to see if they actually get there. The person is not real versed in oracle and I don't know informatica.
    i cant turn on trace cause he connects and disconnects and this would run immediately, I am not in a position to turn on system level tracing, add a trigger, or turn on auditing (not allowed).
    anyway to tell from a data dictionary view or something like that if these were issued by a given session? The queries run for a few minutes, so I have a bit before his session disconnects to query the data. I can't get him to change his code to stay connected. Is there a view that shows parameter changes for a given session?
    oracle: 10.2.0.5
    4 alter session commands are:
    Alter session set sort_area_size=999999999;
    Alter session set hash_area_size=999999999;
    Alter session set db_file_multiblock_read_count = 128;
    alter session enable parallel dml;
    Edited by: Guess2 on Jul 17, 2012 12:49 PM

    i cant turn on trace cause he connects and disconnects and this would run immediately, I am not in a position to turn on system level tracing, add a trigger, or turn on auditing (not allowed). If Informatica connects to Oracle via network, capturing TCP/IP traffic and mining in it may be your last resort.
    you can get session's PDML status from
    select pdml_status from v$session;
    i cant turn on trace cause he connects and disconnects and this would run immediatelythis contradicts to your following statement
    The queries run for a few minutes, so I have a bit before his session disconnects to query the data.
    I can't get him to change his code to stay connected. Informatica should have debug. Ask him if he can go step by step.
    Edited by: user11181920 on Jul 17, 2012 5:53 PM

  • How can I alter an existing OA Page to call my JSP page ?

    hi,
    I want to use the existing oracle payslip page that when the user selects a date and clicks the Submit button it does all the relevant processing as normal but instead of displaying the Oracle payslip it should then display mine.
    I don't think this possible in Personalization so i tried creating my own controller code. I decompiled the Controller Code on the server and copied that into my new Controller class. I then added my own code to do a setForward to my page.
    I copied this new class to the server under XXmycust.oracle.etc etc and added this entry top the jserv.properties file.
    I then went into Personalize this Page to alter the controller - I set the Controller for the page layout to be my new controller, and bounced Apache. But when I try to access the page I just get the red Error message. !!!
    What is the correct procedure if you want to alter an existing page's Controller code ?

    Hi,
    Here is more information for you.
    Here is the ORIGINAL decompiled oracle controller :
    // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3)
    // Source File Name: PayPayslipChoosePayslipCO.java
    package oracle.apps.pay.selfservice.payslip.US.webui;
    import oracle.apps.fnd.common.AppsContext;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.*;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.apps.fnd.framework.server.OADBTransactionImpl;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OARawTextBean;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.layout.OATableLayoutBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageChoiceBean;
    import oracle.apps.pay.selfservice.common.server.PayGetCommonFunction;
    import oracle.apps.pay.selfservice.common.server.PayOnlineSSPrefs;
    import oracle.apps.pay.selfservice.payslip.webui.PdfPayslip;
    import oracle.apps.per.selfservice.arch.webui.Constants;
    import oracle.apps.per.selfservice.common.SSHRParamTable;
    import oracle.apps.per.selfservice.common.SSHRParams;
    import oracle.cabo.ui.beans.BaseWebBean;
    import oracle.cabo.ui.beans.RawTextBean;
    import oracle.jbo.*;
    public class PayPayslipChoosePayslipCO extends OAControllerImpl
    private String buildURL(OAPageContext oapagecontext, String s)
    boolean flag = oapagecontext.isLoggingEnabled(1);
    String s1 = oapagecontext.getRootApplicationModule().getDbc();
    StringBuffer stringbuffer = new StringBuffer("OA.jsp?akRegionCode=PAY_PAYSLIP_TOP_SS");
    stringbuffer.append("&akRegionApplicationId=801");
    stringbuffer.append("&dbc=" + s1);
    if(flag)
    oapagecontext.writeDiagnostics(this, "redirect URL = " + stringbuffer, 1);
    return stringbuffer.toString();
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processRequest(oapagecontext, oawebbean);
    boolean flag = oapagecontext.isLoggingEnabled(1);
    String s = "";
    String s1 = "";
    oapagecontext.isLoggingEnabled(6);
    String s2 = PayGetCommonFunction.getLaunchedFunction(oapagecontext);
    String s3 = "";
    PayOnlineSSPrefs payonlinessprefs = new PayOnlineSSPrefs();
    String s4 = "PAYSLIP";
    if(flag)
    oapagecontext.writeDiagnostics(this, "processRequest start", 1);
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)oaapplicationmodule.getOADBTransaction();
    SSHRParams sshrparams = new SSHRParams(oapagecontext.getRootApplicationModule().getOADBTransaction());
    String s5 = String.valueOf(sshrparams.getLegislationCode());
    s5 = "".equals(s5) ? (String)oadbtransactionimpl.getValue("INIT_LOCALIZATION_CODE") : s5;
    String s6 = sshrparams.getSelectedPersonName();
    String s7 = sshrparams.getPersonId();
    String s8 = sshrparams.getAssignmentId();
    String s9 = sshrparams.getEffectiveDate();
    String s10 = oapagecontext.getMessage("PAY", "PAY_NO_SS_PREF_PAYSLIP_WEB", null);
    if(flag)
    oapagecontext.writeDiagnostics(this, "legislationCode = " + s5, 1);
    oapagecontext.writeDiagnostics(this, "personName = " + s6, 1);
    oapagecontext.writeDiagnostics(this, "personId = " + s7, 1);
    oapagecontext.writeDiagnostics(this, "assignmentId = " + s8, 1);
    oapagecontext.writeDiagnostics(this, "effectiveDate = " + s9, 1);
    OARawTextBean oarawtextbean = (OARawTextBean)oawebbean.findIndexedChildRecursive("PayPayslipCheckRecord");
    OAMessageChoiceBean oamessagechoicebean = (OAMessageChoiceBean)oawebbean.findIndexedChildRecursive("PayPayslipChoosePayslip");
    OATableLayoutBean oatablelayoutbean = (OATableLayoutBean)oawebbean.findIndexedChildRecursive("PayPayslipChseTable");
    if(flag)
    oapagecontext.writeDiagnostics(this, "Got noRecordMessage, poplist, chseTable", 1);
    if(oapagecontext.getTransactionValue("") == null)
    String s11 = payonlinessprefs.getPreferences(oaapplicationmodule, Integer.parseInt(s7), s4, s9, "Online_Doc");
    if(s11 == null)
    oapagecontext.putTransactionValue("", "Y");
    else
    oapagecontext.putTransactionValue("", s11);
    if(flag)
    oapagecontext.writeDiagnostics(this, "DISPLAY_PAYSLIP = " + oapagecontext.getTransactionValue(""), 1);
    if(oapagecontext.getTransactionValue("").equals("N"))
    if(oarawtextbean != null)
    oarawtextbean.setText(s10);
    oarawtextbean.setRendered(true);
    if(oamessagechoicebean != null)
    oamessagechoicebean.setRendered(false);
    if(oatablelayoutbean != null)
    oatablelayoutbean.setRendered(false);
    if(!oapagecontext.getTransactionValue("").equals("N"))
    if(oapagecontext.getTransactionValue("payslipDateChk") == null)
    String s12 = (String)oaapplicationmodule.invokeMethod("checkDate");
    oapagecontext.putTransactionValue("payslipDateChk", s12);
    String s13 = oapagecontext.getTransactionValue("payslipDateChk").toString();
    if(flag)
    oapagecontext.writeDiagnostics(this, "PAYSLIP_DATE = " + s13, 1);
    if(oapagecontext.getTransactionValue("payslipDateChk") == null)
    String s14 = oapagecontext.getMessage("PAY", "PAY_34978_PROFILE_PAYSLIP_WEB", null);
    if(oarawtextbean != null)
    oarawtextbean.setText(s14);
    oarawtextbean.setRendered(true);
    if(oamessagechoicebean != null)
    oamessagechoicebean.setRendered(false);
    if(oatablelayoutbean != null)
    oatablelayoutbean.setRendered(false);
    return;
    } else
    String s15 = "pay_us_employee_payslip_web.get_term_info( " + sshrparams.getSelectedPersonBusinessGroupId() + ",person_id,action_context_id) = 'Y'";
    OAViewObject oaviewobject = (OAViewObject)oaapplicationmodule.findViewObject("PayPayslipChoosePayslipVO");
    if(!oaviewobject.isExecuted())
    oaviewobject.setWhereClauseParams(null);
    oaviewobject.setWhereClauseParam(0, s5);
    oaviewobject.setWhereClauseParam(1, s5);
    oaviewobject.setWhereClauseParam(2, s7);
    oapagecontext.getTransactionValue("payslipDateChk").toString();
    oaviewobject.setWhereClauseParam(3, oapagecontext.getTransactionValue("payslipDateChk"));
    if(oapagecontext.getParameter("pEnableTerms") == null)
    oaviewobject.setWhereClause(s15);
    else
    if(!oapagecontext.getParameter("pEnableTerms").equals("Y"))
    oaviewobject.setWhereClause(s15);
    } else
    OAViewObject oaviewobject1 = (OAViewObject)oaapplicationmodule.findViewObject("PayPayslipGetFunctionParamVO");
    if(!oaviewobject1.isExecuted())
    oaviewobject1.setWhereClauseParams(null);
    oaviewobject1.setWhereClauseParam(0, "pEnableTerms");
    oaviewobject1.setWhereClauseParam(1, s2);
    oaviewobject1.executeQuery();
    oaviewobject1.reset();
    boolean flag2 = oaviewobject1.hasNext();
    if(flag2)
    OARow oarow = (OARow)oaviewobject1.first();
    if(oarow != null)
    String s18 = oarow.getAttribute("Funcparameter").toString();
    String s20 = PayGetCommonFunction.getParameterValue(s18, "pEnableTerms", "&");
    if(s20 != null)
    oapagecontext.putTransactionValue("N", s20);
    if(!s20.equals("Y"))
    oaviewobject.setWhereClause(s15);
    oaviewobject.executeQuery();
    if(flag)
    oapagecontext.writeDiagnostics(this, "executed PayPayslipChoosePayslipVO, Query is " + oaviewobject.getWhereClause(), 1);
    oapagecontext.writeDiagnostics(this, "executed PayPayslipChoosePayslipVO", 1);
    oaviewobject.reset();
    boolean flag1 = oaviewobject.hasNext();
    if(flag)
    oapagecontext.writeDiagnostics(this, "choosePayslipExists = " + flag1, 1);
    if(!flag1)
    String s16 = oapagecontext.getMessage("PAY", "PAY_34977_NO_EMP_PAYSLIP_WEB", null);
    if(oarawtextbean != null)
    oarawtextbean.setText(s16);
    oarawtextbean.setRendered(true);
    if(oamessagechoicebean != null)
    oamessagechoicebean.setRendered(false);
    if(oatablelayoutbean != null)
    oatablelayoutbean.setRendered(false);
    if(flag1)
    oarawtextbean.setRendered(false);
    if(oamessagechoicebean != null)
    oamessagechoicebean.setListDisplayAttribute("PayslipChoice");
    oamessagechoicebean.setListValueAttribute("ActionContextId");
    oamessagechoicebean.setPickListCacheEnabled(false);
    oamessagechoicebean.setPickListViewUsageName("PayPayslipChoosePayslipVO");
    oamessagechoicebean.setRequiredIcon("NO");
    if(flag)
    oapagecontext.writeDiagnostics(this, "Choose Payslip Drop down is set.", 1);
    Object aobj[] = oaviewobject.getWhereClauseParams();
    for(int i = 0; i < aobj.length; i++)
    if(flag)
    oapagecontext.writeDiagnostics(this, "Value of Bind variable of Choose Payslip (" + i + ") : " + aobj.toString(), 1);
    if(oapagecontext.getTransactionValue("pActionContextId") == null)
    OARow oarow1 = (OARow)oaviewobject.first();
    if(oarow1 != null)
    dbTrans = oaapplicationmodule.getOADBTransaction();
    s = dbTrans.decrypt(oarow1.getAttribute("ActionContextId").toString());
    oapagecontext.putTransactionValue("EffectiveDate", oarow1.getAttribute("EffectiveDate").toString());
    s1 = oarow1.getAttribute("ActionContextId").toString();
    oapagecontext.putTransactionValue("pActionContextId", s);
    oapagecontext.getTransactionValue("pActionContextId").toString();
    oamessagechoicebean.setDefaultValue(s);
    if(flag)
    oapagecontext.writeDiagnostics(this, "pActionContextId = " + s, 1);
    if(oapagecontext.getTransactionValue("pActionContextId") != null)
    s = oapagecontext.getTransactionValue("pActionContextId").toString();
    if(flag)
    oapagecontext.writeDiagnostics(this, "process_asg_action not null, pActionContextId = " + s, 1);
    if(oapagecontext.getParameter("pCalledFrom") != null)
    oapagecontext.putTransactionValue("", "Y");
    if(s2 != null)
    OAViewObject oaviewobject2 = (OAViewObject)oaapplicationmodule.findViewObject("PayPayslipGetFunctionParamVO");
    oaviewobject2.setWhereClauseParams(null);
    oaviewobject2.setWhereClauseParam(0, "pCallfromMgr");
    oaviewobject2.setWhereClauseParam(1, s2);
    oaviewobject2.executeQuery();
    oaviewobject2.reset();
    boolean flag3 = oaviewobject2.hasNext();
    if(flag3)
    OARow oarow2 = (OARow)oaviewobject2.first();
    if(oarow2 != null)
    String s23 = oarow2.getAttribute("Funcparameter").toString();
    s3 = PayGetCommonFunction.getParameterValue(s23, "pCallfromMgr", "&");
    if(!s3.equals("Y"))
    String s19 = String.valueOf(oapagecontext.getEmployeeId());
    String s21 = oadbtransactionimpl.getAppsContext().getFNDGlobal("EMPLOYEE_ID");
    String s22 = sshrparams.getLoginPersonId();
    String s24 = null;
    if(s != null && !s.equals(""))
    OAViewObject oaviewobject3 = (OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject("PayPayslipGetPersonDetails");
    if(!oaviewobject3.isExecuted())
    oaviewobject3.setWhereClauseParam(0, s);
    oaviewobject3.executeQuery();
    oaviewobject3.reset();
    boolean flag4 = oaviewobject3.hasNext();
    if(flag)
    oapagecontext.writeDiagnostics(this, "personExists = " + flag4, 1);
    if(flag4)
    OARow oarow3 = (OARow)oaviewobject3.first();
    if(oarow3 != null)
    s24 = oarow3.getAttribute("PersonId").toString();
    if(!s22.equals(s7) || !s21.equals(s22) || !s21.equals(s7) || !s19.equals(s7) || !s24.equals(s7))
    oapagecontext.writeDiagnostics(this, "BUG3926332 Security Violation : Login person id is not same as person id, HrLoginPersonId = " + s22 + " PersonId = " + s7 + " fndGlobalLoginUser " + s21 + " asgPersonId " + s24 + " pCurrentUser " + s19, 6);
    oapagecontext.writeDiagnostics(this, "BUG3926332 Security Violation : SessionId :" + oapagecontext.getSessionId(), 6);
    oapagecontext.writeDiagnostics(this, "BUG3926332 Security Violation : EncryptedActionContextId :" + s1, 6);
    oapagecontext.putTransactionValue("", "N");
    String s25 = oapagecontext.getMessage("PAY", "PAY_34977_NO_EMP_PAYSLIP_WEB", null);
    if(oarawtextbean != null)
    oarawtextbean.setText(s25);
    oarawtextbean.setRendered(true);
    if(oamessagechoicebean != null)
    oamessagechoicebean.setRendered(false);
    if(oatablelayoutbean != null)
    oatablelayoutbean.setRendered(false);
    throw OAException.wrapperException(new OAException("Not allowed to view payslip due to security violation"));
    PdfPayslip pdfpayslip = new PdfPayslip();
    if(flag)
    oapagecontext.writeDiagnostics(this, "Identifying payslip architecture ...", 1);
    String s17 = pdfpayslip.chooseArchitecture(oapagecontext, oaapplicationmodule, Integer.parseInt(s7), oapagecontext.getTransactionValue("EffectiveDate").toString(), s5);
    if(flag)
    oapagecontext.writeDiagnostics(this, "Payslip architecture -> " + s17, 1);
    if(s17.equals("PDF"))
    pdfpayslip.generate(oapagecontext, oaapplicationmodule, Integer.parseInt(s7), oapagecontext.getTransactionValue("pActionContextId").toString(), oapagecontext.getTransactionValue("EffectiveDate").toString(), s5);
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    boolean flag = oapagecontext.isLoggingEnabled(1);
    if(flag)
    oapagecontext.writeDiagnostics(this, "-----ProcessFormRequest start\n", 1);
    super.processFormRequest(oapagecontext, oawebbean);
    if(oapagecontext.getParameter("HrGoButton") != null)
    if(flag)
    oapagecontext.writeDiagnostics(this, "****** Go Pressed\n", 1);
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    dbTrans = oaapplicationmodule.getOADBTransaction();
    String s = dbTrans.decrypt(oapagecontext.getParameter("PayPayslipChoosePayslip").toString());
    if(flag)
    oapagecontext.writeDiagnostics(this, "Assignment_action_id = " + s, 1);
    oapagecontext.putTransactionValue("pActionContextId", s);
    OAViewObject oaviewobject = (OAViewObject)oaapplicationmodule.findViewObject("PayPayslipArchDataVO");
    oaviewobject.setWhereClauseParam(0, s);
    oaviewobject.executeQuery();
    OARow oarow = (OARow)oaviewobject.first();
    oapagecontext.putTransactionValue("EffectiveDate", oarow.getAttribute("EffectiveDate").toString());
    String s1 = buildURL(oapagecontext, s);
    if(flag)
    oapagecontext.writeDiagnostics(this, "redirecURL >> " + s1 + "\n", 1);
    oapagecontext.setRedirectURL(s1, true);
    public PayPayslipChoosePayslipCO()
    public static final String RCS_ID = "$Header: PayPayslipChoosePayslipCO.java 115.21 2006/04/20 04:04:30 sdahiya noship $";
    public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: PayPayslipChoosePayslipCO.java 115.21 2006/04/20 04:04:30 sdahiya noship $", "oracle.apps.pay.selfservice.payslip.US.webui");
    public static final String PROCESS_ASG_ACTION = "pActionContextId";
    public static final String DISPLAY_PAYSLIP = "";
    public static final String PAYSLIP_DATE = "payslipDateChk";
    public static final String CALLED_FROM_MGR = "";
    public static final String EnableTerms = "N";
    public OADBTransaction dbTrans;
    =====================================================
    HERE IS MY NEW CONTROLLER
    =====================================================
    package XXmizuho.oracle.apps.pay.selfservice.payslip.US.webui;
    import oracle.apps.pay.selfservice.payslip.US.webui.PayPayslipChoosePayslipCO;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.OARow;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    public class XXmizuhoPayPayslipChoosePayslipCO extends PayPayslipChoosePayslipCO
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processRequest(oapagecontext, oawebbean);
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    boolean flag = oapagecontext.isLoggingEnabled(1);
    if(flag)
    oapagecontext.writeDiagnostics(this, "-----ProcessFormRequest start\n", 1);
    super.processFormRequest(oapagecontext, oawebbean);
    if(oapagecontext.getParameter("HrGoButton") != null)
    if(flag)
    oapagecontext.writeDiagnostics(this, "****** Go Pressed\n", 1);
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    dbTrans = oaapplicationmodule.getOADBTransaction();
    String s = dbTrans.decrypt(oapagecontext.getParameter("PayPayslipChoosePayslip").toString());
    if(flag)
    oapagecontext.writeDiagnostics(this, "Assignment_action_id = " + s, 1);
    oapagecontext.putTransactionValue("pActionContextId", s);
    OAViewObject oaviewobject = (OAViewObject)oaapplicationmodule.findViewObject("PayPayslipArchDataVO");
    oaviewobject.setWhereClauseParam(0, s);
    oaviewobject.executeQuery();
    OARow oarow = (OARow)oaviewobject.first();
    oapagecontext.putTransactionValue("EffectiveDate", oarow.getAttribute("EffectiveDate").toString());
    String s1 = buildURL(oapagecontext, s);
    if(flag)
    oapagecontext.writeDiagnostics(this, "redirecURL >> " + s1 + "\n", 1);
    oapagecontext.setRedirectURL(s1, true);
    oapagecontext.setForwardURL("testdb1.jsp",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    =================================================
    HERE ARE THE ERRORS WHEN I ACCESS THE PAGE
    ===================================================
    oracle.apps.fnd.framework.OAException: java.lang.ClassCastException
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:597)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at oa_html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._RF._jspService(_RF.java:102)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.lang.ClassCastException
         at oracle.apps.pay.selfservice.payslip.US.webui.PayPayslipChoosePayslipCO.processRequest(PayPayslipChoosePayslipCO.java:177)
         at XXmizuho.oracle.apps.pay.selfservice.payslip.US.webui.XXmizuhoPayPayslipChoosePayslipCO.processRequest(XXmizuhoPayPayslipChoosePayslipCO.java:14)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at oa_html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._RF._jspService(_RF.java:102)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    java.lang.ClassCastException
         at oracle.apps.pay.selfservice.payslip.US.webui.PayPayslipChoosePayslipCO.processRequest(PayPayslipChoosePayslipCO.java:177)
         at XXmizuho.oracle.apps.pay.selfservice.payslip.US.webui.XXmizuhoPayPayslipChoosePayslipCO.processRequest(XXmizuhoPayPayslipChoosePayslipCO.java:14)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at oa_html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._RF._jspService(_RF.java:102)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)

  • Create view and alter Session gets 0RA-01031

    I can't create a view after using ALTER SESSION set current_schema without using an explicit schema. I get ORA-01031. Is this a known bug? Here are the details:
    1. Log on as SYSTEM
    2. ALTER SESSION set current_schema=FRED;
    3. CREATE VIEW vFoo as select * from Foo;     -- ORA-01031: insufficient privileges
    4. CREATE VIEW FRED.vFoo as select * from Foo;     -- this works!
    I've read where some privileges need to be granted directly. In fact, if Fred grants select privilege on Foo to SYSTEM, the statement in #3 above works. However, something doesn't seem right because why does #4 succeed without the GRANT?
    In case you're wondering why I don't just use #4 above, which does work, it's because I've got a script that will be run by customers to create tables, views, etc. in an arbitrary schema and the schema is associated with a user with limited permissions. Hence, the use of the ALTER SESSION.

    See, You looged as SYSTEM (Scheme = SYSTEM)
    Now you alter your session to another schema FRED.
    Now if you want to access SCHEMA of FRED, You need to connect first.
    SQL > connect user/password@host
    Then
    SQL > CREATE VIEW vFoo as select * from Foo;
    View created.

  • Using alter user to change oracle password for logged in web user on XE

    Hi All
    I'm building an app using the pl/sql web toolkit on XE (installed on Win XP Pro SP2). (I'm not using the APEX front-end).
    I'm using basic authentication and oracle database user accounts, and when a user registers for the first time I create them an oracle user account with dynamic sql, followed by some initial setup stuff, and they then log in with it.
    All fine so far.
    However I want to allow the user to change their oracle password as part of maintaining their user details. I've done this in the past using the web toolkit and Oracle 9i and it has worked fine using dynamic sql.
    Unfortunately I can't get the same thing to work in XE.
    For example, if I create the following procedure in the schema aligned to the DAD which holds my application and then run it from a browser (IE or Firefox) then the
    Browser and the db just hangs - not even an error message:
    CREATE OR REPLACE PROCEDURE ut
    AS
    v_stmt varchar2(300);
    BEGIN
    HTP.htmlOpen;
    HTP.headOpen;
    HTP.title ('User Test');
    HTP.headClose;
    HTP.bodyOpen;
    v_stmt := 'alter user "'||user||'" identified by "BERT"';
    htp.print(v_stmt);
    EXECUTE IMMEDIATE v_stmt;
    htp.print('Done');
    HTP.bodyClose;
    HTP.htmlClose;
    END;
    If I run the same statement in SQL*plus it's fine, and if I run the same proc for a different user then it's fine too.
    I'm sure it's something to do with trying to change the credentials of the currently logged in user, but I would at least have expected an error message.
    I'd be grateful for any ideas.
    Thanks
    Steve

    Hi g.myers
    Thanks for your response.
    Sorry, yes, bad turn of phrase there. It's not the entire db that hangs. The web browser (either IE or FF) hangs, and if I look at v$session at this point, I can see that the user STATUS=ACTIVE and the STATE=WAITING.
    I should also point out that I am using standard Oracle users as users of the application, (e.g. create a new user account called TESTER1). These users are then granted the appropriate privileges on the owning schema in order to run the app, access the tables etc.
    Therefore it is the user account (e.g. TESTER1) that is running the password change procedure that is owned by the SYS schema. (However again, this is the exact code and method that I've used in the past and it has worked fine).
    If I leave the browser hanging long enough, it will eventually return with the following error:
    Proxy Error
    The proxy server received an invalid response from an upstream server.
    The proxy server could not handle the request POST /h/hopapp.pwdmaint_do.
    Reason: Error reading from remote server
    cheers
    Steve

Maybe you are looking for

  • Bursting FSG Reports in R12.0.3

    Hi, I am trying to burst an FSG report using the integrated bursting java concurrent program. The FSG report is running fine and producing the XML publisher output as expected. I then run the java concurrent program for bursting setting the concurren

  • Iweb updated page does not display correctly in firefox or safari

    www.rohanstevenson.com tried to update my site with a couple of cues and the wheels have completely come off. i cannot get the site to display correctly. it looks a bit better if i open the page directly from the computer, but after sending it to ftp

  • Can the X6 autoconnect to Internet without prompts...

    Hi My wife has an X6 and loves it, except for the handling of Internet connections which she finds very annoying.  However the phone is configured, it seems impossible to set it up so that connections are made to the Internet automatically without ha

  • OfficeJet Pro 8600 Plus Squeaking

    I have an Officejet Pro 8600 Plus, and after a pring about 50 pages it begins to squeak quite loud when it is feeding the paper through while printing.  It sounds like part of the mechanism needs to be oiled.  I have seen many complaints regarding th

  • Possible Mac Mail Security Issue

    A couple of times each week, I'm receiving returned e-mail messages that describe mail that I did not actually send.  The "undeliverable" addresses in the Mailer-Daemon notifications are unfamiliar and involve a different overseas address for each no