Locking issue with BAPI_GOODSMVT_CREATE

Hello,
Has anybody ran across a problem of lock objects (related to materials) not getting released when BAPI_GOODSMVT_CREATE fails?
Here is the sequence of events:
1. I run my function (which calls BAPI_GOODSMVT_CREATE) in SE37 and force an error (i.e. return table contains entries). I do NOT leave SE37.
2. In another session I run the same test again (but with correct data). I get error M3 897 (The plant data of the material 3319 is locked by user USCLXH90).
By looking in SM12 after step 1 is finished, I have noticed that 2 lock entries do not get released. These lock entries subsequently cause the error in step 2.
Lock Object: ENQARRAY
Tables: MARC, MBEW
Arguments: material and plant used in my test
IMPORTANT NOTES:
A. These lock objects do finally get released once I completely exit SE37.
B. These lock objects get released immediately and automatically if step 1 is successful (in other words, it's only when there is an error do the lock objects remain!)
C. I do call BAPI_TRANSACTION_COMMIT. I have also tried using SET UPDATE TASK LOCAL. Neither makes any difference (I think these are irrelevant b/c there are no db updates anyway in step 1 b/c of the error I force).
D. We have seen this specific problem occur when calling the function via RFC from our web front end.
I couldn't find any OSS note that describes this problem. Anybody know how to guarantee that all lock objects get released in the case where BAPI_GOODSMVT_CREATE fails?
p.s. I am a doing a 541 movement type (although I don't think this problem is specific to movement types).
Thanks for any suggestions or insights anybody might have.
Regards,
Lee

Thanks Rich... this make work for me, but one question -
Do you know if this function releases all lock objects for the user system wide or only for the current session? My concern is that if it is system wide, then I could be releasing lock objects for other sessions unintentionally. For example, if there are multiple RFC calls in parallel for the same function and same user then I could be destroying lock entries that I shouldn't be! I am hoping that it removes lock entries only for the current session...
any ideas?
Regards,
Lee
> I've used this BAPI in many of my programs,  and
> always after the call, I code.....
>
>
>
>     commit work and wait.
>     call function 'DEQUEUE_ALL'.
>
>
>
> The DEQUEUE_ALL show release any/all locks.
>
>
> Regards,
> Rich Heilman

Similar Messages

  • Locking issue with BAPI_GOODSMVT_CREATE in userexit_save_document

    Hello All,
    I am performing a separate goods movement for one of the materials in the delivery userexit_save_document during PGI. I have an issue. We might have multiple users trying to PGI deliveries and thereby performing the goods movement for the same material through the BAPI in the userexit_save_document.
    How do I prevent the locking issue when say two users go through the BAPI for goods movement for the same material data at the same time.
    Any answer in this regards is highly appreciated.
    Thanks,
    Mathangi

    Thanks Rich... this make work for me, but one question -
    Do you know if this function releases all lock objects for the user system wide or only for the current session? My concern is that if it is system wide, then I could be releasing lock objects for other sessions unintentionally. For example, if there are multiple RFC calls in parallel for the same function and same user then I could be destroying lock entries that I shouldn't be! I am hoping that it removes lock entries only for the current session...
    any ideas?
    Regards,
    Lee
    > I've used this BAPI in many of my programs,  and
    > always after the call, I code.....
    >
    >
    >
    >     commit work and wait.
    >     call function 'DEQUEUE_ALL'.
    >
    >
    >
    > The DEQUEUE_ALL show release any/all locks.
    >
    >
    > Regards,
    > Rich Heilman

  • [ADF-11.1.2] Locking issue with SQL 92

    I see one Locking issue with SQL92 Oracle ADF Application.
    ADF Version: [ADF-11.1.2]
    Database: Oracle 10g Express Edition
    Situation 1:
    With Following setting:
    File: Application Resource > Description > ADF META-INF > adf-config.xml
        <startup>
          <amconfig-overrides>
            <config:Database jbo.SQLBuilder="SQL92" jbo.locking.mode="optimistic"/>
          </amconfig-overrides>
        </startup>I have a page showing record 'x' of view object. I open same record on another page. Now I have same record showing on two different tabs of browser.
    1. I modify first record and save it. It worked... Got commited to database.
    2. I goto second tab and modify same record and tried to same it. It throws me an error - Another user has changed the row with primary key oracle.jbo.Key[38 ] . As expected...
    3. I then, reopen the same record on 3rd tab of browser. Modify it and tried to save it. It just hang... as if it is processing the record endlessly.
    If I see the Log:
    <BaseSQLBuilderImpl> <doEntitySelectForAltKey> [312] BaseSQLBuilderImpl Executing doEntitySelect ... (true)
    <BaseSQLBuilderImpl> <doEntitySelectForAltKey> [313] Generating new LOCK statement
    <BaseSQLBuilderImpl> <buildSelectString> [314] Built select: 'SELECT ID, CI_ID, COLUMN_NAME, DISPLAY_COLUMN_NAME, COLUMN_VALUE, CREATE_DATE, CREATE_BY FROM ESUSER.CI_AUDIT'
    <BaseSQLBuilderImpl> <doEntitySelectForAltKey> [315] Executing LOCK "SELECT ID, CI_ID, COLUMN_NAME, DISPLAY_COLUMN_NAME, COLUMN_VALUE, CREATE_DATE, CREATE_BY FROM ESUSER.CI_AUDIT WHERE ID=? FOR UPDATE"
    <BaseSQLBuilderImpl> <bindWhereAttrValue> [316] Where binding param 1: 38
    That's it.. nothing happens further.. If I execute above query on SQL Worksheet, it doesn't come up with the result. Just hang for something...
    SELECT ID, CI_ID, COLUMN_NAME, DISPLAY_COLUMN_NAME, COLUMN_VALUE, CREATE_DATE, CREATE_BY FROM ESUSER.CI_AUDIT WHERE ID='38' FOR UPDATE I can execute above query for other record of same table but not '38'. Even if I fire commit command to database, it is not working.
    I have to restart the database services to bring everything to normal state.
    Situation 2:
    With Oracle as Database :
        <startup>
          <amconfig-overrides>
            <config:Database jbo.SQLBuilder="Oracle" jbo.locking.mode="optimistic"/>
          </amconfig-overrides>
        </startup>Everything is working file. i.e. at step 3, record is getting modified successfully with following log:
    <OracleSQLBuilderImpl> <doEntitySelectForAltKey> [27] OracleSQLBuilder Executing doEntitySelect on: ESUSER.CI_AUDIT (true)
    <ADFLogger> <begin> Entity read all attributes
    <OracleSQLBuilderImpl> <buildSelectString> [28] Built select: 'SELECT ID, CI_ID, COLUMN_NAME, DISPLAY_COLUMN_NAME, COLUMN_VALUE, CREATE_DATE, CREATE_BY FROM ESUSER.CI_AUDIT CIAudit'
    <OracleSQLBuilderImpl> <doEntitySelectForAltKey> [29] Executing LOCK...SELECT ID, CI_ID, COLUMN_NAME, DISPLAY_COLUMN_NAME, COLUMN_VALUE, CREATE_DATE, CREATE_BY FROM ESUSER.CI_AUDIT CIAudit WHERE ID=? FOR UPDATE NOWAIT
    <ADFLogger> <addContextData> Entity read all attributes
    <OracleSQLBuilderImpl> <bindWhereAttrValue> [30] Where binding param 1: 38
    <ADFLogger> <addContextData> Entity read all attributes
    <ADFLogger> <end> Entity read all attributes
    <ADFLogger> <end> Lock Entity
    <ADFLogger> <begin> Before posting the entity's changes
    <ADFLogger> <begin> Updating audit columns
    <ADFLogger> <end> Updating audit columns
    <ADFLogger> <end> Before posting the entity's changes
    <OracleSQLBuilderImpl> <doEntityDML> [31] OracleSQLBuilder Executing, Lock 2 DML on: ESUSER.CI_AUDIT (Update)
    <OracleSQLBuilderImpl> <buildUpdateStatement> [32] UPDATE buf CIAudit>#u SQLStmtBufLen: 210, actual=60
    <OracleSQLBuilderImpl> <doEntityDML> [33] UPDATE ESUSER.CI_AUDIT CIAudit SET COLUMN_VALUE=? WHERE ID=?
    <ADFLogger> <begin> Entity DML
    <OracleSQLBuilderImpl> <bindUpdateStatement> [34] Update binding param 1: cip7ri1
    <OracleSQLBuilderImpl> <bindWhereAttrValue> [35] Where binding param 2: 38
    <ADFLogger> <addContextData> Entity DML
    <ADFLogger> <end> Entity DML
    Can any one please tell me, what is the issue with SQL92 setting ?
    Edited by: Anandsagar Sah on Mar 11, 2012 8:10 AM

    The framework works correctly in the Situation #1. Please, note that the locking statement in this case is "SELECT ... FOR UPDATE", but not "SELECT ... FOR UPDATE NOWAIT" (as it is in the Situation #2). When you entered the 2nd tab and tried to update the row, then the framework executed the locking statement and the row was locked (and it remained locked because the framework detected that another user had modified the row, so it stopped the processing and no COMMIT operation was executed). When you entered the 3rd tab and tried to update the row, then the framework tried to lock the row againg, but the locking statement was blocked by the existign lock and it started waiting on the lock from the 2nd tab. So this is expected behaviour.
    The interesting question is why you do not get any error in the Situation #2. In my opinion you should get an error because the locking statement from the 3rd tab should fail immediately (because the row should have been locked from the 2nd tab and the locking statement is with NOWAIT option). I suspect that when the DB is Oracle and you use Oracle SQLBuilder, then the ADF issues a DB savepoint at the beginning of the DML operation and rolls back to the savepoint is a case of some failure, so the 2nd tab has not left any lock. You can check this by setting on SQL trace on the DB server.
    Dimitar

  • Serious locking issues with Main Stage 3

    Having serious locking issues with main stage 3.  I just did a music gig over the weekend with main stage 3, and the application locked up 8 times during my performance.  There were also several times where there was a delay between the time I struck a key on the midi controller and the time sound actually came out of the audio interface.  Has anyone else ran into this problem??
    10.
    I am running mountain lion 10.8.5, on a 2009 Macbook 2.53 GHz Intel Core 2 Duo. w 8 GB Ram.
    Anyone know how to fix this, if even possible?  

    Just read some reviews. There seems to be a lot of problems with the latest main stage update.  I didn't notice these latency problems until did the latest update..
    Apple please fix this quickly!!!

  • Row locking issue with version enabled tables

    I've been testing the effect of locking in version enabled tables in order to assess workspace manager restrictions when updating records in different workspaces and I have encountered a locking problem where I can't seem to update different records of the same table in different sessions if these same records have been previously updated & committed in another workspace.
    I'm running the tests on 11.2.0.3.  I have ROW_LEVEL_LOCKING set to ON.
    Here's a simple test case (I have many other test cases which fail as well but understanding why this one causes a locking problem will help me understand the results from my other test cases):
    --Change tablespace names as required
    create table t1 (id varchar2(36) not null, name varchar2(50) not null) tablespace XXX;
    alter table t1 add constraint t1_pk primary key (id) using index tablespace XXX;
    exec dbms_wm.gotoworkspace('LIVE');
    insert into t1 values ('1', 'name1');
    insert into t1 values ('2', 'name2');
    insert into t1 values ('3', 'name3');
    commit;
    exec dbms_wm.enableversioning('t1');
    exec dbms_wm.gotoworkspace('LIVE');
    exec dbms_wm.createworkspace('TESTWSM1');
    exec dbms_wm.gotoworkspace('TESTWSM1');
    --update 2 records in a non-LIVE workspace in preparation for updating in different workspaces later
    update t1 set name = name||'changed' where id in ('1', '2');
    commit;
    quit;
    --Now in a separate session (called session 1 for this example) run the following without committing the changes:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --Now in another session (session 2) update a different record from the same table.  The below update will hang waiting on the transaction in session 1 to complete (via commit/rollback):
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    I'm surprised records of different ids can't be updated in different sessions i.e. why does session 1 lock the update of record 2 which is not being updated anywhere else.  I've tried this using different non-LIVE workspaces with similar results.  I've tried changing table properties e.g. initrans with and still get a lock.  The changes to table properties are successfully propagated to the _LT tables but not all the related workspace manager tables created for table T1 above.  I'm not sure if this is the issue.
    Note an example of the background workspace manager query that may create the lock is something like:
    UPDATE TESTWSM.T1_LT SET LTLOCK = WMSYS.LT_CTX_PKG.CHECKNGETLOCK(:B6 , LTLOCK, NEXTVER, :B3 , 0,'UPDATE', VERSION, DELSTATUS, :B5 ), NEXTVER = WMSYS.LT_CTX_PKG.GETNEXTVER(NEXTVER,:B4 ,VERSION,:B3 ,:B2 ,683) WHERE ROWID = :B1
    Any help with this will be appreciated.  Thanks in advance.

    Hi Ben,
    Thanks for your quick response.
    I've tested your suggestion and it does work with 2 workspaces but the same problem is enountered when additional workspaces are created. 
    It seems if multiple workspaces are used in a multi user environment, locks will be inevitable which will degrade performance especially if a long transaction is used. 
    Deadlocks can also be encountered where eventually one of the sessions is rolled back by the database. 
    Is there a way of avoiding this e.g. by controlling the creation of workspaces and table updates?
    I've updated my test case below to demonstrate the extra workspace locking issue.
    --change tablespace name as required
    create table t1 (id varchar2(36) not null, name varchar2(50) not null) tablespace XXX;
    alter table t1 add constraint t1_pk primary key (id) using index tablespace XXX;
    exec dbms_wm.gotoworkspace('LIVE');
    insert into t1 values ('1', 'name1');
    insert into t1 values ('2', 'name2');
    insert into t1 values ('3', 'name3');
    commit;
    exec dbms_wm.enableversioning('t1');
    exec dbms_wm.gotoworkspace('LIVE');
    exec dbms_wm.createworkspace('TESTWSM1');
    exec dbms_wm.gotoworkspace('TESTWSM1');
    update t1 set name = name||'changed' where id in ('1', '2');
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    --end of original test case, start of additional workspace locking issue:
    Session 1:
    rollback;
    Session 2:
    rollback;
    --update record in both workspaces
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '3';
    commit;
    exec dbms_wm.gotoworkspace('TESTWSM1');
    update t1 set name = 'changed' where id = '3';
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;
    exec dbms_wm.gotoworkspace('LIVE');
    exec dbms_wm.createworkspace('TESTWSM2');
    exec dbms_wm.gotoworkspace('TESTWSM2');
    update t1 set name = name||'changed2' where id in ('1', '2');
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --this now gets locked out by session 1
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;
    --update record 3 in TESTWSM2
    exec dbms_wm.gotoworkspace('TESTWSM2');
    update t1 set name = 'changed' where id = '3';
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --this is still locked out by session 1
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;
    --try updating LIVE
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '3';
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --this is still locked out by session 1
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;
    --try updating TESTWSM1 workspace too - so all have been updated since TESTWSM2 was created
    exec dbms_wm.gotoworkspace('TESTWSM1');
    update t1 set name = 'changed' where id = '3';
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --this is still locked out by session 1
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;
    --try updating every workspace afresh
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changedA' where id = '3';
    commit;
    exec dbms_wm.gotoworkspace('TESTWSM1');
    update t1 set name = 'changedB' where id = '3';
    commit;
    exec dbms_wm.gotoworkspace('TESTWSM2');
    update t1 set name = 'changedC' where id = '3';
    commit;
    Session 1:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '1';
    --this is still locked out by session 1
    session 2:
    exec dbms_wm.gotoworkspace('LIVE');
    update t1 set name = 'changed' where id = '2';
    Session 1:
    rollback;
    Session 2:
    rollback;

  • Triggering program form(subroutine)  from MIGO using output types gives lock issue with Bapi_sag_change

    Hi,
    On creating the GR from MIGO tcode, based on the quantity check i am updating the field ELIKZ using BAPI_SAG_CHANGE.
    And updation logic is written in a zprogram using with in FORM XXXXX...ENDFORM XXXXX. ( FORM XXXXX is configured in the output type ).
    So the problem i am facing is on creation of the first GR with scheduling agreement number GR is posted successfully and under the output tab the i can see the green icon.
    But on creation of the second GR with same scheduling agreement its showing red icon. The following is the error message " User locked the scheduling agreement ...."
    I even tried using dequeue fm and transaction commit, but it didnt work. Please let me know how to over come the lock issue.
    Thanks & regards,
    Manojkumar K

    Solved it myself....
    Regards,
    Manoj

  • BAPI_GOODSMVT_CREATE lock issue with no access to ABAP!

    Hello everyone,
    I have written a class in vb .NET that uses the BAPI_GOODSMVT_CREATE to post goods issues. I have done numerous tests myself which all were successful. However, when a colleague wanted to test my class he suddenly got the following error "The plant data of the material <XXXX> is locked by the user <XXXX>". The user specified is the standard background user we use for RFCs. So basically the user is blocking himself.
    This issue seems to be quite common as Google turns up with numerous results. They either end up with people being desperate and giving up or finding solutions in ABAP. However, my team has no access to ABAP since SAP-programming has all been outsourced to India. Getting any changes done in ABAP will be a long and tedious progress for which we simply do not have the time.
    Is there anyway to resolve this issue on our side? Maybe through other RFCs or changes in how we handle the BAPI? I am quite desperate as this problem occurred shortly before we wanted to go live and now it is not sure we can even do anything on our side.

    Hi Tom,
    If you want to call DEQUEUE_ALL from vb.net then tell your ABAP counterpart to create a new remote enabled function module and he can subsequently make a call to DEQUEUE_ALL in the custom developed function module through ABAP. You can then call the newly created custom function module using its calling parameter.
    Also, if required he can expose that newly custom created function module as a webservice that you can call from vb.net.
    I hope its clear to you now about how can you access it from vb.net.
    Regards,
    Sachin

  • Weird File Locking Issue with Excel 2013

    We are experiencing a strange issue whereby we are frequently unable to save Excel files; whilst working on a document a user will select Save As, change the name of the document and attempt to save, a 0KB file is created in the location and an error returned
    to the user stating that the file is in use by another user. At this point it is normally possible to save but on occasion this has also failed. It is possible to duplicate the issue on multiple machines.
    The user has Full control over the destination directory, both share & NTFS.
    File Server is running Windows Server Essentials 2012R2.
    The Users desktops are running Windows 7 sp1, all available Windows Updates have been applied.
    They have an Office 2013 Small Business Premium subscription, two of the users have a full msi based installation of Office and one the Click-to-Run version.
    They use Eset Endpoint Antivirus and Eset File Security on the server, the problem can be duplicated with both client & server antivirus disabled.
    Have disabled power saving on client & server network cards.
    Does anyone have any suggestions on how to troubleshoot this?

    Hi,
    As far as I know, if one user had opened or edited one file in File Server, the other users only could be open the file read-only. It could not be saved or other behavior.I would suggest the following:
    Turn off the Preview Pane, Details Pane and pop ups that show information about file and desktop items.
    This is a problem that has been reported to affect Windows 7 clients only, not Windows XP. The problem here may have something to do with the Windows Explorer in Windows 7. We are currently investigating this further and will post more information as it
    is available.
    In a Windows Explorer window, do the following:
    1. Right click on the Start Button.
    2. Click 'Open Windows Explorer'.
    3. At the top left click Organize > Layout 
    4. Uncheck Details Pane and Preview Pane.
    5. On a Windows menu, click on Tools > Folder Options.  In the box that opens up, click on the View tab.  Scroll down the list to
    “Show pop-up description for folder and desktop items” and clear the checkbox and then click OK. 
    http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2012/05/14/the-definitive-locked-file-post.aspx
    BTW, I recommend you
    use a shared workbook to collaborate in Excel.
    Regards,
    George Zhao
    TechNet Community Support

  • Issue with BAPI_GOODSMVT_CREATE

    Hi experts,
    I am developing a program whereby I have to create GR from PO and post these documents. I have been able to use the BAPI_GOODSMVT_CREATE to create the GR. However I am facing an issue. After the BAPI_GOODSMVT_CREATE, I call the FM - BAPI_TRANSACTION_COMMIT to commit the BAPI, but it isn't working.
    The bapi is only creating the GR and it isn't posting it. also, I have tried to use COMMIT WORK AND WAIT statement, but this too is not really posting the document. The only solution I have been able to find is to use WAIT UP TO 10 SECONDS. In terms of performance tough, this isn't the best solution.
    I was wondering if anyone knows how I can force the commit to the BAPI or if there is another alternative to create and post GR from PO.
    Thanks for your precious help.
    Shabir

    Hi,
    try this way..Hope this will work and worked for us..
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          goodsmvt_header       = t_goodsmvt_header
          goodsmvt_code         = t_goodsmvt_code
        IMPORTING
          goodsmvt_headret      = w_docret
          materialdocument      = w_docno
        TABLES
          goodsmvt_item         = t_goodsmvt_item
          goodsmvt_serialnumber = t_goodsmvt_slno
          return                = t_goodsmvt_ret.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait   = 'W'
        IMPORTING
          return = wa_return2.
    Prabhudas

  • File Locking Issue with Concurrent Locks

    Hi. I'm trying to implement a procedure using the File Lock class for two instances of the same program (running on different servers) accessing files shared over an NFS mount in Unix (this is using Java 1.5). 99% of the time, this works great. One box will get the lock, and the other will respect that lock and not touch the file. However, the other 1% of the time, both boxes seem to access the same file simultaniously, allowing BOTH to acquire locks on the same file.
    I'm wondering if anyone has any advice on how to solve this problem. I've been searching all over but haven't found a solution. Like I said, the locking works most of the time - I've even independantly verified that it does (and that it's not just timing) with a test program. It's only when both programs access the file at the exact same does that there seems to be a problem.
    If it helps, here is the gist of my code:
          FileLock javaLock = null;
          FileChannel fileChannel = null;
          for(int i = 0; i < fileArray.length; i++)
             javaLock = null;
             fileChannel = null;
             if(!fileArray.exists())
    continue;
    try
    RandomAccessFile raLockFile = new RandomAccessFile(fileArray[i], "rw");
    try
    fileChannel = raLockFile.getChannel();
    if(fileArray[i].exists())
    javaLock = fileChannel.tryLock();
    catch(OverlappingFileLockException ofle)
    // Error printed here
    continue;
    catch(Exception e)
    // Error
    javaLock = null;
    if(javaLock == null)
    continue; // File is already locked, move to next one
    // Processing is done on the file here
    catch(Exception e)
    // Error
    finally
    try
    if(javaLock != null)
    javaLock.release();
    if(fileChannel != null)
    fileChannel.close();
    catch(Exception e)
    // Error
    Edited by: kksmith on Jul 21, 2008 7:31 AM
    Edited by: kksmith on Jul 21, 2008 7:32 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I don't have the errors on hand at the moment, but most were File Not Found IOExceptions (because one box would finish processing the file and rename it out from under the other box). Using a bunch of System.out.println()s I was able to determine that both boxes were locking the same specific files producing those errors.
    The other weird thing that would happen is that the file would be processed correctly on one box, but somehow leave behind a zero length version of itself, which the other box would finish processing normally as if we had received a zero length file (as we have special code in place for that condition). This is probably the biggest problem, since I can trap File Not Founds (though it's messy and kind of defeats the purpose of using locks to begin with), but I don't have a real easy way to catch this (and I can't just toss out all zero lengths because we want to know if we legitamently got a zero length file in).
    As far as I can tell though, this problem doesn't occur outside of an NFS mount, but I haven't tested it extensively enough to be sure (since it's a random timing thing, it's difficult to reproduce outside of just dumping a ton of files on it). I'm not entirely sure how our NFS system in configured, since that is completely out of my hands (System Admins have contol over all of that). But I believe it has most of the latest patches.

  • Caps Lock issue with Colemak layout in Xorg

    Apologies if this is a silly problem; I'm rather new to linux in general. I'm trying to set up the US and Colemak layouts, and be able toggle between them. Ideally, caps lock will act as a second backspace in Colemak, and as it normally does in US.
    The problem seems to be strictly with the secondary layout. If Colemak is second, then caps lock backspaces as it should, but is also toggled on or off each press. If US is second, then, instead of toggling, caps lock behaves as a backspace. This occurs both in xfce4, and before, at the lxdm log-in screen.
    This is how I have it set up with setxkbmap:
    setxkbmap -model pc104 -layout us,us -variant colemak, -option grp:shifts_toggle
    Or in an Xorg conf.:
    Section "InputClass"
    Identifier "system-keyboard"
    MatchIsKeyboard "on"
    Option "XkbLayout" "us,us"
    Option "XkbModel" "pc104"
    Option "XkbVariant" "colemak,"
    Option "XkbOptions" "grp:shifts_toggle"
    EndSection

    The kind people from the IRC channel suggested I add this bit at the very end of the "/etc/X11/xorg.conf" file (instead of "/etc/X11/xorg.conf.d/10-evdev.conf" - tho it would've probably worked that way too):
    Section "InputClass"
    Identifier "Keyboard Defaults"
    MatchIsKeyboard "yes"
    Option "XkbLayout" "us, ro"
    Option "XkbVariant" "std"
    Option "XkbOptions" "grp:caps_toggle, grp_led:scroll"
    EndSection
    Apparently it works. I just have to hold AltGr and press s, q , a, i, t, etc to type ș â ă î ț etc. But how do I set it to ; { } ] ' ", etc, like the default behaviour in Windows... ? I would like them to correspond to this layout.
    Because this is not the "standard" ("std") version...
    I may have to edit the "/usr/share/X11/xkb/symbols/ro" file to map them.
    Unless there's a better way ?
    Last edited by DSpider (2010-12-11 13:19:16)

  • Locking issues with transaction-isolation levels

              I believe that my program is suffering from some sort of deadlock, and I was hoping
              for some feedback.
              I am helping to develop a trading system
              using EJBs, Oracle 9i, and Bea Weblogic 7.0. The system provides an entity EJB
              called LiveOrder that exposes several finder methods, most of which return java.util.Collections
              of LiveOrder EJBs.
              In weblogic-ejb-jar.xml, I have set the transaction isolation-levels for these
              finders to TRANSACTION_READ_COMMITTED_FOR_UPDATE (b/c TRANSACTION_SERIALIZABLE
              isn't really supported by Oracle), in an effort to eliminate phantom reads, which
              occur frequently if I do not use this isolation level. These finders all use transaction
              attribute 'Required'.
              It is my understanding that any transaction that calls any of these finders either
              will lock the database if no other transaction already owns the lock, or will
              wait until the lock is released if another transaction owns that lock. It also
              is my understanding that a transaction that owns a lock will always release any
              locks acquired upon expiration of that transaction (whether that be via commit
              or via rollback).
              However, this doesn't always appear the case: I have noticed occassionally that
              several clients "hang," as they wait for the lock that, for some reason, is not
              being released by its transaction. There do not appear to be any exceptions thrown
              by the system prior to the system hanging, and the Weblogic administration tool
              states that all transactions have been committed.
              If it helps, I have included the general algorithm for the main (i.e., most expensive)
              transaction:
              1. a client calls a stateless session EJB's processOrder method (which should
              implicitly start a new transaction, b/c this method has attibute 'RequiresNew')
              2. the transaction invokes the LiveOrder finder method (this should lock the DB,
              so subsequent callers should block until the lock is released).
              3. the transaction invokes another LiveOrder finder method, returning a separate
              set of data.
              4. the transaction invokes a finder method from a separate entity EJB (called
              Security), which maps to a "read-only" table in the DB (default transaction-isolation
              level, Required attribute).
              5. the transaction invokes a finder method from yet another separate entity EJB
              (called SecurityMarketValues), which maps to some other table (not read-only)
              in the DB (again, default transaction-isolation level, Required attribute).
              6. the transaction writes to the SecurityMarketValues entity EJB.
              7. the transaction writes to the LiveOrders retrieved from steps 2 and 3.
              8. the transaction ends by exiting method processOrder (thus releasing the locks
              on the LiveOrder table in the DB).
              In the system, there also exist other transactions that occassionally call the
              LiveOrder EJB finder methods, but only briefly to take a "snapshot" of the live
              order table (i.e., these transactions do not make calls to other DB tables, and
              close transactions almost immediately after starting them)
              Like I mentioned before, the system sometimes works, and sometimes it hangs. Any
              ideas? I'm running out...
              

    Jon,
              If there was an Oracle deadlock the DB would resolve it momentarily and
              will ultimately choose one transaction and throw an exception so it's
              not a DB deadlock.
              Take a thread dump at the very moment your system seems to be hanging
              and look at what the threads are doing.
              From your description it's not very unlikely that those threads of
              yours that take snapshots of the data will not disrupt the transactions
              so you may be surprised by the thread dumps that this is actually what
              happens -- those snapshot thread wait for some lock while holding locks
              needed by you other threads and it just slows down the system.
              Regards,
              Dejan
              Jon Gadzik wrote:
              >I believe that my program is suffering from some sort of deadlock, and I was hoping
              >for some feedback.
              >
              >I am helping to develop a trading system
              >using EJBs, Oracle 9i, and Bea Weblogic 7.0. The system provides an entity EJB
              >called LiveOrder that exposes several finder methods, most of which return java.util.Collections
              >of LiveOrder EJBs.
              >
              >In weblogic-ejb-jar.xml, I have set the transaction isolation-levels for these
              >finders to TRANSACTION_READ_COMMITTED_FOR_UPDATE (b/c TRANSACTION_SERIALIZABLE
              >isn't really supported by Oracle), in an effort to eliminate phantom reads, which
              >occur frequently if I do not use this isolation level. These finders all use transaction
              >attribute 'Required'.
              >
              >It is my understanding that any transaction that calls any of these finders either
              >will lock the database if no other transaction already owns the lock, or will
              >wait until the lock is released if another transaction owns that lock. It also
              >is my understanding that a transaction that owns a lock will always release any
              >locks acquired upon expiration of that transaction (whether that be via commit
              >or via rollback).
              >
              >However, this doesn't always appear the case: I have noticed occassionally that
              >several clients "hang," as they wait for the lock that, for some reason, is not
              >being released by its transaction. There do not appear to be any exceptions thrown
              >by the system prior to the system hanging, and the Weblogic administration tool
              >states that all transactions have been committed.
              >
              >If it helps, I have included the general algorithm for the main (i.e., most expensive)
              >transaction:
              >
              >1. a client calls a stateless session EJB's processOrder method (which should
              >implicitly start a new transaction, b/c this method has attibute 'RequiresNew')
              >
              >2. the transaction invokes the LiveOrder finder method (this should lock the DB,
              >so subsequent callers should block until the lock is released).
              >
              >3. the transaction invokes another LiveOrder finder method, returning a separate
              >set of data.
              >
              >4. the transaction invokes a finder method from a separate entity EJB (called
              >Security), which maps to a "read-only" table in the DB (default transaction-isolation
              >level, Required attribute).
              >
              >5. the transaction invokes a finder method from yet another separate entity EJB
              >(called SecurityMarketValues), which maps to some other table (not read-only)
              >in the DB (again, default transaction-isolation level, Required attribute).
              >
              >6. the transaction writes to the SecurityMarketValues entity EJB.
              >
              >7. the transaction writes to the LiveOrders retrieved from steps 2 and 3.
              >
              >8. the transaction ends by exiting method processOrder (thus releasing the locks
              >on the LiveOrder table in the DB).
              >
              >
              >In the system, there also exist other transactions that occassionally call the
              >LiveOrder EJB finder methods, but only briefly to take a "snapshot" of the live
              >order table (i.e., these transactions do not make calls to other DB tables, and
              >close transactions almost immediately after starting them)
              >
              >Like I mentioned before, the system sometimes works, and sometimes it hangs. Any
              >ideas? I'm running out...
              >
              >
              >
              >
              

  • Clustering issues with 4.5.1

    We are using Weblogic 4.5.1 with sp7 and have heard that there are
              issues with Weblogic clustering. Specifically, the IIS plugin having
              memory leaks, and 4.5.1 with sp7 has issues when implementing clustering
              (the app servers in the cluster sometimes do not respond and sometimes
              contend for who owns the next request coming from the proxy). I've also
              seen that when a HTTP 1.1 request comes to the Web server, the proxy
              sends a HTTP 1.0 request to the App server. I've also heard that sp10,
              due out in July will fix these issues. Can anyone verify this?
              Also, I want to make sure that our proposed configuration can work in a
              clustered environment. I have two IIS Web servers, WebA and WebB, and
              also two Application servers running 4.5.1 sp7, AppA and AppB. Both Web
              servers are identical and both App servers are identical. Our Weblogic
              ListenPort is 7005
              If I set up WebA's iisproxy.ini file to contain the line
              "WebLogicCluster=AppA:7005,AppB:7005"
              I then copy WebA's iisproxy.ini file to WebB so that the two
              iisproxy.ini files are identical.
              The App servers have an identical configuration and point to 237.0.0.1
              as their multicast IP address.
              Is this configuration ok? Can two web servers point to the same two App
              servers in the cluster, or does each Web server need it's own "cluster"
              of App servers.
              Thanks in advance...
              

    What was that issue with deadlock and where is it described?
              Prasad Peddada wrote:
              > Also there was a dead lock issue with sp7 which was fixed in the later service
              > packs.
              >
              > Vinod Mehra wrote:
              >
              > > >> Specifically, the IIS plugin having memory leaks,
              > > These have already been fixed with SP7.
              > >
              > > >>and 4.5.1 with sp7 has issues when implementing clustering
              > > >>(the app servers in the cluster sometimes do not respond and sometimes
              > > >>contend for who owns the next request coming from the proxy).
              > >
              > > WebLogic server not responding can be because of many reasons. Most of the
              > > time it is because of bad configurations and sometimes because of
              > > Application
              > > problems itself. Now about recovering from such a hung server SP8 onwards
              > > the plugin-ins have a configurable parameter "HungServerRecoverySecs",
              > > using which the plug-ins mark that server as bad (temporarily) and
              > > the requets failover to the SECONDARY.
              > >
              > > >> I've also seen that when a HTTP 1.1 request comes to the Web server, the
              > > proxy
              > > >>sends a HTTP 1.0 request to the App server.
              > >
              > > 4.5.1 does noes not support HTTP1.1 yet. So they will still be HTTP1.0.
              > >
              > > >> I've also heard that sp10, due out in July will fix these issues. Can
              > > anyone verify this?
              > > Yes. Except the last one.
              > >
              > > >> Is this configuration ok?
              > > Yes the configuration you have described is a valid one.
              > >
              > > --Vinod.
              > >
              > > lynch wrote:
              > >
              > > > We are using Weblogic 4.5.1 with sp7 and have heard that there are
              > > > issues with Weblogic clustering. Specifically, the IIS plugin having
              > > > memory leaks, and 4.5.1 with sp7 has issues when implementing clustering
              > > > (the app servers in the cluster sometimes do not respond and sometimes
              > > > contend for who owns the next request coming from the proxy). I've also
              > > > seen that when a HTTP 1.1 request comes to the Web server, the proxy
              > > > sends a HTTP 1.0 request to the App server. I've also heard that sp10,
              > > > due out in July will fix these issues. Can anyone verify this?
              > > >
              > > > Also, I want to make sure that our proposed configuration can work in a
              > > > clustered environment. I have two IIS Web servers, WebA and WebB, and
              > > > also two Application servers running 4.5.1 sp7, AppA and AppB. Both Web
              > > > servers are identical and both App servers are identical. Our Weblogic
              > > > ListenPort is 7005
              > > >
              > > > If I set up WebA's iisproxy.ini file to contain the line
              > > > "WebLogicCluster=AppA:7005,AppB:7005"
              > > >
              > > > I then copy WebA's iisproxy.ini file to WebB so that the two
              > > > iisproxy.ini files are identical.
              > > >
              > > > The App servers have an identical configuration and point to 237.0.0.1
              > > > as their multicast IP address.
              > > >
              > > > Is this configuration ok? Can two web servers point to the same two App
              > > > servers in the cluster, or does each Web server need it's own "cluster"
              > > > of App servers.
              > > >
              > > > Thanks in advance...
              

  • Pre-n enabler seems to cause issues with lock up/beach ball

    I just received my new C2D MBP yesterday with 3G of RAM and all was peachy. I decided to install the $1.99 Pre-N enabler patch from Apple and it appears that I'm not alone in having that cause system lock ups and beach balls from ****.
    I unfortunately seem to be in the same boat. It runs for awhile and then all of a sudden it will just lock up and I'll get the spinning beach ball from **** forever, until I reboot.
    I'm using mine with a NetGear Pre-N wireless router and while I'm getting 140kpbs connections I am getting a lot of receive errors and the machine just goes off to la-la land.
    I was worried about something else until I read these posts over in Internet & Networking and now I'm wondering if there really is an issue with whatever the "enabler" did. It ceratinly appears to be this. Nothing else seems to cause it this kind of beach ball death.
    So now I guess we need to look for an "un-enabler" patch. Just out of curiosity where do we email problems like this to get resolved?
    UGGHHHHHHH!!!
    Peter

    I have this same problem. I reported a bug to apple bug id#4990056
    Here is what i wrote:
    10-Feb-2007 10:36 PM Brooks Roy:
    Summary:
    I recently got a Linksys WRT350N 802.11n router and using it with my macbook pro core 2 duo. The router is firmware version 1.03.2.
    After installing the enabler from the apple site i verified it upgraded properly and it shows a/b/g/n for my airport card. However the computer has been locking up more and more. I finally narrowed it down to the airport card. Here is what happens:
    Steps to Reproduce:
    With regular airport usage, the mac will all of the sudden give the spinning 'beach ball' and just sit there. A simple http download will stop and the mac will become unresponsive. I cannot launch new applications. The icons will bounce in the dock but never open. I cannot force-quit any applications. My only option is to hold down the power button for a hard shutdown.
    I can almost duplicate the issue 7 times out of 10. Sometimes it takes 15 minutes or so before it locks up, sometimes its almost immediately.
    I have done a full fsck and permissions. I also downloaded tiger cache cleaner and cleaned all settings. I have also booted off the apple install cd and done a extended full RAM check on the 2Gb installed in my computer.
    I have restored my IO80211Family.kext from my other macbook pro (regular core duo) and my problems have gone away. I am 100% sure there is a bug with the 802.11n enabler and the Linksys WRT350N.
    I do not have any special configuration on my linksys, just MAC based wireless authentication.
    When using the MacBook pro on the WRT350N in 802.11g without the latest 802.11n enabler the mac performs fine and does not become unresponsive.
    Expected Results:
    I expect the mac to perform just as a 802.11g network will work with increased transfer speeds.
    Actual Results:
    See above.
    Regression:
    It only occurs when using network traffic (i.e Mail.app, Safari browsing sites, etc. Any application that requires Airport.
    Notes:
    I am using the original IO80211Family.kext driver that does not have 802.11n support and it works properly. Also using builtin ethernet with airport off and the 802.11n driver works (obviously).

  • Since I've installed Mountain Lion, I am having lock up issues with multiple programs. MS Outlook has crashed and I've lost all my folders. HELP?

    Since I've installed Mountain Lion, I am having lock up issues with multiple programs. MS Outlook has crashed and I've lost all my folders. HELP?

    okay I've finally been able to get tor and all the other programs to work according to my plan the only thing that's still making problems is that iptables doesn't work as I want it to, when I start chromium without proxy settings privoxy doesn't seem to forward the information to polipo.. do I need to add another rule to iptables.rules in order for the program to know it has to reroute the information again or how can I get this to work? and is there any way to run rtorrent with proxy support?
    anyway, problem 2 and 3 are still to be solved.
    and does anybody know where i can get a good dansguardian blacklist that was not designed for 6 year old children and for which I don't need to subscribe? I'm still getting these partypoker popups -.-
    //e: with iptables it's the same thing as described in the first post. https works, http doesnt. I get the output "Invalid header received from client." on http sites. still no idea why though.. (and the https-version of torcheck.xenubite says i'm tor unprotected while starting the browser with iptables)
    Last edited by deF291 (2011-04-23 16:16:31)

Maybe you are looking for

  • VPN issues since OS X Mavericks 10.9.5 update using GlobalProtect

    Has anyone had any difficulties connecting via a GlobalProtect VPN since updating to OS X Mavericks 10.9.5? (GlobalProtect is a product from Palo Alto Networks). We can still seem to make a connection (as in the VPN connects) however we can no longer

  • Facing a problem in "HTML Standard Editor" item type.

    Hi, I have been using an item which is of type "HTML Editor Standard" and I am using it to store a clob value into the database. The functionality works fine in Firefox but the value of the item is always null irrespective of whatever I type in that

  • Item in Transfer process-Jay:(

    Hi jay, I have a situation where the shopping cart is being approved but the status doesnot change from "Item in Transfer process". I wonder why?? any suggestions. Thanks Sunny

  • Object in OM

    Dear Experts, Some objects from ECC are used in SRM system.  Now SRM needs some Jobs(C) for there scenario to be worked out in SRM system but due to some reasons client does not want them to use (C) for there scenario , so HR  Consulatnt has suggeste

  • ISkin

    Does anyone know if the iSkin Revo for the iPhone will be available at Apple Stores? Thanks!