Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9211

Load demo data shows error loading xml files

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Trunk
    • Fix Version/s: Upcoming Release
    • Component/s: base
    • Labels:
      None

      Description

      ran "gradlew loadDefault"
      found the following error...
      2017-02-09 23:30:19,274 |main |EntityDataLoadContainer |I| The following errors occurred in the data load:
      2017-02-09 23:30:19,274 |main |EntityDataLoadContainer |I| [loadData]: Error loading XML Resource "file:/ofbiz-trunk/plugins/ebay/data/DemoEbayData.xml"; Error was: A transaction error occurred reading data
      2017-02-09 23:30:19,274 |main |EntityDataLoadContainer |I| [loadData]: Error loading XML Resource "file:/ofbiz-trunk/plugins/myportal/data/MyPortalDemoData.xml"; Error was: A transaction error occurred reading data

        Issue Links

          Activity

          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          I don't reproduce locally with trunk HEAD

          Show
          jacques.le.roux Jacques Le Roux added a comment - I don't reproduce locally with trunk HEAD
          Hide
          wt Wai added a comment -

          I downloaded the latest source from trunk and I was able to reproduce it with derby and postgresql.
          I used the following...
          $ gradlew cleanAll build eclipse
          $ gradlew loadDefault

          ofbiz has a problem with
          2017-02-10 21:12:25,383 |main |EntityDataLoadContainer |I| [loadData]: Error loading XML Resource "file:/ofbiz/plugins/ebay/data/DemoEbayData.xml"; Error was: A transaction error occurred reading data
          2017-02-10 21:12:25,383 |main |EntityDataLoadContainer |I| [loadData]: Error loading XML Resource "file:/ofbiz/plugins/myportal/data/MyPortalDemoData.xml"; Error was: A transaction error occurred reading data

          Show
          wt Wai added a comment - I downloaded the latest source from trunk and I was able to reproduce it with derby and postgresql. I used the following... $ gradlew cleanAll build eclipse $ gradlew loadDefault ofbiz has a problem with 2017-02-10 21:12:25,383 |main |EntityDataLoadContainer |I| [loadData] : Error loading XML Resource "file:/ofbiz/plugins/ebay/data/DemoEbayData.xml"; Error was: A transaction error occurred reading data 2017-02-10 21:12:25,383 |main |EntityDataLoadContainer |I| [loadData] : Error loading XML Resource "file:/ofbiz/plugins/myportal/data/MyPortalDemoData.xml"; Error was: A transaction error occurred reading data
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Yes just after answering I thought I should have tried cleanAll (lazy because when in Eclipse cleanAll breaks it), thanks for responding. Indeed that's clearly an issue.

          Show
          jacques.le.roux Jacques Le Roux added a comment - Yes just after answering I thought I should have tried cleanAll (lazy because when in Eclipse cleanAll breaks it), thanks for responding. Indeed that's clearly an issue.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          The logs clearly show where the problem is, but not sure why this happens now, actually not sure when it began.

          2017-02-11 09:49:59,838 |main                 |EntitySaxReader               |I| Finished 4 values from file:/C:/projectASF-Mars/ofbiz/plugins/ebay/data/EbaySecurityGroupDemoData.xml
          2017-02-11 09:49:59,838 |main                 |EntitySaxReader               |I| Beginning import from URL: file:/C:/projectASF-Mars/ofbiz/plugins/ebay/data/DemoEbayData.xml
          2017-02-11 09:49:59,845 |main                 |EntitySaxReader               |I| Transaction Timeout set to 2 hours (7200 seconds)
          2017-02-11 09:49:59,918 |main                 |EntityEcaRule                 |I| Running Entity ECA Service: indexProductsFromCategory, triggered by rule on Entity: ProdCatalogCategory
          2017-02-11 09:49:59,927 |main                 |ServiceDispatcher             |T| Sync service [entity-default/indexProductsFromCategory] finished in [9] milliseconds
          2017-02-11 09:49:59,930 |main                 |EntityEcaRule                 |I| Running Entity ECA Service: indexProductsFromCategory, triggered by rule on Entity: ProductCategoryRollup
          2017-02-11 09:49:59,936 |main                 |EntityEcaRule                 |I| Running Entity ECA Service: indexProduct, triggered by rule on Entity: ProductCategoryMember
          2017-02-11 09:49:59,942 |main                 |GenericDelegator              |E| Failure in create operation for entity [ProductCategoryMember]: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:ProductCategoryMember][createdStamp,2017-02-11 09:49:59.936(java.sql.Timestamp)][createdTxStamp,2017-02-11 09:49:59.845(java.sql.Timestamp)][fromDate,2009-11-05 12:15:00.0(java.sql.Timestamp)][lastUpdatedStamp,2017-02-11 09:49:59.936(java.sql.Timestamp)][lastUpdatedTxStamp,2017-02-11 09:49:59.845(java.sql.Timestamp)][productCategoryId,eBay_ECom_Category(java.lang.String)][productId,GZ-1001(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_CATEGORY_MEMBER (PRODUCT_CATEGORY_ID, PRODUCT_ID, FROM_DATE, THRU_DATE, COMMENTS, SEQUENCE_NUM, QUANTITY, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_CATEGORY_MEMBER' caused a violation of foreign key constraint 'PROD_CMBR_PRODUCT' for key (GZ-1001).  The statement has been rolled back.)). Rolling back transaction.
          2017-02-11 09:49:59,942 |main                 |TransactionUtil               |W| Calling transaction setRollbackOnly; this stack trace shows where this is happening:
          java.lang.Exception: Failure in create operation for entity [ProductCategoryMember]: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:ProductCategoryMember][createdStamp,2017-02-11 09:49:59.936(java.sql.Timestamp)][createdTxStamp,2017-02-11 09:49:59.845(java.sql.Timestamp)][fromDate,2009-11-05 12:15:00.0(java.sql.Timestamp)][lastUpdatedStamp,2017-02-11 09:49:59.936(java.sql.Timestamp)][lastUpdatedTxStamp,2017-02-11 09:49:59.845(java.sql.Timestamp)][productCategoryId,eBay_ECom_Category(java.lang.String)][productId,GZ-1001(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_CATEGORY_MEMBER (PRODUCT_CATEGORY_ID, PRODUCT_ID, FROM_DATE, THRU_DATE, COMMENTS, SEQUENCE_NUM, QUANTITY, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_CATEGORY_MEMBER' caused a violation of foreign key constraint 'PROD_CMBR_PRODUCT' for key (GZ-1001).  The statement has been rolled back.)). Rolling back transaction.
          
          Show
          jacques.le.roux Jacques Le Roux added a comment - The logs clearly show where the problem is, but not sure why this happens now, actually not sure when it began. 2017-02-11 09:49:59,838 |main |EntitySaxReader |I| Finished 4 values from file:/C:/projectASF-Mars/ofbiz/plugins/ebay/data/EbaySecurityGroupDemoData.xml 2017-02-11 09:49:59,838 |main |EntitySaxReader |I| Beginning import from URL: file:/C:/projectASF-Mars/ofbiz/plugins/ebay/data/DemoEbayData.xml 2017-02-11 09:49:59,845 |main |EntitySaxReader |I| Transaction Timeout set to 2 hours (7200 seconds) 2017-02-11 09:49:59,918 |main |EntityEcaRule |I| Running Entity ECA Service: indexProductsFromCategory, triggered by rule on Entity: ProdCatalogCategory 2017-02-11 09:49:59,927 |main |ServiceDispatcher |T| Sync service [entity- default /indexProductsFromCategory] finished in [9] milliseconds 2017-02-11 09:49:59,930 |main |EntityEcaRule |I| Running Entity ECA Service: indexProductsFromCategory, triggered by rule on Entity: ProductCategoryRollup 2017-02-11 09:49:59,936 |main |EntityEcaRule |I| Running Entity ECA Service: indexProduct, triggered by rule on Entity: ProductCategoryMember 2017-02-11 09:49:59,942 |main |GenericDelegator |E| Failure in create operation for entity [ProductCategoryMember]: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:ProductCategoryMember][createdStamp,2017-02-11 09:49:59.936(java.sql.Timestamp)][createdTxStamp,2017-02-11 09:49:59.845(java.sql.Timestamp)][fromDate,2009-11-05 12:15:00.0(java.sql.Timestamp)][lastUpdatedStamp,2017-02-11 09:49:59.936(java.sql.Timestamp)][lastUpdatedTxStamp,2017-02-11 09:49:59.845(java.sql.Timestamp)][productCategoryId,eBay_ECom_Category(java.lang. String )][productId,GZ-1001(java.lang. String )] (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_CATEGORY_MEMBER (PRODUCT_CATEGORY_ID, PRODUCT_ID, FROM_DATE, THRU_DATE, COMMENTS, SEQUENCE_NUM, QUANTITY, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_CATEGORY_MEMBER' caused a violation of foreign key constraint 'PROD_CMBR_PRODUCT' for key (GZ-1001). The statement has been rolled back.)). Rolling back transaction. 2017-02-11 09:49:59,942 |main |TransactionUtil |W| Calling transaction setRollbackOnly; this stack trace shows where this is happening: java.lang.Exception: Failure in create operation for entity [ProductCategoryMember]: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:ProductCategoryMember][createdStamp,2017-02-11 09:49:59.936(java.sql.Timestamp)][createdTxStamp,2017-02-11 09:49:59.845(java.sql.Timestamp)][fromDate,2009-11-05 12:15:00.0(java.sql.Timestamp)][lastUpdatedStamp,2017-02-11 09:49:59.936(java.sql.Timestamp)][lastUpdatedTxStamp,2017-02-11 09:49:59.845(java.sql.Timestamp)][productCategoryId,eBay_ECom_Category(java.lang. String )][productId,GZ-1001(java.lang. String )] (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_CATEGORY_MEMBER (PRODUCT_CATEGORY_ID, PRODUCT_ID, FROM_DATE, THRU_DATE, COMMENTS, SEQUENCE_NUM, QUANTITY, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_CATEGORY_MEMBER' caused a violation of foreign key constraint 'PROD_CMBR_PRODUCT' for key (GZ-1001). The statement has been rolled back.)). Rolling back transaction.
          Show
          jacques.le.roux Jacques Le Roux added a comment - This was broken by OFBIZ-9182 , here are the proofs: Still works https://ci.apache.org/builders/ofbiz-trunk/builds/1868 https://ci.apache.org/builders/ofbiz-trunk/builds/1868/steps/shell_1/logs/stdio No longer works https://ci.apache.org/builders/ofbiz-trunk/builds/1869 https://ci.apache.org/builders/ofbiz-trunk/builds/1869/steps/shell_1/logs/stdio Look for "[ProductCategoryMember]" for evidences
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          It's logically due to the removing of plugins/component-load.xml. So a temporary solution is to put it in again. A definitive solution is to remove data dependencies. We have also this problem with ecommerce data which create dependencies from applications

          Show
          jacques.le.roux Jacques Le Roux added a comment - It's logically due to the removing of plugins/component-load.xml. So a temporary solution is to put it in again. A definitive solution is to remove data dependencies. We have also this problem with ecommerce data which create dependencies from applications
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Temporary resolved at revision: 1782577

          I don't close this issue yet because we need to work together on this.
          I simply removed the regression by putting back plugins/component-load.xml

          Show
          jacques.le.roux Jacques Le Roux added a comment - Temporary resolved at revision: 1782577 I don't close this issue yet because we need to work together on this. I simply removed the regression by putting back plugins/component-load.xml
          Show
          jacques.le.roux Jacques Le Roux added a comment - Buildbot confirms: https://ci.apache.org/builders/ofbiz-trunk/builds/1899/steps/shell_1/logs/stdio
          Hide
          mbrohl Michael Brohl added a comment -

          Wouldn't it be better to to leave this error open until the root cause of false dependencies is fixed instead of hiding it with a temporary solution which breaks the plugin system?
          Showing this error will probably encourage people to work on the cause.

          I'd propose to revert this commit.

          Show
          mbrohl Michael Brohl added a comment - Wouldn't it be better to to leave this error open until the root cause of false dependencies is fixed instead of hiding it with a temporary solution which breaks the plugin system? Showing this error will probably encourage people to work on the cause. I'd propose to revert this commit.
          Hide
          pfm.smits Pierre Smits added a comment -

          Moving demo data from plugins to lower leve components may resolve this issue.

          Show
          pfm.smits Pierre Smits added a comment - Moving demo data from plugins to lower leve components may resolve this issue.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Yes, please feel free Michael

          Show
          jacques.le.roux Jacques Le Roux added a comment - Yes, please feel free Michael
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Pierre, that's a definitive solution. In the meantime I agree it's better to see the errors

          Show
          jacques.le.roux Jacques Le Roux added a comment - Pierre, that's a definitive solution. In the meantime I agree it's better to see the errors
          Hide
          mbrohl Michael Brohl added a comment - - edited

          Deepak already removed component-load.xml in r1782656.

          Show
          mbrohl Michael Brohl added a comment - - edited Deepak already removed component-load.xml in r1782656.

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              wt Wai
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development