Oracle.jbo.RowInconsistentException:JBO-25014:Another user has changed the

Hi Experts,
I am working jdev 11.1.1.3.0
I am trying to update selected rows on the table, for this i lam getting selected data from the table and updating one flag on the row.
when i executing save/commit i am getting below error.
oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[653974305 ].
     at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1064)
     at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:548)
     at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:7843)
     at oracle.jbo.server.EntityImpl.populate(EntityImpl.java:6563)
     at oracle.jbo.server.EntityImpl.merge(EntityImpl.java:6900)
     at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:918)
     at oracle.jbo.server.EntityCache.add(EntityCache.java:485)
     at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:2921)
     at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:3550)
     at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5182)
     at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3304)
     at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3164)
     at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2154)
     at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:4853)
     at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2914)
     at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2770)
     at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:3011)
     at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2677)
     at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1221)
     at oracle.jbo.server.ViewRowSetImpl.activateRowSetState(ViewRowSetImpl.java:6920)
     at oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3908)
     at oracle.jbo.server.ViewRowSetImpl.activateIteratorState(ViewRowSetImpl.java:6971)
     at oracle.jbo.server.ViewObjectImpl.activateIteratorState(ViewObjectImpl.java:17791)
     at oracle.jbo.server.ApplicationModuleImpl.activateVOs(ApplicationModuleImpl.java:7893)
     at oracle.jbo.server.ApplicationModuleImpl.doActivateState(ApplicationModuleImpl.java:7639)
     at oracle.jbo.server.ApplicationModuleImpl.doActivateAMState(ApplicationModuleImpl.java:7606)
     at oracle.jbo.server.Serializer.activate(Serializer.java:291)
     at oracle.jbo.server.ByteSerializer.activateRootAMFromBytes(ByteSerializer.java:93)
     at oracle.jbo.server.ApplicationModuleImpl.activateFromStack(ApplicationModuleImpl.java:6255)
     at oracle.jbo.server.ApplicationModuleImpl.activateState(ApplicationModuleImpl.java:6070)
     at oracle.jbo.server.ApplicationModuleImpl.activateStateForUndo(ApplicationModuleImpl.java:8582)
     at oracle.jbo.server.DBTransactionImpl.restoreTmpPostState(DBTransactionImpl.java:1843)
     at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2999)
     at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2018)
     at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2277)
     at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1577)
     at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1404)
     at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1427)
     at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2141)
     at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:730)
     at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
     at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:411)
     at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:111)
     at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:117)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
     at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
     at java.awt.Component.processMouseEvent(Component.java:6263)
     at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
     at java.awt.Component.processEvent(Component.java:6028)
     at java.awt.Container.processEvent(Container.java:2041)
     at java.awt.Component.dispatchEventImpl(Component.java:4630)
     at java.awt.Container.dispatchEventImpl(Container.java:2099)
     at java.awt.Component.dispatchEvent(Component.java:4460)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
     at java.awt.Container.dispatchEventImpl(Container.java:2085)
     at java.awt.Window.dispatchEventImpl(Window.java:2478)
     at java.awt.Component.dispatchEvent(Component.java:4460)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
i search in forums and tried all the options like
1. jbo.locking.mode to Pessimistic no use -- i am not getting the error but at the same time row is not updating.
2. set the refresh after update/insert no use
EVEN THE SAME PROBLEM WHEN I RUN AM ASWELL.
Any inputs could be highly appreciate.
Edited by: user642703 on Feb 21, 2012 8:58 PM

Hi,
See
JBO-25014: Another user has changed .. call StoredProc after commit .helpp
Another user has changed the row with primary key oracle.jbo.Key[1447 EN ]
http://radio-weblogs.com/0118231/stories/2004/03/24/whyDoIGetOraclejborowinconsistentexception.html

Similar Messages

  • JBO-25014: Another user has changed the row with primary key oracle.jbo.Key

    Hi,
    I am developing a Fusion Web Application using Jdeveloper 11.1.2.1.0. I have a home.jspx page that has a ADF table built on efttBilling View Object. . When you click on one of the rows in the table, it will take you to detail.jspx where you can edit the row and save. When 'save' is clicked, stored procedures are executed to update/insert rows into few tables , and then go back to home.jspx where you need to see updated content for that row.
    To get down to the exact issue, updates are made to the tables on which the efttBilling View Object is built using a stored procedure. Once this is done, I am trying to requery view object to see new content. But I keep getting JBO-25014: Another user has changed the row with primary key oracle.jbo.Key error. Following are the approaches I followed to query new results:
    a. Executed Application Modules Commit Method. Created 'Commit' Action binding and tied it to homePageDef.xml. Called this binding from a view scope bean.
        BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
         OperationBinding operationBinding = bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
       if (!operationBinding.getErrors().isEmpty())
        return null;
    b. Marked 'Refresh on Insert' , 'Refresh on Update', 'Change Indicator' checkboxes for all the attributes in the entities associated with efttBilling View Object.
    c. Tried to Requery View Object. Created a refreshViewObject method in Application Module Impl.java file, exposed this method to the client interface and created a invokeMethod Action binding in home.jspx
    Code in Application Module:
      public void refresheftTransactionsforBillingAccountViewObj1View()
        System.out.println("In eftTransactionsforBillingAccountViewObj1");
      findViewObject("eftTransactionsforBillingAccountViewObj1").executeQuery();
    Code in view scope bean
            DCBindingContainer bindings =
           (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            OperationBinding operation =
            bindings.getOperationBinding("refresheftTransactionsforBillingAccountViewObj1View");
            operation.execute();
    I have searched web, ADF forums and tried methods suggested in there but no sucess.
    Could anyone please provide some insight in this issue. I have been battling with this since quite some time. I can provide you with the log file too.
    Thanks!
    Shai.

    What code does your Commit method have .. can you try using the Commit executable from the AM itself instead ?
    Also -
    Shai wrote:
    'Change Indicator' checkboxes for all the attributes in the entities associated with efttBilling View Object.
    which all attributes you set this property for . it should just be for History columns as such.
    Did you also check if this could be your scenario ?
    Decompiling ADF Binaries: Yet another reason for "JBO-25014: Another user has changed the row with primary key orac…
    OR
    JBO-25014: Another user has changed the row with primary key oracle.jbo.Key
    OR
    Another user has changed the row with primary key -Table changed externally
    Message was edited by: SudiptoDesmukh

  • JBO-25014: Another user has changed the row with primary key...

    Hello,
    could you help me please with resolving this error "JBO-25014: Another user has changed the row with primary key..." - I am just getting a row from a view by bind "filter" variable, then I am assigning new values for some of the attributes - and trying to commit ..unsuccessfully..
    View is based on Entity.
    I saw directive for setting Entity's attributes as "update after insert / update" - but this did not help me.
    Thanks in advance.

    Hi
    Please try this solutions:
    One solution is to change the ADF BC locking behavior to optimistic instead of pessimistic. Choose the AM and click the Configuration context menu option. Select the LocalAM entry and go to the Properties. Scroll down to the locking setting and change the existing entry
    If there is a trigger changing values, you need to mark those attributes (the ones that may be changed) as refresh after insert and/or refresh after update in your Entity Object.

  • JBO-25014 : Another user has changed ....

    Hi
    This is something strange in my application, let me explain:
    I have an entity object (let's say Entity1) and two view objects created from Entity1
    (let say View1 & View2). View1 & View2 are defined exactly the same except
    each one is a detail(child) of another view object.
    The problem on view1 is : when i try to update or delete the same row that just added
    will receive JBO-25014 : Another user has changed the row with primary key oracle.jbo.key[....]
    Note: that work perfect on my development pc when run the application via JDeveloper,
    but this error comes when call the application on web server via browser (real life).
    Also the other view (view2) that i mentioned above works perfect either via
    JDev or via browser. And also i made sure that followed all the suggestions
    made by documention ( 1-frequently used executeQuery 2-Refresh after insert/update is checked 3-nobody else
    work with the application except me at testing time).
    Would appreciated to share me any idea comes in your mind.
    Thanks...Ali

    Ali:
    The most common reasons for this error are the following:
    1. Someone else really did change the row. This doesn't appear to be the case in your scenario.
    2. Some attributes in your row are of Java class whose implementation of equals() is incorrect.
    Let me explain #2 a bit further. When you update/delete a row, we lock the row in DB and then bring in the latest values to see if another user had changed the row since this user read the row.
    To compare the value in cache with that from db, we call equals() method. If equals() method returns false when in fact the two attrs are really equal, you could get this error unexpectedly.
    So, I would suggest checking attribute types to see if there are some 'estoeric' attr types and see if the equals() method is misbehaving.
    Thanks.
    Sung

  • Error on commit: Another user has changed the row with primary key : Rec_10

    i am using jdev 11g R2
    i implemented a master form and two detail tables on a jspx page
    added createInsert, commit and rollback buttons
    actions from these buttons all are executed from a bean
    for entity attributes: refresh after insert and update are marked as checked
    i am using login page for authorizing the user by getting the user information from user table
    and then using the userid i am applying the setVisible property on some components at bean code
    when i am inserting a new row there is no problem, here i am generating the new id like 'Rec_10', using a database sequence
    but when i am trying to update a current record, it is showing the error --> Error on commit: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[Rec_22 ]
    on clicking the commit button and also it is not updating the record on database
    Thanx in Advance
    kumar
    Edited by: user10922309 on Nov 18, 2009 3:25 AM
    Edited by: user10922309 on Nov 18, 2009 4:28 AM

    Hi John
    thnq for your quick responce.
    here are the attribute details:
    Attribute Name: RecID, Type: String, Value Type: Expression, Value: 'Rec_' + (new oracle.jbo.server.SequenceImpl("Rec_SEQ_AN", object.getDBTransaction())).getSequenceNumber()
    Updatable: While New and Primary Key, Queryable, Persistent, Mandatory, Refresh After: Update, Refresh After: Update and Insert are markded as checked
    error details:
    oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[APP_22 ].
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1062)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:548)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:7762)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5554)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:6057)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6229)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3127)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2935)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1991)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2233)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1580)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1404)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1289)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2120)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:693)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:217)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:201)
    --> at Index.saveApplicationAll(Index.java:6246)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1245)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:673)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:165)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    --> on click commit button Index.saveApplicationAll method will invoked.
    Thats it.
    Kumar
    Edited by: user10922309 on Nov 18, 2009 4:32 AM

  • JBO-25014: Another user has changed .... can I change myViewRowImpl.java???

    Hi all,
    I'm noob working with jDeveloper and ADF and i'm finding a lot of problems building my application. The first one: "JBO-25014: Another user has changed .."
    I have been reading a lot about this problem and its different causes but seems that nothing helps me so i'm gonna tell you my problem and i hope that someone know how to solve it.
    My page shows a table and below it the details of each row selected in the table in read only mode.
    The table shows fields from a table in database and other fields with information not located in database (CMS). To build it i used the wizard to create a bussines component from a table . After i added the properties that are not located in database to the view and entity object.
    I generated java code for the view (myViewImpl.java & myViewRowImpl.java) and for the aplicacion module (myAmImpl.java) and in java class for the application module I overwrote some methods (findViewObject & getViewObjects) to add the source code needed to get data from CMS and add it to the data obtained from database.
    That works perfecly!
    Now, I wrote a new method in myViewImpl.java which get data from details form and update table in database (moreover other task: send mail, sms....). This method is executed with a command button. Method commits transaction after each operation. Again this works perfectly!
    The problem comes when i try to refresh the table with the new data after update. I tried different solutions:
    - Option 1: Clear cache after commit. Problem: When table is reloaded I'm losing data obteined from CMS and also this process is too heavy, i would like to avoid to go to CMS to reload whole table with every update of a row.
    - Option 2: Set new values directly in object myViewRowImpl.java. That could be the perfect solution, after every update i just inform the row object with the new values. The problem is that when i try to commit the transaction I'm getting a JBO-25014. If I set the new values before commit, the errors comes in this commit, if i set the values after the commit, the error comes in the next row to be updated.
    Any idea of how to avoid the problem in option 2????
    Other general sugestion????
    Thanks in advance!!
    Curro.
    PD: Sorry for my poor english

    Hi,
    Using ADF BC, the default locking behavior is set to pessimistic. Check the ApplicationModule configuration (right mouse click the AM and choose "configuration") and change the locking property to optimistic.
    Also you need to set the EO attributes to refresh after insert and/or refresh after update.
    ~Abhijit

  • Another user has changed the row with primary key oracle.jbo.Key

    Oracle Jdeveloper 11.1.2.1
    ADFbc + JSF
    I have a Page ( Purchase Order Status) (which show all PO to be approved) from this page (page1) the Supervison can call Regular PO (Page2) and change whatever he needs to change. (products, quantities, discounts,warehouse...)
    then on Page2 he invoke (commit) after his changes and return to page1, when supervisor change the status to Approved on page1. I get this Error (Another user has changed the row with primary key oracle.jbo.Key[#]).
    for sure there are no another user changing this PO.
    both page are based on same Entity Object (PO) , how can I solve this Issue? thank you

    hi,
    This occur due to pessimistic locking mode for ApplicationModule ,alter to optimistic and check following sample to get knowledge about locking mode.
    http://andrejusb.blogspot.com/2010/03/optimistic-and-pessimistic-locking-in.html-Suersh

  • Another user has changed the row with primary key oracle.jbo.Key   HELP

    I created VO which based on two entities. Then user search from that VO, when result comes update two row of each entity .
    HERE my function
    public String lockPayment() {
    getAppImpl().getcheckPaymentsVO1().setRangeSize(-1);
    Row[] rw2 = getAppImpl().getcheckPaymentsVO1().getAllRowsInRange();
    checkPaymentsVORowImpl tparow;
    tparow = null;
    for (int j = 0; j < rw2.length; j++) {
    tparow = (checkPaymentsVORowImpl)rw2[j];
    // tparow.setApayLock("1");
    tparow.setAtaxLock("1");
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    When I click it gives me error:
    ----------> Another user has changed the row with primary key oracle.jbo.Key
    Any suggestion !!!!!!
    Edited by: 903927 on Dec 14, 2012 1:00 AM

    Hi,
    see this: https://blogs.oracle.com/onesizedoesntfitall/entry/the_case_of_the_phantom
    Frank

  • Another user has changed the row with primary key -Table changed externally

    Hello,
    I am facing the error: "Another user has changed the row with primary key oracle.jbo.Key[94 ]." during the delete operation.
    User case scenario:
    1. Added new row in the table.
    2. Once new row is added to the the table, another application will update few columns in the newly added row based on some logic.
    3. On the same session I am trying to delete the newly added row and getting above mentioned error.
    I have added a "Button" in the table to partialRefresh the table to check the new values of the changed columns.
    I have checked the forum and found many similar errors and tried the following but nothing helped.
    1. By setting "Auto Refresh = True" for the view object.
    Issue faced-> It worked fine but after few add and remove my db is getting to inconsistent state after which, I am not able to do any add/delete from my page.
    Error: "Too many objects match the primary key oracle.jbo.Key". I have checked this and I am not getting this error when "Auto Refresh = False" even after multiple add and remove actions.
    2. By Setting "Auto Refresh" the iterator associated with the page.
    Issue -> Did not work at all.
    Looking forward inputs from gurus.
    Thanks
    Abhijeet

    Finally I found one solution to this problem at: [ http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/|http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/]
    Simply overriding the lock() method in the entity object resolved issue. Kudos to the author.
    Code:
    public void lock() {
    try {
    super.lock();
    } catch (RowInconsistentException e) {
    refresh(REFRESH_WITH_DB_ONLY_IF_UNCHANGED | REFRESH_CONTAINEES);
    super.lock();
    But, Now my refresh button is not working as depend on the "Auto Refresh = True" to update the table.
    Can anyone tell me how can I refresh the VO of my table from the button.
    Thanks
    Abhijeet.
    P.S: I have already added the partial trigger but it is work not working as the data is cached in the VO. Removing the Cached property for the VO is creating other problems.

  • Another user has changed the row with primary key exception

    Hi Experts,
    I have a method in AmImpl.java. I am calling this method from my bean. The method opens a JDBC connection(i know it is not a good approach, we should use AM instance, but this was the last option as had tried all) and updates a table in the database. I want the data to be refreshed on screen after update is performed. So, I am doing VO.executeQuery() after i commit the data in the database and that is when i get the exception "Another user has changed the row with primary key exception".
    Can you please tell me how to get rid of this error or any other way of doing the above process?

    I have a screen divided into two parts, i have used a Panel splitter for that. Each pane has a table. Say i edit a record in table 1 and on the basis of changing a flag, the record should move out of table 1 and should go to table 2 in the second pane. the records in table 1 have some priorities defined by the end user, so if a record moves out or is reordered within that table, the rest of the records' priority number also changes. I have achieved all this. Now, when I apply a filter on the table, the record set gets filtered and contains limited set of rows. Now, when i try to achieve the two processes i have mentioned above (moving out or reordering), I need to have a control over the entire rowset because i need to alter the priority numbers accordingly but the VO iterator contains only the filtered set of rows even if I do VO.executeQuery. I was not able to get the entire rowset, so thats when i decided to use JDBC and i am able to successfully update the database. Then after the update, i need to refresh the table on the screen, so I did Vo.executeQuery in the bean after the method was called and I encountered this error. Then, I removed this Vo refresh from the bean and did this.getVO.executeQuery in the AmImpl method, after i commit changes in the database, it was working fine for few days but now it has started flashing the exception "Another user has changed the row with primary key exception".

  • JBO-25014: Another user has changed + DB Update trigger

    I have an DB update trigger on each row that updates 2 fields of the cuurent row:
    :New.T_SCHEDULE := SYSDATE + interval '+0 1:0:0' day to second;
    :New.STATUS := 30;
    In the Entity I have set Refresh after update/insert to yes for the attributes based on those updated fields.
    Now in a AM service method I change values of other fields through a design time ViewObject row and commit the transaction.
    The second time I activate that service method I get the JBO-25014 exception.
    Adding the following just after the commit statement solves the problem:
    trans.commit(); currentWeventContactListRow.refresh(Row.REFRESH_WITH_DB_FORGET_CHANGES);
    Should the framework not refresh the attributes updated by the trigger because of the parameter Refresh after update/insert set to yes?
    Or didn't I understand the meaning of Refresh after update/insert of an entity attribute?
    Thanks
    Frederic

    That was bug# 3935904, which I filed on behalf of your thread here:
    adf timestamp bug when value documented by db trigger
    That was closed as a duplicate later of bug# 4515623, fixed in Oracle Database 11g
    There are backports of that bug available for various earlier versions of the database. You might check with support to see if that's what you're encountering and whether the patch would remedy your problem.

  • Error :- Another User has altered the quantity of Batch B01

    Hello Experts,
    I have created a addon through which in Sales Order while entering the quantity and pressing tab automatic Batch allocation
    is done row wise for items . This process is working fine while entering .
    But from last two days while adding the Sales order with batch allocated sap is throwing an error message that
    "Another User has altered the quantity of Batch B01 in Warehouse SYD in row - 11"
    This is not my addon error message .This error is thrown by SAP which has blocked the Sales Order Entry.
    I am confused about what to do with this .Since this problem need to be resolve urgently .
    Please help me regarding this.
    thanks ,
    Amit

    Hi Jisha,
    The problem which i was facing is not yet fully solved .
    Since in SAP 8.8 the message is much more understandable as this is happening because another user has allocated the
    batch quantity for the same item and the Batch is allocated for another user.
    If you can try creating a Item - X of Quantity - 10 into two Batches A  and B
    A- 5 Qty
    B - 5 Qty
    Then if one User say "User - A'" opens the Sales Order Form and select the Item - X  with Quantity - 5 and then select the Batch option system will automatically allocate the first Batch (A) for 5 Qty  and the Order is not yet saved.
    Same time if another user "User - B" opens a sales order and select the same Item - X with quantity - 5 and then select the
    Batch Option system will automatically allocate the first Batch (A) for 5 Qty (But actually the first user has already allocated the
    5 Qty for Batch - A ) . Then while adding the Order "User - A"  order gets allocated with Item - X 5 Qty into the Batch table.
    When the second user tries to add the order with Item -X allocated in also Batch - A system generates this message
    " Another User modified the quantity of Batch A" since this batch is already allocated by user - A.
    This was the cause for this message and still i have not found any solution for that.
    Just told the clent to reallocate the batch for the items where this message is thrown .
    Thanks & Regards,
    Amit

  • SPEL? make REASON field required if user has changed the value in SALARY

    I have a requirement to make REASON field required if user has changed the value in SALARY field. Is it possible using spel? what are my options?

    Karan,
    You can change the Rendered Property through personalization.
    But in your requirement you need to attach the Spell through personalization & extend the existing CO to set the value of the SPELL based upon the condition.
    Note - Refer this thread http://forums.oracle.com/forums/thread.jspa?threadID=2176729&tstart=0. If you have worked on SSHRParams kindly help the user.
    Regards,
    Gyan

  • How to refresh ViewObject from database when another user has changed data?

    Hello, I use oracle database server 9.0.2 and JDeveloper 9.0.3 and I am developing a JClient application. I have JTable which is bound to a certain view object based on one entity and this is shared between many users. If a user inserts or updates a row in the viewobject (using for example the table) and commits changes, another user can not see the the inserted row while the underlying viewobject executeQuery() call.
    What I need is to refresh data for all users if one of them inserts or updates date. Is it possible?
    What I was able to think of was to use timer and executeQuery in certain period of time. Is there any better way? I mean kind of event which is fired when underlaying data has been changed?
    Thank you in advance!

    So you're saying there is no way for a client application to receive notice from the database that a table has been updated? It seems like this would be a valuable feature, and in fact I could very much use such a feature right now.

  • [OIBT] , 'Another user has altered the quantity of batch  .....

    Hi All
    I Have this problem when I've try to make a Delivery Notes
      Set pdoc = pCompany.GetBusinessObject(oDeliveryNotes)
      pdoc.CardCode = CardCode
      pdoc.CardName = CardName
      pdoc.DocDate = Date
      pdoc.DocDueDate = Date
      pdoc.TaxDate = Date
      Set pdcLine = pdoc.Lines
    'Loop
    do while mObj.count
      pdcline.ItemCode = mObj.ItemCode
      pdcline.Quatity = mObj.Quantity
      pdcline.Price = mObj.Price
      pdcline.BatcNumber = mObj.Batch
      pdcline.Quanity = mObj.BtchQuantity
      RetLng = pdoc.Add
      If RetLng <> 0 then
          LogDf oCmp.GetLastErrorDescription , PATHDF ,True
      End If
    Batch is present in the B1 and the Quantity is the same... I make this operation in a Loop iteration
    Bye Thx..

    Please check this thread:
    Error While Making Inventory Transfer
    Thanks,
    Gordon

Maybe you are looking for

  • How to deal with forum spam

    What is spam? Occasionally, someone (usually a brand new poster) will come along and start submitting posts advertising a product or service. Spam can also be defined as the same message being posted over and over again. We have guidelines in place t

  • Problem in using the f:attribute tag in JSF

    when I am trying to loop the JSF using the JSTL tag <c:foreach> I am getting the value as "Error:form_id0" .cold any one help me please

  • XML Schema questions

    Question 1: If I have a many to many relationship that I want to display within multiple tables.  Is there a straightforward way to bind that? An example would be an automobile that use similar parts (seats etc).  I dont think livecycle supports keys

  • Exposé in System Preferences

    Hi Everyone. I just bought MacPro and enjoying it very much. I was using the hot corners but now I cannot activate the corners. I am unable to find the Exposé in System Preferences. When i tried to search it, it says that this file does not exist. It

  • My itunes library has more songs than my ipod will hold.

    My itunes library has more songs than my ipod will hold. What is the best way for me to choose what actually goes on the ipod?