0

I'm trying to deploy an existing category and I'm getting the below error. I understand the problem, but I can't understand what could be causing this error. Any pointers ?

11:36:40,646 ERROR [ProductCatalog_production] SQL Statement Failed: [++SQLInsert++]
    INSERT INTO dcs_cat_chldcat(child_cat_id,category_id)
    VALUES(?,?)
    -- Parameters --
    p[1] = {pd} 1215046631963 (java.lang.String)
    p[2] = {pd: fixedParentCategories} 1215045135527 (atg.adapter.gsa.SingleValueGSAId)
    [--SQLInsert--]

11:36:40,663 ERROR [DeploymentManager]  item = repositoryMarker:mark17800005 cause = CONTAINER:atg.deployment.DistributedDeploymentException; SOURCE:CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("ATGCATALOGA"."DCS_CAT_CHLDCAT"."SEQUENCE_NUM")
    at atg.deployment.repository.RepositoryWorkerThread.processMarkerForReferenceUpdatePhase(RepositoryWorkerThread.java:374)
    at atg.deployment.DeploymentWorkerThread.processMarkerPhase(DeploymentWorkerThread.java:568)
    at atg.deployment.DeploymentWorkerThread.run(DeploymentWorkerThread.java:335) 
        message = Deployment Failed time = Thu Sep 25 11:36:40 IST 2014  atg.deployment.DeploymentFailure@21f7e76a
        CAUGHT AT:
            CONTAINER:atg.deployment.DistributedDeploymentException; SOURCE:CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("ATGCATALOGA"."DCS_CAT_CHLDCAT"."SEQUENCE_NUM")
    at atg.deployment.repository.RepositoryWorkerThread.processMarkerForReferenceUpdatePhase(RepositoryWorkerThread.java:374)
    at atg.deployment.DeploymentWorkerThread.processMarkerPhase(DeploymentWorkerThread.java:568)
    at atg.deployment.DeploymentWorkerThread.run(DeploymentWorkerThread.java:335)
    Caused by: CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("ATGCATALOGA"."DCS_CAT_CHLDCAT"."SEQUENCE_NUM")
    at atg.adapter.gsa.GSAItemDescriptor.updateItem(GSAItemDescriptor.java:7644)
    at atg.adapter.gsa.GSARepository.updateItem(GSARepository.java:1075)
    at atg.deployment.repository.RepositoryWorkerThread.deployItem(RepositoryWorkerThread.java:1135)
    at atg.deployment.repository.RepositoryWorkerThread.processMarkerForReferenceUpdatePhase(RepositoryWorkerThread.java:362)
    ... 2 more
    Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("ATGCATALOGA"."DCS_CAT_CHLDCAT"."SEQUENCE_NUM")

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)
    at atg.adapter.gsa.SQLStatement.executeUpdate(SQLStatement.java:857)
    at atg.adapter.gsa.SetTable.insertRows(SetTable.java:463)
    at atg.adapter.gsa.SetTable.update(SetTable.java:531)
    at atg.adapter.gsa.GSAItemDescriptor.updateItem(GSAItemDescriptor.java:7633)
    ... 5 more
radimpe
  • 3,197
  • 2
  • 27
  • 46
Aazim
  • 750
  • 2
  • 11
  • 24

2 Answers2

0

You cannot re-insert the same category, but you can update it. Are you deploying through publishing? I mean through project publishing from BCC?

harshavmb
  • 3,404
  • 3
  • 21
  • 55
0

As the SQL Insert statement doesn't contain the sequence number, it would appear that the definition of the Versioned catalog repository and the Production catalog repository don't match. i.e. The versioned catalog repository doesn't have the multi-column-name defined, but the Production definition does.

Both definitions should look something like this.

<table xml:id="catChildCats" name="dcs_cat_chldcat" type="multi" id-column-name="category_id"
       multi-column-name="sequence_num" shared-table-sequence="1">
  <property category-resource="categoryCategorization" name="fixedChildCategories" data-type="list"
            component-item-type="category"
            column-name="child_cat_id" queryable="true" display-name-resource="fixedChildCategories">
    <attribute name="propertySortPriority" value="-9"/>
    <attribute name="references" value="true"/>
    <attribute name="prohibitDuplicates" value="true"/>
  </property>
</table>
MrPsion
  • 64
  • 3