title: Unable to deploy category from BCC ATG Oracle Web Commerce
body: <p>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 ? </p>
  
  <pre><code>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
  </code></pre>