startSQLRepository数据导入错误

时间:2013-06-25 02:13:08

标签: atg

我是ATG的新手。最近我在ATG 10.2开始了产品目录导出/导入项目。我成功地导出了产品目录。然后我更改了我从导出中获取的xml文件并尝试导入它。但在我的导入过程失败,出现以下错误。

info    Sun Jun 23 22:11:55 IST 2013    1372005715997   /atg/commerce/pricing/priceLists/PriceLists SQL Repository startup complete
info    Sun Jun 23 22:11:56 IST 2013    1372005716133   /atg/multisite/SiteRepository   SQL Repository startup complete
info    Sun Jun 23 22:11:56 IST 2013    1372005716250   /atg/commerce/catalog/ProductCatalog    SQL Repository startup complete


Nucleus running

-- creating definition of product:childxprod2099
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog SQL Statement Failed: [++SQLInsert++]
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog INSERT INTO crs_product(product_id,email_frnd_enabled,preorderable,use_inv_for_preord)
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog VALUES(?,?,?,?)
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog -- Parameters --
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog p[1] = {pd} childxprod2099 (java.lang.String)
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog p[2] = {pd: emailAFriendEnabled} true (java.lang.Boolean)
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog p[3] = {pd: preorderable} false (java.lang.Boolean)
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog p[4] = {pd: useInventoryForPreorder} false (java.lang.Boolean)
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog [--SQLInsert--]
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("ATGUSER"."CRS_PRODUCT"."ASSET_VERSION")
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
**** Error Sun Jun 23 22:12:00 IST 2013 1372005720063 /atg/commerce/catalog/ProductCatalog at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
....
*** CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("ATGUSER"."CRS_PRODUCT"."ASSET_VERSION")
 CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("ATGUSER"."CRS_PRODUCT"."ASSET_VERSION")
  at atg.adapter.gsa.GSAItemDescriptor.addItem(GSAItemDescriptor.java:7366)
  at atg.adapter.gsa.GSARepository.addItem(GSARepository.java:1046)
  at atg.adapter.gsa.xml.TemplateParser.addItem(TemplateParser.java:1354)
 .......
  at atg.adapter.gsa.xml.TemplateParser.main(TemplateParser.java:5343)
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("ATGUSER"."CRS_PRODUCT"."ASSET_VERSION")
  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
  ...............
  at atg.adapter.gsa.Table.insert(Table.java:1410)
  at atg.adapter.gsa.GSAItemDescriptor.addItem(GSAItemDescriptor.java:7339)
  ... 10 more
**** info Sun Jun 23 22:12:00 IST 2013 1372005720124 /atg/dynamo/service/Scheduler Scheduler shutting down.
**** info Sun Jun 23 22:12:00 IST 2013 1372005720125 /atg/dynamo/service/Scheduler Scheduler stopped.

及以下是我用来导入数据的文件。

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE gsa-template SYSTEM "dynamosystemresource:/atg/dtds/gsa/gsa_1.0.dtd">
<gsa-template>
  <import-items>
    <add-item item-descriptor="product" id="childxprod2099">
      <set-property name="asset_version"><![CDATA[1]]></set-property>
      <set-property name="workspace_id"><![CDATA[11200]]></set-property>
      <set-property name="branch_id"><![CDATA[1100]]></set-property>
      <set-property name="is_head"><![CDATA[1]]></set-property>
      <set-property name="version_deleted"><![CDATA[0]]></set-property>
      <set-property name="version_editable"><![CDATA[0]]></set-property>
      <set-property name="childSKUs"><![CDATA[xsku2099,sku10001,sku10002]]></set-property>
      <set-property name="description"><![CDATA[Modern luxurious comfort and style]]></set-property>
      <set-property name="thumbnailImage"><![CDATA[m2733]]></set-property>
      <set-property name="brand"><![CDATA[BrophyBuilt]]></set-property>
      <set-property name="features"><![CDATA[leather,microfiber]]></set-property,>
      <set-property name="displayName"><![CDATA[Contemporary Sofa Set]]></set-property>
      <set-property name="fullImage"><![CDATA[m2732]]></set-property>
      <set-property name="mediumImage"><![CDATA[xmContemporaryItalianSet]]></set-property>
      <set-property name="longDescription"><![CDATA[Contemporary and ultra-comfortable, this modern Italian sofa and chair bring European style to your space.]]></set-property>
      <set-property name="smallImage"><![CDATA[m2731]]></set-property>
      <set-property name="fixedRelatedProducts"><![CDATA[xprod2055,xprod2057]]></set-property>
      <set-property name="creationDate"><![CDATA[12/4/2007 13:19:43]]></set-property>
      <set-property name="parentCategoriesForCatalog"><!`enter code here`[CDATA[homeStoreCatalog=homeStoreSeatingSofas]]></set-property>
      <set-property name="largeImage"><![CDATA[m2734]]></set-property>
      <set-property name="template"><![CDATA[m430011]]></set-property>
    </add-item>
  </import-items>
</gsa-template>

我需要紧急解决这个问题。感谢您的评论。

感谢。

1 个答案:

答案 0 :(得分:2)

列“ATGUSER”的数据为NULL。“CRS_PRODUCT”。“ASSET_VERSION”。

如果您可以编辑数据,请执行以下操作:

UPDATE  ATGUSER.CRS_PRODUCT SET ASSET_VERSION = ' ' WHERE ASSET_VERSION IS NULL;

并在导入后执行:

UPDATE  ATGUSER.CRS_PRODUCT SET ASSET_VERSION = ' ' WHERE ASSET_VERSION = ' ';

如果没有,您将需要删除约束并在导入后重新创建:

ALTER TABLE ATGUSER.CRS_PRODUCT MODIFY(ASSET_VERSION NULL);

导入后:

ALTER TABLE ATGUSER.CRS_PRODUCT MODIFY(ASSET_VERSION NOT NULL);