Optimistic Locking - Specifying an alternative User message

Scenario...
User A selects a record
User B selects the same record
User A makes a change and commits/applies it
User B makes a change to the same record and ties to commit
Result...User B gets the following message...
Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "56693D48DF0C4F9D2A06AE5976FA6E8F", item checksum = "FC863259F75396F19D003B6B5E687758"., update "MAPOWN"."MAP_ALERT_LEVELS" set "MEASURE_ID" = :b1, "MEASURE_DESC" = :b2, "WARN_DFT" = :b3, "DANGER_DFT" = :b4, "WARN_TMP" = :b5, "DANGER_TMP" = :b6, "RECOMMENDATION" = :b7
PROBLEM
How do I capture this message and present a more user-friendly one??
regards
Paul P

Paul - I don't know of a way around this other than to code your own optimistic locking logic and raise/handle an exception before the automatic row processing process catches it.
Scott

Similar Messages

  • Trying to unlock the user, message says " user xyz is still locked"

    Hi,
    I am trying to unlock a user locked due to incorrect logins, the message "user xyz is still locked" comes up and user is not unlocked. I don't remember seeing this message earlier. SAP 4.7.
    Any ideas/suggestions, please.
    Thanks in advance
    Ravi

    Hi
    Are you using CUA ? in that case you might need to unlock the user on the central system, Furthermore check transaction SCUL
    Regards
    Morten Nielsen

  • Toplink Optimistic Locking not working with Session Bean facade.

    I am working on Oracle JDeveloper v 10.1.2 and connecting to an Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
    The application is based on J2EE architecture and the technology stack uses Struts for presentation/controller framework, Stateless Session EJBs as session facade for custom business services, Simple java classes for the business services, Toplink implementation of DAO layer, Domain objects are mapped to database tables using Toplink Workbench that ships with JDeveloper. The transaction is managed by the session bean and hence the toplink session is configured to use external transaction controller and a named datasource as follows.
    <session xsi:type="server-session">
    <name>DBSession</name>
    <server-platform xsi:type="oc4j-1012-platform"/>
    <event-listener-classes/>
    <logging xsi:type="toplink-log">
    <log-level>fine</log-level>
    <file-name>D:/ToplinkLog.log</file-name>
    </logging>
    <primary-project xsi:type="xml">META-INF/toplink-descriptor.xml</primary-project>
    <login xsi:type="database-login">
    <platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</platform-class>
    <external-connection-pooling>true</external-connection-pooling>
    <external-transaction-controller>true</external-transaction-controller>
    <sequencing>
    <default-sequence xsi:type="native-sequence">
    <name>Native</name>
    <preallocation-size>1</preallocation-size>
    </default-sequence>
    </sequencing>
    <datasource>jdbc/ORADS</datasource>
    </login>
    </session>
    We intend to use Optimistic Locking based on Timestamp-version locking through an audit field "last_modification_date" of type java.sql.Timestamp. The corresponding database field is also of type Timestamp(6). We are not storing the version in cache.
    The problem we are facing is as follows.. we have an edit screen from where user can edit values for a domain object which are then persisted using Toplink...we expect Toplink to check the database record version (modification_date timestamp) before it applies the update. In DAO implementation, we register the object in a unitOfWork, then set the modified values, however we leave the modification_date (version field) unedited. Now when the application is running, on edit, an exception is thrown by the Session bean before ending the transaction.
    com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Error in transaction: java.lang.NullPointerException
         at TrackingMediator_StatelessSessionBeanWrapper2.editOverheadExpenditure(TrackingMediator_StatelessSessionBeanWrapper2.java:1597)
         at com.enbridge.dsm.web.action.TrackingPortfolioAction.editOverheadExpenditure(TrackingPortfolioAction.java:264)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:278)
         at com.enbridge.dsm.web.shared.BaseAction.execute(BaseAction.java:90)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
         at com.enbridge.dsm.web.shared.DSMPojoRequestProcessor.process(DSMPojoRequestProcessor.java:182)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1425)
         at com.sourcebeat.strutslive.common.SLActionServlet.process(SLActionServlet.java:44)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at com.enbridge.dsm.web.shared.security.SecurityFilter.doFilter(SecurityFilter.java:142)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
         Nested exception is:
    java.lang.NullPointerException
         at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:1190)
         at com.evermind.sql.FilterConnection.commit(FilterConnection.java:209)
         at com.evermind.sql.DriverManagerXAConnection.commit(DriverManagerXAConnection.java:203)
         at com.evermind.server.TransactionEnlistment.commit(TransactionEnlistment.java:251)
         at com.evermind.server.ApplicationServerTransaction.singlePhaseCommit(ApplicationServerTransaction.java:745)
         at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:690)
         at com.evermind.server.ApplicationServerTransaction.end(ApplicationServerTransaction.java:1035)
         at TrackingMediator_StatelessSessionBeanWrapper2.editOverheadExpenditure(TrackingMediator_StatelessSessionBeanWrapper2.java:1593)
         at com.enbridge.dsm.web.action.TrackingPortfolioAction.editOverheadExpenditure(TrackingPortfolioAction.java:264)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:278)
         at com.enbridge.dsm.web.shared.BaseAction.execute(BaseAction.java:90)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
         at com.enbridge.dsm.web.shared.DSMPojoRequestProcessor.process(DSMPojoRequestProcessor.java:182)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1425)
         at com.sourcebeat.strutslive.common.SLActionServlet.process(SLActionServlet.java:44)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at com.enbridge.dsm.web.shared.security.SecurityFilter.doFilter(SecurityFilter.java:142)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    Note that the exception is thrown at the time when the session bean is about to commit the transaction. i.e. the DAO code did not throw any exception and was able to check the optimistic locking and submit the update transaction.
    I am not able to understand why is the the EJB throwing this weird error with Optimistic locking implementation. The application is working fine when the optimistic locking is disabled.
    I am facing another problem due to this problem... since the session bean throws this exception after exiting the bean implemented method, when trying to commit the transaction, I am not able to mark the session context to setRollbackOnly. Hence if I continue on to another transaction by navigating to another screen in the application, mysteriously the previous transaction gets committed!!... again... weird...

    I am using JDBC driver version 10.1.2.
    I saw this additional error message in JDeveloper console, which for some reason was not logged to my log4j log file... if it helps...
    06/09/22 18:32:10 Thr[thread 6]-TransactionEnlistment.TransactionEnlistment.Caught forgetandRollback XAException e null
    Here are the logs from my Toplink log file....
    [TopLink Info]: 2006.09.22 06:31:46.546--ServerSession(989)--Thread(Thread[HttpRequestHandler-86,5,main])--TopLink, version: Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)
    [TopLink Info]: 2006.09.22 06:31:46.578--ServerSession(989)--Thread(Thread[HttpRequestHandler-86,5,main])--Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
    [TopLink Config]: 2006.09.22 06:31:46.593--ServerSession(989)--Connection(991)--Thread(Thread[HttpRequestHandler-86,5,main])--connecting(DatabaseLogin(
         platform=>Oracle10Platform
         user name=> ""
         connector=>JNDIConnector datasource name=>jdbc/ORADS
    [TopLink Config]: 2006.09.22 06:31:47.484--ServerSession(989)--Connection(1432)--Thread(Thread[HttpRequestHandler-86,5,main])--Connected: jdbc:oracle:thin:@10.210.16.37:1521:orabld
         User: APP_USR
         Database: Oracle Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver Version: 10.1.0.3.0
    [TopLink Config]: 2006.09.22 06:31:47.500--ServerSession(989)--Connection(1433)--Thread(Thread[HttpRequestHandler-86,5,main])--connecting(DatabaseLogin(
         platform=>Oracle10Platform
         user name=> ""
         connector=>JNDIConnector datasource name=>jdbc/ORADS
    [TopLink Config]: 2006.09.22 06:31:47.500--ServerSession(989)--Connection(1434)--Thread(Thread[HttpRequestHandler-86,5,main])--Connected: jdbc:oracle:thin:@10.210.16.37:1521:orabld
         User: APP_USR
         Database: Oracle Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver Version: 10.1.0.3.0
    [TopLink Info]: 2006.09.22 06:31:47.671--ServerSession(989)--Thread(Thread[HttpRequestHandler-86,5,main])--DBSession login successful
    [TopLink Fine]: 2006.09.22 06:31:47.703--ServerSession(989)--Connection(1554)--Thread(Thread[HttpRequestHandler-86,5,main])--select * from user_role ur, app_resource ar, role_resource rr where rr.APP_RESOURCE_ID = ar.APP_RESOURCE_ID and rr.USER_ROLE_ID = ur.USER_ROLE_ID
    [TopLink Fine]: 2006.09.22 06:31:49.937--ServerSession(989)--Connection(10245)--Thread(Thread[HttpRequestHandler-86,5,main])--SELECT * FROM PROGRAM_SUB_CAT
    [TopLink Fine]: 2006.09.22 06:31:50.015--ServerSession(989)--Connection(10332)--Thread(Thread[HttpRequestHandler-86,5,main])--SELECT PROGRAM_ID, CREATED_BY_USERID FROM (SELECT CREATED_BY_USERID, ROWNUM PROGRAM_ID FROM (SELECT DISTINCT(CREATED_BY_USERID) CREATED_BY_USERID, 1 AS PROGRAM_ID FROM PROGRAM))
    (I only see my application specific queries after this... no exceptions or debug logs)... as I said before.. the application gives exception in the session bean at the time of commit, and there's no exception raised from Toplink code in DAO...

  • Error in Update Process for optimistic locking

    Hello,
    I tried to create a tabular form according to this How-To:
    http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html
    which worked fine until I tried to implement the optimistic locking.
    I use the same update process:
    declare
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    begin
    -- Get original MD5 checksum
    select wwv_flow_item.md5(job,mgr,hiredate,sal,comm,deptno) cks
    BULK COLLECT INTO
    l_cks
    from emp;
    -- Compare the original checksum, l_cks,
    -- with submitted checksum, htmldb_application.g_fcs.
    -- If they are different, raise an error.
    for i in 1..l_cks.count
    loop
    if htmldb_application.g_fcs(i) != l_cks(i) then
    rollback;
    raise_application_error(
              -20001,
         'Current version of data in database has changed '||
              'since user initiated update process.');
    return;
    end if;
    end loop;
    but as soon as I try to apply the changes in the update process I get an error message saying: PLS-00503: RETURN statement required for this return from function
    So, if i delete the row with the "return;" statement, I get no error anymore, but when I test the optimistic locking I get an error as soon as I try to update a row in the first place.
    What am I doing wrong?
    Johnny
    P.S. : I am using Apex 1.6

    Hi Ant, of course......here is the customized pl/sql block I use:
    declare
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    begin
    -- Get original MD5 checksum
    select wwv_flow_item.md5(partition,desig) cks
    BULK COLLECT INTO
    l_cks
    from UNITS;
    -- Compare the original checksum, l_cks,
    -- with submitted checksum, htmldb_application.g_fcs.
    -- If they are different, raise an error.
    for i in 1..l_cks.count
    loop
    if htmldb_application.g_fcs(i) != l_cks(i) then
    rollback;
    raise_application_error(-20001,'Current version of data in database has changed ' || 'since user initiated update process.');
    -- return;
    end if;
    end loop;
    -- update UNITS
    for i in 1..htmldb_application.g_f08.count
    loop
    if htmldb_application.g_f08(i) is not null then
    update UNITS
    set report_id = :P2_REPORT_ID,
    partition = htmldb_application.g_f10(i),
    desig = htmldb_application.g_f11(i)
    where unit_id = htmldb_application.g_f08(i);
    else
    if htmldb_application.g_f10(i) is not null then
    insert into UNITS
    (report_id,
    partition,
    desig)
    values
    (:P2_REPORT_ID,
    htmldb_application.g_f10(i),
    htmldb_application.g_f11(i));
    end if;
    end if;
    end loop;
    end;
    Thanks
    Johnny

  • Optimistic locking/ data concurrency and consistency

    Hi,
    When creating a tabular form using wizard, apex creates its own processes for optimistic locking. But when creating a form on a table, it doesn't create the processes. I suppose I need to create them manually.
    Can anybody show me the steps?
    Thanks!

    Scott,
    Thanks once again.
    2 things:
    My understanding is that I can't change the error message, and that if I want to customize the error message, I need to create my own process for checksum. Is this true? If so, what is the easiest way of doing this?
    I realized it returns an error message and the changes the user made gets lost if he went out for lunch and somebody else made an update on that record. What can I do so the user doesn't lose the data?
    Thanks,

  • How to use Optimistic Locking in Toplink

    Hi!
    Iam using Toplink for O/R mapping, and for each table
    iam using one TimeStamp field, and i specified that
    field as Locking filed, by using the Loking option, and checked the TimeStampLocking option.
    Now my question is do i need to update the Timestamp filed
    each time if i create a new record and while modify an existing record.
    And also do i need to compare the Timestamp for the record which client as read previousley to the TimeStamp in the database for the record manullay lik
    suppose t1 is the timeStamp, which i got from the client,
    and t2 is the timestamp which i read from the Database.
    Now my question is, is it necessary to compare the timestamp.

    Once optimistic locking has been configured TopLink will manage the updating and comparing of the OptimisticLocking value. There is no requirement for you to manage this value.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                       

  • Em.merge does not throw Optimistic Lock Exception

    Hello,
    we are using Optimistic Lock Exception in a stateful bean managed transaction.
    I am wondering that there is no Optimistic Lock Exception is thrown after em.merge
    The Optimistic Lock Exception is primary thrown on em.flush - is this right?
    A similar problem is described on
    http://www.nabble.com/Optimistic-Lock-Exception-expected-td22742662.html#a22742662
    See serveroutput: The EclipseLink-5006-Exception is thrown after an em.flush
    14:03:11,657 INFO [STDOUT] updateItem
    14:03:11,657 INFO [STDOUT] [EL Finest]: 2009-04-09 14:03:11.657--UnitOfWork(14218007)--Thread(WorkerThread#0[192.168.1.217:4518])--Merge clone with references com.tup.model.Person@131a24c
    14:03:11,657 INFO [STDOUT] merged
    14:03:11,657 INFO [STDOUT] [EL Finest]: 2009-04-09 14:03:11.657--UnitOfWork(14218007)--Thread(WorkerThread#0[192.168.1.217:4518])--Execute query UpdateObjectQuery(com.tup.model.Person@196649c)
    14:03:11,657 INFO [STDOUT] [EL Fine]: 2009-04-09 14:03:11.657--ClientSession(21268424)--Connection(25845065)--Thread(WorkerThread#0[192.168.1.217:4518])--UPDATE mku_person_ver SET first_name = ? WHERE ((ID = ?) AND (((last_name = ?) AND (first_name = ?)) AND (version = ?)))
    bind => [Bernd 982, 5, Kuls, Bernd 98, 2009-04-09 13:12:15.0]
    14:03:11,672 INFO [STDOUT] [EL Warning]: 2009-04-09 14:03:11.672--UnitOfWork(14218007)--Thread(WorkerThread#0[192.168.1.217:4518])--Exception [EclipseLink-5006] (Eclipse Persistence Services - 1.1.0.r3634): org.eclipse.persistence.exceptions.OptimisticLockException
    Exception Description: The object [com.tup.model.Person@196649c] cannot be updated because it has changed or been deleted since it was last read.
    Class> com.tup.model.Person Primary Key> [5]
    14:03:11,688 INFO [STDOUT] [EL Warning]: 2009-04-09 14:03:11.688--UnitOfWork(14218007)--Thread(WorkerThread#0[192.168.1.217:4518])--javax.persistence.OptimisticLockException: Exception [EclipseLink-5006] (Eclipse Persistence Services - 1.1.0.r3634): org.eclipse.persistence.exceptions.OptimisticLockException
    Exception Description: The object [com.tup.model.Person@196649c] cannot be updated because it has changed or been deleted since it was last read.
    Class> com.tup.model.Person Primary Key> [5]
    14:03:11,688 INFO [STDOUT] OptimisticLockException throws MyApplicationException
    14:03:11,688 INFO [STDOUT] MyApplicationException
    14:03:11,735 INFO [STDOUT] [EL Finer]: 2009-04-09 14:03:11.735--UnitOfWork(14218007)--Thread(WorkerThread#0[192.168.1.217:4518])--TX afterCompletion callback, status=ROLLEDBACK
    14:03:11,750 INFO [STDOUT] [EL Finer]: 2009-04-09 14:03:11.75--UnitOfWork(14218007)--Thread(WorkerThread#0[192.168.1.217:4518])--release unit of work
    14:03:11,750 INFO [STDOUT] [EL Finer]: 2009-04-09 14:03:11.75--ClientSession(21268424)--Thread(WorkerThread#0[192.168.1.217:4518])--client released
    14:03:11,750 ERROR [BMTInterceptor] BMT stateful bean 'ModelFacade' did not complete user transaction properly status=STATUS_MARKED_ROLLBACK
    And by this Exception the transaction's status is set to status=STATUS_MARKED_ROLLBACK.
    The transaction can no longer be used.
    I want to use this transaction further and wrap the OptimisticLockException into an MyApplicationException
    (see serveroutput).
    But no change!
    Any Ideas ?
    Regards,
    Martin Kubitza
    T&P Bochum/Germany

    Hi,
    are you using JPA or TopLink ? Check if there is another exception thrown that produces the error. You can try and catch (Exception ex), which will catch them all. if this works the obviously you don't catch the right exception
    I found a post saying that: "If you trying commit directly after persist w/o doing an explicit
    flush then OptimisticLocking Exception maybe nested inside
    RollBackException. What is the top most error on stack? You can catch
    javax.persistence.PersistenceException and try to do this kind of
    error translation
    public static void getThrowable(javax.persistence.PersistenceException
    perex, int code) {
    boolean updateError = false ;
    boolean deleteError = false ;
    KentException kentex = null ;
    Throwable th = null ;
    if( perex instanceof org.apache.openjpa.persistence.RollbackException) {
    th = perex.getCause();
    if(th instanceof OptimisticLockException) {
    updateError = true ;
    if(perex instanceof OptimisticLockException ){
    updateError = true ;
    th = perex ;
    if(perex instanceof org.apache.openjpa.persistence.EntityNotFoundException) {
    deleteError = true ;
    th = perex ;
    http://n2.nabble.com/OptimisticLockException-confusion.-td210621.html
    Frank

  • SDO gives JBO-26030: Failed to lock the record, another user holds the lock

    Hi,
    I have a question thats on the boundary between ADF and BPEL but I posted in this forum because its highly related to ADF Model with Service Interface.
    We have a BPEL batch process that spawns multiple child BPEL processes that handle threads inside the batch in parallel. These child processes all update the same batch record in a database with for example the lastActionDateTime. We do this by invoking an update service on a SDO application that we built following this tutorial: http://jianmingli.com/wp/?p=2838
    It all works good but sometimes when updating the same row from multiple BPEL process instances at the same time, we sometimes get a SDO JBO-26030: Failed to lock the record, another user holds the lock.
    I'm a bit stunned by this, because all we really do is updating a record. From BPEL we just invoke the updateBatch webservice method of the Service Interface.
    I can imagine that there will be wait time when these updates come in at the same time, but I didn't expect an exception would occur. Also the arbitrariness confuses me. If a child process would lock the record, I would expect this error to happen always and not at random.
    From BPEL the error displays as follows:
         <fault>
              <bpelFault>
                   <faultType>1</faultType>
                   <ServiceException>
                        <part  name="ServiceErrorMessage">
                             <tns:ServiceErrorMessage>
                                  <tns:code>26030</tns:code>
                                  <tns:message>JBO-26030: Failed to lock the record, another user holds the lock.</tns:message>
                                  <tns:severity>SEVERITY_ERROR</tns:severity>
                                  <tns:exceptionClassName>oracle.jbo.AlreadyLockedException</tns:exceptionClassName>
                             </tns:ServiceErrorMessage>
                        </part>
                   </ServiceException>
              </bpelFault>
         </fault>However when I dive into soa_server1-diagnostic.log I see the following exception:
    [2011-10-28T17:37:37.770+02:00] [soa_server1] [ERROR] [] [oracle.jbo.server.svc.ServiceJTATxnHandlerImpl] [tid: [ACTIVE].ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: a1484c49db38e963:-581f01fc:13345d7173d:-8000-00000000000322f4,0:1:0x5f5e2bf:33] [WEBSERVICE_PORT.name: ECMControllerSDOServiceSoapHttpPort] [APP: ECMControllerSDO] [composite_name: ECMProcessController] [component_name: ProcessControllerBPEL] [component_instance_id: 240335] [J2EE_MODULE.name: ECMControllerSDO] [WEBSERVICE.name: ECMControllerSDOService] [J2EE_APP.name: ECMControllerSDO] [[
    oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[CDS_20111028_8 ].
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1077)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:553)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:8134)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5863)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:6369)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6551)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3275)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3078)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2088)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2369)
         at oracle.jbo.server.DefaultJTATxnHandlerImpl.commit(DefaultJTATxnHandlerImpl.java:156)
         at oracle.jbo.server.svc.ServiceJTATxnHandlerImpl.commit(ServiceJTATxnHandlerImpl.java:216)
         at oracle.jbo.server.svc.ServiceJTATxnHandlerImpl.beforeCompletion(ServiceJTATxnHandlerImpl.java:124)
         at sun.reflect.GeneratedMethodAccessor2677.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.jbo.server.svc.WLSContextCrossAppProxy$WLSCrossAppProxy.invoke(WLSContextCrossAppProxy.java:66)
         at $Proxy377.beforeCompletion(Unknown Source)
         at weblogic.transaction.internal.ServerSCInfo.doBeforeCompletion(ServerSCInfo.java:1239)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1214)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:116)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1316)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:2132)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:272)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:239)
         at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:625)
         at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:49)
         at weblogic.ejb.container.internal.BaseRemoteObject.__WL_postInvokeTxRetry(BaseRemoteObject.java:444)
         at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:53)
         at nl.kpn.ecm4crm.am.server.serviceinterface.ECMControllerSDOServiceImpl_51vl7y_ECMControllerSDOServiceImpl.updateBatches(Unknown Source)
         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 weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
         at $Proxy373.updateBatches(Unknown Source)
         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 oracle.j2ee.ws.server.jaxws.ServiceEndpointRuntime.processMessage(ServiceEndpointRuntime.java:355)
         at oracle.j2ee.ws.server.jaxws.ServiceEndpointRuntime.processMessage(ServiceEndpointRuntime.java:196)
         at oracle.j2ee.ws.server.jaxws.JAXWSRuntimeDelegate.processMessage(JAXWSRuntimeDelegate.java:479)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:1187)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:1081)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:581)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:232)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:192)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         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:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.jbo.server.svc.ServiceContextFilter.doFilter(ServiceContextFilter.java:78)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)Thank you for reading, any directions suggestions on how to solve this will be highly appreciated.
    regards,
    Gerben

    Thanks Frank.
    Already tried that , please let me know if there is any other way to get this .
    This is being discussed here :
    Re: Update without No wait
    and i am following what John Stegeman has suggested.

  • ChangeFields optimistic locking

    I am trying to use optmistic locking without changing my database schema by using the descriptor.useChangedFieldsLocking() on my EJB descriptor. Two clients try to do the following.
    1) Query the shallow properties of the EJB (no getters called for unary or collection relationships).
    2) Edit some of that simple data
    3) Submit their changes
    The optimistic locking works okay when just the shallow properties are being retrieved. If a client tries to submit when someone else has already done so, an OptimisticLockException is thrown which is the desired result.
    However, if I wish to traverse one of the relationships on the EJB when it is first queried (by calling a getter for a collection for example) the following happens: When the second client attempts to load and edit this EJB the transaction times out with a deadlock exception.
    I want to traverse relationships for display purposes in this case but in the furture will want to edit something in that relationship with ChangedFieldsLocking also set.
    If anyone could tell me why the second client's transaction times out when it asks for the EJB I would be very grateful.
    Regards
    James.

    Thanks for the reply.
    After further investigation I have found that it's nothing to do with the locking (since I can switch it off and still have the problem) but may be a problem with OC4J (or how I am using it). The situation is as follows:
    1) Client A starts a transaction
    2) Client A asks for ejb1
    3) Client A asks for ejb1.collection()
    4) Client A asks for ejb1.collection(i).someMethod()
    5) Client A uses the result of someMethod()
    (transaction is still open)
    6) Client B starts a transaction
    7) Client B asks for ejb1
    8) Client B asks for ejb1.collection()
    9) Client B asks for ejb1.collection(i).someMethod()
    10) Client B uses the result of someMethod()
    The server hangs on step 9 and never enters someMethod() (the first line is debug and I never see it). Eventually it tells me that the transaction has timed out with a deadlock exception.
    The following comes from the output of a ctrl-break at the point of hanging (someMethod() is getTitle() in this example) :
    "HttpRequestHandler-22629000" prio=5 tid=0x434DE690 nid=0xab4 in Object.wait() [4400f000..4400fd8c]
    at java.lang.Object.wait(Native Method)
    - waiting on <08FC9AC8> (a com.evermind.server.ThreadState)
    at com.evermind.server.ejb.AbstractEJBObject.startCall(AbstractEJBObject.java:226)
    - locked <08FC9AC8> (a com.evermind.server.ThreadState)
    at PersonNamesRemote_EntityBeanWrapper79.getTitle(PersonNamesRemote_EntityBeanWrapper79.java:3227)
    at uk.co.corelogic.framework.common.ejb.entity.PeopleEJB.toBean(PeopleEJB.java:1800)
    at PeopleRemote_EntityBeanWrapper60.toBean(PeopleRemote_EntityBeanWrapper60.java:1742)
    at uk.co.corelogic.framework.common.ejb.session.FrameworkManager.retrieve(FrameworkManager.java:142)
    I am using OC4J 9.0.4, Toplink 9.0.3.3. I have Toplink configured to generate BMP Entity beans.
    My entity bean deployment descriptor has <reentrant>False</reentrant> but <reentrant>True</reentrant> makes no difference. It also has <trans-attribute>Required</trans-attribute> for everything which should be okay and trying <trans-attribute>Supports</trans-attribute> just causes null pointers to be thrown all over the place.
    I will post this message on the OC4J forum too but would appreciate a reply if you have any ideas.
    Thanks.
    James.

  • In 3WP, Error: item 75 / 0000000010 currently locked by a foreign user.

    In 3 way Pegging, error " item 75 / 0000000010 currently locked by a foreign user" is coming frequently. What does this error means? How to fix it?

    Hi,
    It only means that some other user is either changing the material master or doign some transactions involving this material. You need not do anything. You can just wait for 5minutes and resume your work once the guy completes his work. Some other guys also get this message while you are working in a material. So this is common.
    If you want to know who is working, you can find the table relevant to your transaction and then check in SM12 by giving the table name, you can find out the user id there. You shoudl have access to SM12 for this

  • Optimistic locking and HTML DB checksum calculation

    I create a form for fetching and updating row from a database table. I use Automated Row Fetch for fetching row. But for updating row I must use a procedure from a package, not Automatic Row Processing (DML).
    And my question is: how I can implement optimistic locking in this way?
    Automated Row Fetch already calculated checksum and stored it in p_md5_checksum hidden field, can I get calculated value of checksum from p_md5_checksum?
    How I can calculate checksum by myself for compare with value from p_md5_checksum?
    What algorithm uses HTML DB for calculate checksum in Automated Row Fetch and Automatic Row Processing (DML) components?

    I have read this topic already. It's recommended to build own functionality for calculate checksum, but Automated Row Fetch already calculated checksum and stored it in p_md5_checksum hidden field.
    I also created my own function, for example for table dept:
    create or replace function BUILD_DEPT_MD5 (
    P_DEPTNO in number,
    P_DNAME in varchar2 default null,
    P_LOC in varchar2 default null,
    P_COL_SEP in varchar2 default '|') return varchar2 is
    begin
    return utl_raw.cast_to_raw(dbms_obfuscation_toolkit.md5(input_string => P_DEPTNO || P_COL_SEP || P_DNAME || P_COL_SEP || P_LOC));
    end BUILD_DEPT_MD5;
    but checksum values what calculated with this function is not equal with checksum value calculated by Automated Row Fetch.
    I shall specify:
    I need to use Automated Row Fetch for get row from table.
    I can not use Automatic Row Processing (DML) for update row, I need use PL/SQL procedure for this.
    I want implement optimistic locking and I want use for this a checksum value, what already calculated by Automated Row Fetch. I need to know how I can get this checksum value and I need to know algorithm, which Automated Row Fetch uses for checksum calculation.

  • Optimistic Lock with Parent and Child relationships

    Hi,
    I just have a question regarding optimistic locking. We have a scenario
    where a parent object has many child objects. Both the parent and the
    child objects have a jdolockx column in the database/jdo file.
    It appears that whenever you add a new child to the parent the parent's
    optimistic lock counter is also updated.
    eg
    parent.getChildren().add(child);
    child.setParent(parent);
    Why does this occur? There is no change made to the database table for
    the parent, except for the jdolockx column. Is there something that I can
    do to stop the lock count from incrementing when I child is added?
    We have a scenario where we have many threads of execution wishing to add
    children to a single parent. The parent itself isnt modified but this
    operation fails due to the parent lock counter being incremented.
    Any help would be appreciated
    Thanks
    Luke

    There is state image indicator in Kodo 3 which has more locking options
    beyond a simple number:
    http://solarmetric.com/Software/Documentation/3.0.1/docs/ref_guide_mapping_versionind.html#state-image
    In addition, you can plug your own version indicator.
    Our default optimistic locking avoids the problem of users having no
    idea what is -actually- in the collection/set at any given time.
    Inconsistencies can occur at the datastore level (user 1 adds
    object a to collection, user 2 removes a, user 1 adds object b... which
    should actually be in the DB? {a,b} or or {a}? This is one of the
    many ways in which not tracking changes to a collection/set can be
    hazardous).
    On locking exceptions, errors could be handled in some appropriate
    function (i.e. refresh, re-apply changes if applicable/safe,
    and commit).
    Luke wrote:
    Hi,
    I just have a question regarding optimistic locking. We have a scenario
    where a parent object has many child objects. Both the parent and the
    child objects have a jdolockx column in the database/jdo file.
    It appears that whenever you add a new child to the parent the parent's
    optimistic lock counter is also updated.
    eg
    parent.getChildren().add(child);
    child.setParent(parent);
    Why does this occur? There is no change made to the database table for
    the parent, except for the jdolockx column. Is there something that I can
    do to stop the lock count from incrementing when I child is added?
    We have a scenario where we have many threads of execution wishing to add
    children to a single parent. The parent itself isnt modified but this
    operation fails due to the parent lock counter being incremented.
    Any help would be appreciated
    Thanks
    Luke
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Query using Optimistic Locking

    Hello all ,
    "With optimistic locking, a resource is not actually locked when it is first is accessed by a transaction."
    Is optimistic locking used for banking applications ??
    Please share your ideas , share your ideas.Thanks in advance.

    Can optimistic locking be used for banking applications? Sure. Is it always appropriate for every possible banking related application? No.
    You'll need to be a lot more specific about your application's requirements before we can say anything with much specificity. In general, banking or non-banking, OLTP applications ought to be using optimistic locking and any application that uses pessimistic locking needs to be careful not to hold locks across user interaction events (i.e. don't allow a user to lock a row and then head out to lunch without releasing the lock).
    Justin

  • Shuttle item and optimistic lock

    Hi everyone,
    I need to use a shuttle item to insert/update some data in a table. Because of that, I need to have a pl/sql process that will have the insert or update commands, so no DML allowed in my app page. By doing this, I lose the optimistic lock implemented within the DML process, so I've been searching and reading on how to accomplish this manually.
    I followed this post (Re: Optimistic locking on manual non-tabular form among others but it doesn't work properly.
    Is there another way to get the optimistic lock manually?
    Or better yet, is there a way to update a table from a shuttle item with DML?
    btw, i'm using apex 4.1.
    Thanks!
    Elena.

    Hello Elena,
    >> tab := apex_util.string_to_table (:p1_multiple_item);
    Yes. This is what I meant in parsing the shuttle value.
    >> Maybe I'm wrong, but this implies no use of DML, doesn't it?
    You are not wrong, although the correct term would be Automatic DML, which is a built-in APEX process (The term DML refers to any insert/update/delete database operation, regardless of APEX).
    You didn’t specify if you are familiar with the Optimistic Locking algorithm (which, BTW, pertains only to update data). In any case, my suggestion to you is to use the SQL Workshop to generate a package on your relevant table, and examine the update procedure that was generated. This procedure implements the Optimistic Locking algorithm and can be a great starting point for you to adapt it to your specific needs.
    You can generate the package using SQL Workshop ==> Object Browser ==> Create ==> Package ==> Package with methods on database table(s) .
    Hope it helps,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

  • Workspace is locked exclusively by OS user null using machine null

    Hi all,
    I get the following strange message when trying to logon in the OWB design center (OWB 11.1.0.6, platform windows):
    'The workspace is locked exclusively by OS user null using machine null'
    There are no sessions running on the database (except control center service) and I'm the only user on the machine (my own laptop). All the OWB users are unlocked.
    Any help is appreciated.
    Regards,
    Quinten

    Metalink Doc ID 405935.1 addresses this problem.
    Close all OWB clients.
    Connect to DB via SQLPlus as the repository owner.
    Run OWB_HOME\owb\rtp\sql\stop_service.sql.
    Connect to DB via SQLPlus as sys with sysdba.
    Run this: delete from sys.dbms_lock_allocated where name like 'OWB%';
    On your other SQL session run: OWB_HOME\owb\rtp\sql\start_service.sql.
    Close all sessions.
    Start Warehouse Builder Client and connect.

Maybe you are looking for

  • How to get Current day and month value in Stk applets

    Friends please provide me the hint to get the Current Value of month and date from the Mobile equipment(ME). please send feedback to [email protected]

  • Bring swf to front

    I have a main swf which I load another swf into using Loader and then addChild....this works fine. The loaded swf covers the main swf completely The loaded swf has buttons on it, when one of the buttons is clicked I would like the main swf to come to

  • OIM vs OIA : Identity Certification

    Hello Experts, I need to analyze the Identity Certification feature of OIM 11gR2 vs OIA i.e. what advantage/disadvantage do one has over the other. What all features are supported by one and not by the other. Is it really necessary to install OIA for

  • Windows 7 'File server' disconnects when XP machine connects to network

    Hi guys, We have a small office setup here, we have two Windows 7 machines, three Windows XP machines and one Windows 7 machine that acts as a fileserver (folder sharing and an SVN repository). Every morning, I turn up to work, turn on my Windows 7 m

  • User exit for Ts code WVFB

    Hello Experts, I want to populate cost center and to do 'k' assignment automatically when I use  ts code WVFB for Sotre Order creation. Which user-exit should be activate? thanks a lot in advance. ( the purpose is when user create a store order by tr