OIM DB Row LOCK Exception on Quartz tables

I am facing db row lock error in Prod OIM due to which the Scheduler fails to kick off and an OIM Restart is required to release the lock and start the Scheduler again.
This Error is occuring at any time when none of the scheduler( Custom as well as House Keeping) are scheduled.The OIM Version is 9.0.3.1.
I have enabled Database logs in Debug mode but there are no logs corresponding to the table where lock occured.
This Error was encountered long back with OIM 9.0.1 and was reported as Bug 6491465, but was suspended because of no response from Customer.
The Error trace is as follows
ERROR,11 Sep 2009 16:57:05,497,[org.quartz.core.ErrorLogger],An error occured while scanning for the next trigger to fire.
org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Io exception: Connection reset [See nested exception: java.sql.SQLException: Io ex
ception: Connection reset]
at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.obtainLock(StdRowLockSemaphore.java:154)
at org.quartz.impl.jdbcjobstore.JobStoreCMT.acquireNextTrigger(JobStoreCMT.java:1376)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:231)
* Nested Exception (Underlying Cause) ---------------
java.sql.SQLException: Io exception: Connection reset
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:515)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:1029)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1126)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.obtainLock(StdRowLockSemaphore.java:137)
at org.quartz.impl.jdbcjobstore.JobStoreCMT.acquireNextTrigger(JobStoreCMT.java:1376)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:231)
Did anyone had ever encountered this error.Any Hints?

I would check the network pieces as suggested in our internal emails. If the connection is dropping somewhere on your network, the lock would never be released.
-Kevin

Similar Messages

  • Heavy row lock contention

    Guys,
    I really appreciate your views on this.. Please can some one who have worked on RAC and have an understanding how RAC works, guide me.
    We currently are running a loadtest on one of the new RAC system and we are seeing excessive row lock contention for one table. The table basically has very few rows, say about 6-8 and pretty much every user uses this table to lock rows before fetching some data from other tables. When have a heavy load, we see very high wait on this table and enq TX : Row lock contention.
    What is the best way to avoid this ? Is there anyway, we can modify the design of the application and ensure locking.. The typical query that locks the rows in the table looks like this
    SELECT WL0.CLUB_NAME, WL0.SCHEDULE_ID FROM VF_BINGO_NEXT_CLUB_DRAW WL0 WHERE ( WL0.CLUB_NAME = :1 ) FOR UPDATE As said, they table has only 6-8 rows, so query plan etc doesn't apply. Please can someone who have extensive application knowledge guide me thru ?
    Many thanks in advance.
    G

    > But is there a way to alliviate the concurrency issue, if there is a genuine
    requirement to hold lock on a table. What other options do we have other
    than locking ?
    The purpose of a lock is to ensure data consistency - only 1 process can change that row. So what I find puzzling is why so many app sessions want to change that single row. What data does that row hold that requires continual change? Just what is the purpose of this data if it is consistently and continually changing? What business requirement does it attempt to solve?
    To be honest, this sounds like a major design problem to me.
    Like the surrogate key generator approach I mentioned. You create a PK_SEQUENCE table with columns (tablename, pk_value). Any insert against a table requires a lock on PK_SEQUENCE for the table being inserted into - a read of the PK_VALUE, incrementing it by one and then updating that row with the latest sequence. This way each INSERT gets a "nice sequential number" to use as surrogate key for new rows.
    Even when this is done as an autonomous transaction, it introduces a very expensive resource - why? Because only one session at a time can be serviced by that resource.
    If there are a lot of INSERTs into a table, this approach will quickly become a severe bottleneck as every single insert requires a new surrogate key value and a lock on that PK_SEQUENCE table to obtain that value.
    This problem is solved by allowing/enabling such a resource to serve multiple sessions concurrently. Which is for example what Oracle Sequence objects do within this example I've described.
    The bottom line is that the design you describe introduced a bottleneck by create an expensive and serialised resource that can only serve a single session at a time.
    You need to re-look at the business requirement - and find another way to solve it than to introduce this type of serialised resource and contention.

  • Identifying deadlocked resources in graph with 1 row lock and 1 table lock

    Hi, I have run into repeated occurrences of the deadlock graph at the bottom of this post and have a few questions about it:
    1. It appears that proc 44, session 548 is holding a row lock (X). Is the waiter, proc 30, session 542, trying to acquire a row lock (X) also or an exclusive table lock (X) on the table containing that row?
    2. Under what circumstances would something hold a row exclusive table lock (SX) and want to upgrade that to a share row exclusive table lock (SSX)?
    3. Our table cxml_foldercontent has a column 'structuredDataId' with a FK to cxml_structureddata.id and an ON DELETE SET NULL trigger. Would this help explain why an "update" to one table (i.e.g cxml_foldercontent) would also need to acquire a lock in a foreign table, cxml_structureddata?
    4. What is the difference between "Current SQL statement:" and "Current SQL statement for this session:"? That terminology is confusing. Is session 542 executing the "update" or the "delete"?
    5. In the "Rows waited on:" section is it saying that Session 542 is waiting on on obj - rowid = 0000BE63 - AAAL5jAAGAAA6tZAAK or that it is has the lock on that row and other things are waiting on it?
    A couple of notes:
    - the cxml_foldercontent.structuredDataId FK column has an index on it already
    Deadlock graph:
                           ---------Blocker(s)--------  ---------Waiter(s)---------
    Resource Name                    process session holds waits  process session holds waits
    TX-003a0011-000003d0        44       548     X               30        542             X
    TM-0000be63-00000000       30       542     SX              44        548     SX    SSX
    session 548: DID 0001-002C-000002D9     session 542: DID 0001-001E-00000050
    session 542: DID 0001-001E-00000050     session 548: DID 0001-002C-000002D9
    Rows waited on:
    Session 542: obj - rowid = 0000BE63 - AAAL5jAAGAAA6tZAAK
      (dictionary objn - 48739, file - 6, block - 240473, slot - 10)
    Session 548: no row
    Information on the OTHER waiting sessions:
    Session 542:
      pid=30 serial=63708 audsid=143708731 user: 41/CASCADE
      O/S info: user: cascade, term: unknown, ospid: 1234, machine:
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=2546894660
      Current SQL Statement:
    update cascade.cxml_foldercontent set name=:1 , lockId=:2 , isCurrentVersion=:3 , versionDate=:4 , metadataId=:5 , permissionsId=:6 , workflowId=:7 , isWorkingCopy=:8 , parentFolderId=:9 , relativeOrder=:10 , cachePath=:11 , isRecycled=:12 , recycleRecordId=:13 , workflowComment=:14 , draftUserId=:15 , siteId=:16 , prevVersionId=:17 , nextVersionId=:18 , originalCopyId=:19 , workingCopyId=:20 , displayName=:21 , title=:22 , summary=:23 , teaser=:24 , keywords=:25 , description=:26 , author=:27 , startDate=:28 , endDate=:29 , reviewDate=:30 , metadataSetId=:31 , expirationNoticeSent=:32 , firstExpirationWarningSent=:33 , secondExpirationWarningSent=:34 , expirationFolderId=:35 , maintainAbsoluteLinks=:36 , xmlId=:37 , structuredDataDefinitionId=:38 , pageConfigurationSetId=:39 , pageDefaultConfigurationId=:40 , structuredDataId=:41 , pageStructuredDataVersion=:42 , shouldBeIndexed=:43 , shouldBePublished=:44 , lastDatePublished=:45 , lastPublishedBy=:46 , draftOriginalId=:47 , contentTypeId=:48  where id=:49
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    delete from cascade.cxml_structureddata where id=:1

    Mohamed Houri wrote:
    What is important for a foreign key is to be indexed (of course if the parent table is deleted/merged/updated, or if a performance reason imposes it). Wether this index is unique or not doesn't matter (as far as i know).But, you should ask your self the following question : what is the meaning of having a 1 to 1 relationship between a parent and a child table ? if you succeed to create a unique index on your FK then this means that for each PK value corresponds at most one FK value!! Isn't it? is this what you want to have?Thanks, as I mentioned above, cxml_structureddata is actually the child table of cxml_foldercontent with 1 or more records' owningEntityId referring to rows in cxml_foldercontent. The reason for the FK on cxml_foldercontent.structuredDataId is a little ambiguous but it explained above.
    Will a TX-enqueue held on mode X always be waited on by another TX-enqueue row lock X? Or can it be waited on by an Exclusive (X) table lock?Not really clear. Sorry, are you saying my question is unclear or it's not clear why type of eXclusive lock session 542 is trying to acquire in the first line of the trace? Do you think that the exclusive lock being held by session 548 in the first line is on rows in cxml_foldercontent (due to the ON DELETE SET NULL on these child rows) or rows in the cxml_structureddata that it's actually deleting?
    Is there any way for me to tell for certain?
    The first enqueue is a TX (Transaction Enqueue) held by session 548 on mode X (exclusive). This session represents the blocking session. At the same time the locked row is waited on by the blocked session (542) and the wait is on mode X (exclusive). So put it simply, we have here session 542 waiting for session 548 to release it lock (may be by commiting/roll backing). At this step we are not in presence of a deadlock.
    The second line of the deadlock graph shows that session 542 is the blocking session and it is doing a TM enqueue (DML lock) held on SX(Shared eXclusive). While session 548(which is the waiting session) is blocked by session 542 and is waiting on SSX mode.
    Here we see that 548 is blocking session 542 via a TX enqueue and session 542 is blocking session 548 via a TM enqueue ---> That is the deadlock. Oracle will then immediately choose arbitrarlly a victim session (542 or 548) and kill its process letting the remaining session continuing its work.
    That is your situation explained here.Thanks, any idea why session 542 (the DELETE from cxml_structureddata) would be trying to upgrade it's lock to SSX? Is this lock mode required to update a child tables foreign key columns when using an ON DELETE SET NULL trigger? Having read more about SSX, I'm not sure I understand in what cases it's used. Is there a way for me to confirm with 100% certainty specifically which tables in the TM enqueue locks are being held on? Is session 548 definitely trying to acquire an SSX mode on my cxml_foldecontent table or could it be cxml_structureddata table?
    (a) Verify that all your FK are indexed (be carreful that the FK columns should be at the leading edge of the index)Thanks, we've done this already. When you say the "leading edge" you mean for a composite index? These indexes are all single column.
    (b) Verify the logic of the DML against cxml_foldercontentCan you be more specific? Any idea what I'm looking for?

  • Table lock ? dictionary row lock? recursive?

    hi guys,
    was looking at dml locks and ddl locks
    for example
    DML changes to table tab
    1) (TX lock for table tab's affected row - stored in the row itself)
    2) (TM lock for table tab - store in V$lock)
    DDL changes to table tab
    1) (DDL lock for table tab -> store in v$lock ?)
    2) (TX lock for dictionary affected row -> locking that row in data dictionary tab to reflect changes)
    3) (TM lock for dictionary tab -> store in V$lock ?)
    (Since i doing a DML to the data dictionary table, am i going to hold another TM lock for that data dictionary table)
    what is a DDL lock exactly?
    1) a lock on the table tab in v$lock
    or
    2) or tx lock on the data dictionary row (which will then incurr a recursive TM lock the data dictionary table)
    or ?
    please advise!

    On behalf of Tanel. :)
    is that TM lock in v$lock view a DDL lock? (tried an alter table command and saw a TM lock appeared)No, TM lock is dml lock as documented. DDL lock(a.k.a, library cache lock) is not exposed via v$lock view. It's exposed only via x$kgllk view.
    so how many locks are actually acquire for e.g when i issue a ALTER TABLE tab xxx ADD col1 NUMBER;You can identify it yourself without big effort.
    alter session set events '10704 trace name context forever, level 10';
    alter table ...;
    alter session set events '10704 trace name context off';==================================
    Dion Cho - Oracle Performance Storyteller
    http://dioncho.wordpress.com (english)
    http://ukja.tistory.com (korean)
    http://dioncho.blogspot.com (japanese)
    ==================================

  • Table/row locking

    Hi Guys,
    Is this related to db size table/row locking?
    thanks
    version: 10.2.0.5
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    org.exolab.castor.jdo.LockNotGrantedException: persist.writeLockTimeoutcom

    dbaing wrote:
    Hi Guys,
    Is this related to db size table/row locking?
    thanks
    version: 10.2.0.5
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    org.exolab.castor.jdo.LockNotGrantedException: persist.writeLockTimeoutcomrow locking is 100% & totally independent of table size or number of rows in the table.
    java stack dump is borderline meaningless.
    You need Oracle error number & message to determine root cause.

  • 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;

  • How and when the database release a row lock?

    Dear experts,
    We are using the following statement to obtain a row lock in a table in the database(ORACLE of course),
    SELECT * FROM {TABLE_NAME} WHERE ID = 1 for update
    and if we succeed grabbing the row lock we will continue to issue a update statement every 30 seconds to preserve the lock as far as possible.
    here is the update statement to preserve the lock,
    UPDATE {TABLE_NAME} SET time = ? WHERE ID = 1.
    As you see more longer we keep holding the row lock , more update statements are submitted in the pending transaction.
    In normal case our application can grab the exclusive row lock and works for a long time,however sometimes a connection reset exception is thrown
    and our application will close the connection(I assume the pending transaction will be rolled back by the database) and exit the JVM.
    Since other applications will keep trying to grab the same row lock to become the master role,
    we expect one of them can succeed but they are all failed because the database has not released the row lock as expected.
    Can someone explain more details about how and when the row lock can get released in our use case?
    Thanks,
    SuoNayi
    Edited by: SuoNayi on 2013-5-30 上午8:12

    Hm. Is this part of an XA transaction by any chance? I know that Oracle maintains separate bookkeeping for such transactions which can cause rows to stay 'locked' even when the regular DBA views will indicate there is no user currently locking the record at all. I have no idea about the actual details and what you need to do to clean up such a situation, that is something a DBA should know and do.
    If not... well this is more of a question for people who know the DBMS, which makes it a target for the Oracle DBMS forums. Java developers don't tend to have DBA-level knowledge of the database, you should ask the question where you have more chance of people with expertise answering stuff:
    General Database Discussions

  • UnitOfWork doesn't release pessimistic row lock???

    I have an application that polls a DB table for new "submissions", then forwards them to another server to handle them asynchronously. When the asynchronous response comes back, my application verifies that all response have been received from the server, then sends a combined response. My problem is that the asynchronous response listener threads appear to deadlock when pessimistically locking the submission row, even though the transaction that locked it has been closed for ~1s.
    Some psuedocode may help explain the problem. This is my DB polling thread
    while( true ) {
    Submission s = getNextSubmissionAndLockPessimistically();
    if( s == null )
    return null;
    Server s2 = getServerCapableOfRunning( s );
    if( s2 != null )
    return s2;
    uow.revertAndResume();
    I am worried that in the instance that a server capable of running the submission could not be found, or is too full, the UnitOfWork#revertAndResume method does not release the row lock for the submission. Are there any scenarios where this can occur?
    On another note, I occasionally receive "Query sent to unactivated UnitOfWork" exceptions during the uow.revertAndResume() call. My code only uses the first UnitOfWork returned by EntityManager#getUnitOfWork(). Could the two be related? Does anyone have any ideas on how to fix this exception?
    Thanks,
    Dan

    Thank you for the detailed description of how the locks are released; I mistakenly assumed the revertObject/revertAndResume would release them. I will refactor my code to create EntityManager/UnitOfWork instances in loop and release/close them instead of reverting.
    As for the "unactivated UnitOfWork" exception, here is one of my stack traces:
    Exception [TOPLINK-6027] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Query sent to a unactivated UnitOfWork.
    Query: ReadAllQuery(my.package.ServerLimits)
    at oracle.toplink.essentials.exceptions.QueryException.querySentToInactiveUnitOfWork(QueryException.java:893)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2217)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:937)
    at oracle.toplink.essentials.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:86)
    at oracle.toplink.essentials.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:76)
    at oracle.toplink.essentials.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:90)
    at oracle.toplink.essentials.indirection.IndirectList.buildDelegate(IndirectList.java:193)
    at oracle.toplink.essentials.indirection.IndirectList.getDelegate(IndirectList.java:315)
    at oracle.toplink.essentials.indirection.IndirectList.size(IndirectList.java:640)
    at oracle.toplink.essentials.internal.queryframework.CollectionContainerPolicy.sizeFor(CollectionContainerPolicy.java:184)
    at oracle.toplink.essentials.internal.indirection.TransparentIndirectionPolicy.getRealAttributeValueFromObject(TransparentIndirectionPolicy.java:252)
    at oracle.toplink.essentials.mappings.ForeignReferenceMapping.getRealAttributeValueFromObject(ForeignReferenceMapping.java:370)
    at oracle.toplink.essentials.mappings.CollectionMapping.getRealAttributeValueFromObject(CollectionMapping.java:559)
    at oracle.toplink.essentials.mappings.CollectionMapping.getRealCollectionAttributeValueFromObject(CollectionMapping.java:574)
    at oracle.toplink.essentials.mappings.CollectionMapping.mergeIntoObject(CollectionMapping.java:734)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.mergeIntoObject(ObjectBuilder.java:2114)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.mergeIntoObject(ObjectBuilder.java:2096)
    at oracle.toplink.essentials.internal.sessions.MergeManager.mergeChangesOfOriginalIntoWorkingCopy(MergeManager.java:450)
    at oracle.toplink.essentials.internal.sessions.MergeManager.mergeChanges(MergeManager.java:251)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.revertAndResume(UnitOfWorkImpl.java:3527)
    at my.package.DbInterface.getNextSubmissionAndServer(DbInterface.java:460)
    at my.package.PollingThread.waitForNextSubmission(PollingThread.java:175)
    at my.package.PollingThread.run(PollingThread.java:122)
    This particular error could be related to the DB lock obtained on the Server object, which has a One-To-Many relationship to the ServerLimits.
    However, there is another exception that I am worried about:
    Exception [TOPLINK-6027] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Query sent to a unactivated UnitOfWork.
    Query: ReadAllQuery(my.package.Submission)
    at oracle.toplink.essentials.exceptions.QueryException.querySentToInactiveUnitOfWork(QueryException.java:893)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2217)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:937)
    at oracle.toplink.essentials.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:86)
    at oracle.toplink.essentials.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:76)
    at oracle.toplink.essentials.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:90)
    at oracle.toplink.essentials.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:160)
    at oracle.toplink.essentials.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:232)
    at oracle.toplink.essentials.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:90)
    at oracle.toplink.essentials.indirection.IndirectList.buildDelegate(IndirectList.java:193)
    at oracle.toplink.essentials.indirection.IndirectList.getDelegate(IndirectList.java:315)
    at oracle.toplink.essentials.indirection.IndirectList.add(IndirectList.java:140)
    at my.package.db.Transaction.addSubmission(Transaction.java:422)
    at my.package.DbInterface.createNewSubmission(DbInterface.java:284)
    at my.package.EngineInterface.executeObjectFn(EngineInterface.java:446)
    at my.package.EngineInterface.executeBooleanFn(EngineInterface.java:412)
    at my.package.EngineInterface.search(EngineInterface.java:252)
    at my.package.mdb.RequestListenerBean.onMessage(RequestListenerBean.java:457)
    at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
    at RequestListenerBean_EndPointProxy_44242m8.onMessage(Unknown Source)
    at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:268)
    at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
    at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
    at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
    at java.lang.Thread.run(Thread.java:595)
    The code that caused this error is about as simple as it can get:
    EntityManager em = (EntityManager) emf.createEntityManager();
    UnitOfWork uow = em.getUnitOfWork();
    try
    // locate owning transaction and the RECEIVED_FROM_ESB type
    Transaction tx = locate( Transaction.class, em, uow, txId );
    ServerFunction fn = locate( ServerFunction.class, em, uow, fnId );
    TrackingType trackingType = locate( TrackingType.class, em, uow, TrackingType.RECEIVED_FROM_ESB );
    // create submission
    Submission submission = new Submission();
    submission.setPriority( priority );
    submission.setRequestId( requestId );
    submission.setNistId( nistId );
    submission.setFunction( fn );
    // create RECEIVED_FROM_ESB tracking status
    TrackingStatus status = new TrackingStatus();
    status.setTrackingType( trackingType );
    status.setStatusTime( new Timestamp( System.currentTimeMillis() ) );
    submission.addTrackingStatus( status );
    tx.addSubmission( submission );
    em.persist( submission );
    uow.commit();
    em.close();
    return submission.getId();
    finally
    if( uow.isActive() )
    uow.release();
    if( em.isOpen() )
    em.close();
    There is a One-To-Many mapping from Transaction to Submission, and a One-To-Many mapping from Submission to TrackingStatus.
    If anyone can offer any insight into what I'm doing wrong, I'd appreciate it!
    Thanks,
    Dan

  • Row Lock On Form9i,but not occur on Form6i

    I've develope form on oracle 6i to Processing data/recall the data,was processed,back. I try process data(insert data to table A,update the process date to table B and commit on form) and recall it back (delete data from A,update process date to table B and commit),it work fine.But when i compile to 9i,and try the same action (process and recall),I encounter the row locking.
    Can anyone help me?
    DBA_DML_LOCKS:
    SESSION_ID     OWNER     NAME     MODE_HELD     MODE_REQUESTED     LAST_CONVERT     BLOCKING_OTHERS
    276     TEST     A     Row-X (SX)     None     5330     Not Blocking
    276     TEST     B     Row-X (SX)     None     5330     Not Blocking
    v$locked_object :
    XIDUSN     XIDSLOT     XIDSQN     OBJECT_ID     SESSION_ID     ORACLE_USERNAME     OS_USER_NAME     PROCESS     LOCKED_MODE
    5     37     81166     43461     276     TEST     SYSTEM     5132:2292     3
    5     37     81166     43291     276     TEST     SYSTEM     5132:2292     3

    Hi Jon,
    >>Is there a way through group policy (or anything else) to delete all icons on the desktop, except what you specifically program it to do via user-based GPobjects?  
    Based on the description, we can choose to use mandatory user profile to do this. With mandatory user profiles, a user can modify his or her desktop, but the changes are not saved when the user logs off. The next time the user logs on, the mandatory user
    profile created by the administrator is downloaded.
    Regarding mandatory user profile, the following articles can be referred to for more information.
    Mandatory User Profiles
    https://msdn.microsoft.com/en-us/library/windows/desktop/bb776895(v=vs.85).aspx
    Creating a Mandatory User Profile
    https://technet.microsoft.com/en-us/library/gg241183(v=ws.10).aspx
    Create a mandatory user profile
    https://technet.microsoft.com/en-in/library/cc786301(v=ws.10).aspx
    Best regards,
    Frank Shen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • V$system_event, timeouts and row lock contention

    Hello everyone,
    What is the meaning of the total_timeouts column in the v$system_event view if it is related to the event "enq: TX - row lock contention"?
    How can we have a timeout since "query timeout" is a non existent concept on Oracle?
    Maybe I am wrong.
    Regards.
    Carl

    Hello everyone,
    What is the meaning of the total_timeouts column in
    the v$system_event view if it is related to the event
    "enq: TX - row lock contention"?
    How can we have a timeout since "query timeout" is a
    non existent concept on Oracle?
    Maybe I am wrong.
    Regards.
    CarlThe value for timeouts, in this case, indicates the number of times one of the sessions had to wait a full 3 second time slice while waiting for a second session to either commit or roll back, in anticipation of a potential primary key violation. If the second session commits, the first session will receive an error indicating a primary key violation.
    Test setup:
    In session 2:
    CREATE TABLE T1 (C1 VARCHAR2(20) PRIMARY KEY);
    INSERT INTO T1 VALUES ('ORACLE');
    In session 1:
    INSERT INTO T1 VALUES ('ORACLE');
    After executing tha above, allow 60 seconds to elapse after the insert in session 1, and then check the delta values in either V$SYSTEM_EVENT or V$SESSION_EVENT:
    20 waits on ENQ: TX - ROW LOCK CONTENTION, 19 timeouts, 59.99 seconds, with an average wait of 2.9995 seconds.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • How to see lock status of a table ?

    Hi,
    My question is : how to see the lock status of a table ?
    and how to lock a table except run the FM ENQUEUE_TABLENAME?
    Is there any transcation that can lock a table ?
    thx in advance.

    Hi Vincent
    Via transaction SM12 we can check the lock entries at a particular point of time...
    Kind Regards
    Eswar

  • Read only users and row locks

    Can read-only users obtain row locks on non-temporary (i.e,. visible to other users) tables, for example through SELECT FOR UPDATE, even though they couldn't not ultimately modify said tables?

    Yes.
    Here is an example with Oracle XE 11G and HR schema:
    Connecting as user having only CREATE SESSION and SELECT privilege on HR.JOBS table:
    SQL> desc hr.jobs;
    Name                                      Null?    Type
    JOB_ID                                    NOT NULL VARCHAR2(10)
    JOB_TITLE                                 NOT NULL VARCHAR2(35)
    MIN_SALARY                                         NUMBER(6)
    MAX_SALARY                                         NUMBER(6)
    SQL> select * from session_roles;
    no rows selected
    SQL> select * from session_privs;
    PRIVILEGE
    CREATE SESSION
    SQL> select owner, table_name, privilege from user_tab_privs;
    OWNER                          TABLE_NAME
    PRIVILEGE
    HR                             JOBS
    SELECT
    SQL> select job_title from hr.jobs for update;
    JOB_TITLE
    President
    Administration Vice President
    Administration Assistant
    Finance Manager
    Accountant
    Accounting Manager
    Public Accountant
    Sales Manager
    Sales Representative
    Purchasing Manager
    Purchasing Clerk
    JOB_TITLE
    Stock Manager
    Stock Clerk
    Shipping Clerk
    Programmer
    Marketing Manager
    Marketing Representative
    Human Resources Representative
    Public Relations Representative
    19 rows selected.
    SQL>Now connecting as HR following statement hangs:
    SQL> connect hr/hr
    Connected.
    SQL> select * from jobs for update;Going back to first session:
    SQL> update hr.jobs set min_salary=0;
    update hr.jobs set min_salary=0
    ERROR at line 1:
    ORA-01031: insufficient privileges

  • TX - row lock contention in SELECT query without update clause

    Hi,
    We are having problem in one of our application on production. The ASH report shows 'eq: Tx row lock contention' for only Select statements. There is no FOR UPDATE in the select statements. The exact statement is
    enq: TX - row lock contention : SELECT COUNT (1) FROM Table1 WHERE col1= :1 AND col2= :1 AND col3= :1 AND ROWNUM = 1
    enq: TX - row lock contention : SELECT MODULE_CD , MSG_DESC , SEVERITY FROM GS_ERROR_MSG WHERE MSG_NUM = :1
    I don't know why the select are locking the table rows and resulting in waits..
    Our environment is Oracle 10g and Forms & Reports..
    Please help.
    -- Prashant

    Hi,
    are you sure that there is no dml against the tables?
    You can query v$active_session_history (eg column BLOCKING_SESSION) to see which session locked the row.
    HTH..
    - wiZ

  • Runtime error when inserting rows in hrp1018 and hrt1018 tables

    Hi All,
    I have a requirement to insert row in hrp1018 and hrt1018 tables.These tables are interlinked.So, I have used FM 'RH_INSERT_INFTY'. The exact code which I have used is as follows.
    *****************************************code***************************************************************
    << Please post only the relevant portion of the code >>
    The runtime error which is coming is as follows:
    Error analysis
        An internal error in the database interface occurred during access to
        the data of table "HRT1018 ".
        The situation points to an internal error in the SAP software
        or to an incorrect status of the respective work process.
        For further analysis the SAP system log should be examined
        (transaction SM21).
        For a precise analysis of the error, you should supply
        documents with as many details as possible.
    Please let me know why this error is coming.I am not able to find out mistake in the FM and form used in the code.
    Thanks in advance,
    BBKrishna.
    Edited by: Rob Burbank on Jun 9, 2009 1:31 PM

    I am adding the code once again.Please let me know why the error is coming up.
    lv_mproj = 'BLDNG'.
      wa_p1018-mandt = sy-mandt.
      wa_p1018-otype = '9M'.
      wa_p1018-objid = '50009650'.
      wa_p1018-begda = '20090608'.
      wa_p1018-endda = '99991231'.
      wa_p1018-infty = '1018'.
      wa_p1018-plvar = '01'.
      wa_p1018-otype = '9M'.
      wa_p1018-istat = '1'.
      append wa_p1018 to it_p1018.
      repid = sy-repid.
    *Updating hrp1018 and hrt1018 tables
      CALL FUNCTION 'RH_INSERT_INFTY'
        EXPORTING
        FCODE                     = 'INSE'
        VTASK                     = 'D'
         AUTHY                    = ' '
          REPID                   =  repid
          FORM                    = 'FILL_TABS'
        TABLES
          INNNN                   = it_p1018
    EXCEPTIONS
       NO_AUTHORIZATION          = 1
       ERROR_DURING_INSERT       = 2
       REPID_FORM_INITIAL        = 3
       CORR_EXIT                 = 4
       BEGDA_GREATER_ENDDA       = 5
       OTHERS                    = 6
      IF SY-SUBRC <> 0.
        CALL FUNCTION 'BALW_BAPIRETURN_GET'
          EXPORTING
            TYPE                             = SY-MSGTY
            CL                               = sy-msgid
            NUMBER                           = SY-MSGNO
      PAR1                             = ' '
      PAR2                             = ' '
      PAR3                             = ' '
      PAR4                             = ' '
      LOG_NO                           = ' '
      LOG_MSG_NO                       = ' '
         IMPORTING
           BAPIRETURN                        = return_rec
    EXCEPTIONS
      ONLY_2_CHAR_FOR_MESSAGE_ID       = 1
      OTHERS                           = 2
        IF SY-SUBRC <> 0.
            lv_mproj = text-011
                      ELSE.
                      ii_return = return_rec.
                      CONCATENATE                  ii_return-type '-' ii_return-message
                      INTO lv_err_msg SEPARATED BY SPACE.
        ENDIF.
      ENDIF.
    *RHCD_TAB-PROZT
       FORM fill_tabs TABLES ins_tab
                   USING ins_set ins_index.
      DATA : BEGIN OF set.
              INCLUDE STRUCTURE wplog.
      DATA : END   OF set.
      DATA: BEGIN OF h_pt1018.             "to initialize INS_TAB
              INCLUDE STRUCTURE pt1018.
      DATA: END OF h_pt1018.
      REFRESH ins_tab.
      set = ins_set.
      CASE set-infty.
        WHEN '1018'.
          h_pt1018-posnr = lv_mproj.
          h_pt1018-prozt = '100.00'.
          IF NOT ( h_pt1018 IS INITIAL ).
            CLEAR ins_tab.
            ins_tab+36(8) = lv_mproj. "h_pt1018.
            ins_tab+134(5) = '100.00'.
            APPEND ins_tab.
          ENDIF.
      ENDCASE.
    ENDFORM.

  • SQL_ID row locks

    Hi,
    Every day from 23.00 to 01.00 the performance of the database becomes slow, when i traced i found the following "The SQL statement with SQL_ID "4pgt142s271gy" was blocked on row locks.", which i think is the reason for poor performance and also i found the query with this SQL_ID.
    Dut to this my Application at this time Hangs.
    What should be my next step,i can't change this query because till last week the database was going fine.
    Please advice me ASAP.

    Hi,
    Do these tables involve Workspace Manager? If so, I would need a better understanding of exactly which operations you are performing before commenting on any performance issues.
    Otherwise, I would recommend to use the following forum for general database questions.
    General Database Discussions
    Regards,
    Ben

Maybe you are looking for