AnsweredAssumed Answered

Timeslice job issue

Question asked by shiva.s43 on Nov 21, 2013
Latest reply on Nov 22, 2013 by shiva.s43

Hi,
Timeslice job is not picking many records and I’m seeing errors like below in bg-niku.log. I tried with restarting the services and no help in processing those records. Any suggestion how to resolve this.
We are on Clarity V12.06 and SQL Server 2005.

ERROR 2013-11-21 01:17:37,334 [Dispatch Thread-491 : bg@EAVCLARITY01] niku.blobcrack (none:none:none) Exception during blobcrack process
com.niku.union.persistence.PersistenceException:
SQL error code: 2601
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'dbo.PRJ_BLB_SLICES_M_ALC' with unique index 'PRJ_BLB_SLICES_M_ALC_U1'.
SQL error code: 2601
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'dbo.PRJ_BLB_SLICES_M_ALC' with unique index 'PRJ_BLB_SLICES_M_ALC_U1'.
SQL error code: 3621
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]The statement has been terminated.
SQL error code: 2601
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'dbo.PRJ_BLB_SLICES_M_ALC' with unique index 'PRJ_BLB_SLICES_M_ALC_U1'.
SQL error code: 3621
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]The statement has been terminated.
SQL error code: 2601
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'dbo.PRJ_BLB_SLICES_M_ALC' with unique index 'PRJ_BLB_SLICES_M_ALC_U1'.
SQL error code: 3621
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]The statement has been terminated.
SQL error code: 2601
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'dbo.PRJ_BLB_SLICES_M_ALC' with unique index 'PRJ_BLB_SLICES_M_ALC_U1'.
SQL error code: 3621
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]The statement has been terminated.
SQL error code: 2601
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'dbo.PRJ_BLB_SLICES_M_ALC' with unique index 'PRJ_BLB_SLICES_M_ALC_U1'.
SQL error code: 3621
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]The statement has been terminated.
SQL error code: 2601
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'dbo.PRJ_BLB_SLICES_M_ALC' with unique index 'PRJ_BLB_SLICES_M_ALC_U1'.
SQL error code: 3621
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]The statement has been terminated.
SQL error code: 2601
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'dbo.PRJ_BLB_SLICES_M_ALC' with unique index 'PRJ_BLB_SLICES_M_ALC_U1'.
SQL error code: 3621
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]The statement has been terminated.
SQL error code: 2601
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'dbo.PRJ_BLB_SLICES_M_ALC' with unique index 'PRJ_BLB_SLICES_M_ALC_U1'.
SQL error code: 3621
Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]The statement has been terminated.
Executed:
INSERT INTO PRJ_BLB_SLICES_M_ALC
             ( SLICE_REQUEST_ID, PRJ_OBJECT_ID, SLICE_DATE, SLICE, CREATED_DATE  , INVESTMENT_ID , RESOURCE_ID , ROLE_ID )
             VALUES (?, ?, ?, ?, ?  ,? ,? ,? )
Derived from statement:
<?xml version="1.0" encoding="UTF-8"?>
<statement batchable="true" sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" inputSource="map" xmlns="http://schemas.niku.com/2002/pmd">
  <sql dbVendor="all">
    <text>
             INSERT INTO @table_name@
             ( SLICE_REQUEST_ID, PRJ_OBJECT_ID, SLICE_DATE, SLICE, CREATED_DATE
        </text>
    <param name="investment_id" type="int" direction="IN" expressionListDelimiter=",">
      <variation includeIfPresent="true" text=", INVESTMENT_ID"/>
    </param>
    <param name="resource_id" type="int" direction="IN" expressionListDelimiter=",">
      <variation includeIfPresent="true" text=", RESOURCE_ID"/>
    </param>
    <param name="role_id" type="int" direction="IN" expressionListDelimiter=",">
      <variation includeIfPresent="true" text=", ROLE_ID"/>
    </param>
    <param name="scenario_id" type="int" direction="IN" expressionListDelimiter=",">
     <variation includeIfPresent="true" text=", SCENARIO_ID"/>
    </param>
    <param name="table_name" direction="IN" dynamicReplacement="@table_name@" expressionListDelimiter=","/>
  </sql>
  <sql dbVendor="all">
    <text>
              )
             VALUES (?, ?, ?, ?, ?
        </text>
    <param name="requestID" type="int" direction="IN" expressionListDelimiter=","/>
    <param name="objectID" type="int" direction="IN" expressionListDelimiter=","/>
    <param name="sliceDate" type="date" direction="IN" expressionListDelimiter=","/>
    <param name="slice" type="double" direction="IN" expressionListDelimiter=","/>
    <param replace="timestamp" direction="IN" expressionListDelimiter=","/>
    <param name="investment_id" type="int" direction="IN" expressionListDelimiter=",">
      <variation includeIfPresent="true" text=",?"/>
    </param>
    <param name="resource_id" type="int" direction="IN" expressionListDelimiter=",">
      <variation includeIfPresent="true" text=",?"/>
    </param>
    <param name="role_id" type="int" direction="IN" expressionListDelimiter=",">
      <variation includeIfPresent="true" text=",?"/>
    </param>
    <param name="scenario_id" type="int" direction="IN" expressionListDelimiter=",">
      <variation includeIfPresent="true" text=",?"/>
    </param>
  </sql>
  <sql dbVendor="all">
    <text>)</text>
  </sql>
</statement>
 
Referenced by:
<?xml version="1.0" encoding="UTF-8"?>
<statementRef id="blobcrack.insertInstaSlice_set_nested_0" inputSource="map" inputMapIndex="0" sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" defaultSliceSize="20" ignoreIfError="false" hideResultSets="false" xmlns="http://schemas.niku.com/2002/pmd"/>
 
Using input:
{sliceDate=2012-09-01T00:00:00, role_id=5321851, startDate=2012-09-01T00:00:00, objectID=5024491, resource_id=5024142, finishDate=2012-10-01T00:00:00, requestID=111, slice=75.0, investment_id=5238577}
{sliceDate=2012-10-01T00:00:00, role_id=5321851, startDate=2012-10-01T00:00:00, objectID=5024491, resource_id=5024142, finishDate=2012-11-01T00:00:00, requestID=111, slice=75.0, investment_id=5238577}
{sliceDate=2012-11-01T00:00:00, role_id=5321851, startDate=2012-11-01T00:00:00, objectID=5024491, resource_id=5024142, finishDate=2012-12-01T00:00:00, requestID=111, slice=75.0, investment_id=5238577}
{sliceDate=2012-12-01T00:00:00, role_id=5321851, startDate=2012-12-01T00:00:00, objectID=5024491, resource_id=5024142, finishDate=2013-01-01T00:00:00, requestID=111, slice=75.0, investment_id=5238577}
{sliceDate=2013-01-01T00:00:00, role_id=5321851, startDate=2013-01-01T00:00:00, objectID=5024491, resource_id=5024142, finishDate=2013-02-01T00:00:00, requestID=111, slice=0.0, investment_id=5238577}
{sliceDate=2013-02-01T00:00:00, role_id=5321851, startDate=2013-02-01T00:00:00, objectID=5024491, resource_id=5024142, finishDate=2013-03-01T00:00:00, requestID=111, slice=0.0, investment_id=5238577}
{sliceDate=2013-03-01T00:00:00, role_id=5321851, startDate=2013-03-01T00:00:00, objectID=5024491, resource_id=5024142, finishDate=2013-04-01T00:00:00, requestID=111, slice=0.0, investment_id=5238577}
{sliceDate=2013-04-01T00:00:00, role_id=5321851, startDate=2013-04-01T00:00:00, objectID=5024491, resource_id=5024142, finishDate=2013-05-01T00:00:00, requestID=111, slice=0.0, investment_id=5238577}
{sliceDate=2013-05-01T00:00:00, role_id=5321851, startDate=2013-05-01T00:00:00, objectID=5024491, resource_id=5024142, finishDate=2013-06-01T00:00:00, requestID=111, slice=0.0, investment_id=5238577}
 
                at com.niku.union.persistence.PersistenceController.createException(PersistenceController.java:1800)
                at com.niku.union.persistence.PersistenceController.handleSQLException(PersistenceController.java:1858)
                at com.niku.union.persistence.PersistenceController.processSql(PersistenceController.java:2334)
                at com.niku.union.persistence.PersistenceController.processStatement(PersistenceController.java:701)
                at com.niku.union.persistence.PersistenceController.processStatements(PersistenceController.java:610)
                at com.niku.union.persistence.PersistenceController.doProcessRequest(PersistenceController.java:450)
                at com.niku.union.persistence.PersistenceController.processRequest(PersistenceController.java:221)
                at com.niku.blobcrack.SliceInserter.finish(SliceInserter.java:150)
                at com.niku.blobcrack.BlobCrackDB.commit(BlobCrackDB.java:872)
                at com.niku.blobcrack.BlobCrackDB.updateTimes(BlobCrackDB.java:365)
                at com.niku.blobcrack.BlobCrackDB.createSlices(BlobCrackDB.java:243)
                at com.niku.blobcrack.xql2.handlers.BlobCracker.processCurrentRequests(BlobCracker.java:168)
                at com.niku.blobcrack.xql2.handlers.BlobCracker.postProcess(BlobCracker.java:59)
                at com.niku.xql2.XQLVisitor.postProcess(XQLVisitor.java:1355)
                at com.niku.union.xml.dom.DOMWalker.postProcess(DOMWalker.java:210)
                at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:94)
                at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)
                at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)
                at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:36)
                at com.niku.xql2.XQLProcessor.process(XQLProcessor.java:239)
                at com.niku.njs.xbl.XBLService.process(XBLService.java:127)
                at com.niku.njs.xbl.XBLService.process(XBLService.java:75)
                at com.niku.njs.listeners.XBLJob.scheduledEventFired(XBLJob.java:44)
                at com.niku.njs.Dispatcher$BGTask.run(Dispatcher.java:277)
                at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
                at java.lang.Thread.run(Thread.java:595)
Caused by: com.ca.clarity.jdbc.base.BaseBatchUpdateException: [CA Clarity][SQLServer JDBC Driver][SQLServer]Cannot insert duplicate key row in object 'dbo.PRJ_BLB_SLICES_M_ALC' with unique index 'PRJ_BLB_SLICES_M_ALC_U1'.
                at com.ca.clarity.jdbc.sqlserver.SQLServerImplStatement.getBatchRowsAffectedCount(Unknown Source)
                at com.ca.clarity.jdbc.base.BasePreparedStatement.executeBatch(Unknown Source)
                at com.niku.union.persistence.PersistenceController.processSql(PersistenceController.java:2329)
                ... 23 more

Thanks,
Shiva

Outcomes