Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: Upcoming Release
    • Component/s: lucene
    • Labels:
      None

      Description

      While working on OFBIZ-9391 the tests fail with the following errors:

      2017-06-29 18:58:29,700 |main                 |EntitySaxReader               |I| Beginning import from URL: file:/Users/mbrohl/Projects/apache-ofbiz/trunk/ofbiz/plugins/lucene/testdef/data/LuceneTestsData.xml
      2017-06-29 18:58:29,701 |main                 |EntitySaxReader               |I| Transaction Timeout set to 2 hours (7200 seconds)
      2017-06-29 18:58:29,739 |main                 |GenericDelegator              |E| Failure in create operation for entity [Content]: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:Content][contentId,CNTGIZMOSLRG(java.lang.String)][contentName,Large Gizmos(java.lang.String)][contentTypeId,WEB_SITE_PUB_PT(java.lang.String)][createdByUserLogin,admin(java.lang.String)][createdDate,2001-05-13 12:00:00.0(java.sql.Timestamp)][createdStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][createdTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][dataResourceId,CNTGIZMOSLRG(java.lang.String)][description,Large Widgets(java.lang.String)][lastUpdatedStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][lastUpdatedTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][localeString,en_US(java.lang.String)][mimeTypeId,text/html(java.lang.String)][ownerContentId,CNTGIZMOS(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.CONTENT (CONTENT_ID, CONTENT_TYPE_ID, OWNER_CONTENT_ID, DECORATOR_CONTENT_ID, INSTANCE_OF_CONTENT_ID, DATA_RESOURCE_ID, TEMPLATE_DATA_RESOURCE_ID, DATA_SOURCE_ID, STATUS_ID, PRIVILEGE_ENUM_ID, SERVICE_NAME, CUSTOM_METHOD_ID, CONTENT_NAME, DESCRIPTION, LOCALE_STRING, MIME_TYPE_ID, CHARACTER_SET_ID, CHILD_LEAF_COUNT, CHILD_BRANCH_COUNT, CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'CONTENT' caused a violation of foreign key constraint 'CONTENT_PCNTNT' for key (CNTGIZMOS).  The statement has been rolled back.)). Rolling back transaction.
      2017-06-29 18:58:29,739 |main                 |TransactionUtil               |W| Calling transaction setRollbackOnly; this stack trace shows where this is happening:
      java.lang.Exception: Failure in create operation for entity [Content]: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:Content][contentId,CNTGIZMOSLRG(java.lang.String)][contentName,Large Gizmos(java.lang.String)][contentTypeId,WEB_SITE_PUB_PT(java.lang.String)][createdByUserLogin,admin(java.lang.String)][createdDate,2001-05-13 12:00:00.0(java.sql.Timestamp)][createdStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][createdTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][dataResourceId,CNTGIZMOSLRG(java.lang.String)][description,Large Widgets(java.lang.String)][lastUpdatedStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][lastUpdatedTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][localeString,en_US(java.lang.String)][mimeTypeId,text/html(java.lang.String)][ownerContentId,CNTGIZMOS(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.CONTENT (CONTENT_ID, CONTENT_TYPE_ID, OWNER_CONTENT_ID, DECORATOR_CONTENT_ID, INSTANCE_OF_CONTENT_ID, DATA_RESOURCE_ID, TEMPLATE_DATA_RESOURCE_ID, DATA_SOURCE_ID, STATUS_ID, PRIVILEGE_ENUM_ID, SERVICE_NAME, CUSTOM_METHOD_ID, CONTENT_NAME, DESCRIPTION, LOCALE_STRING, MIME_TYPE_ID, CHARACTER_SET_ID, CHILD_LEAF_COUNT, CHILD_BRANCH_COUNT, CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'CONTENT' caused a violation of foreign key constraint 'CONTENT_PCNTNT' for key (CNTGIZMOS).  The statement has been rolled back.)). Rolling back transaction.
      	at org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:361) [ofbiz.jar:?]
      	at org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:302) [ofbiz.jar:?]
      	at org.apache.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:905) [ofbiz.jar:?]
      	at org.apache.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1316) [ofbiz.jar:?]
      	at org.apache.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.java:258) [ofbiz.jar:?]
      	at org.apache.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:228) [ofbiz.jar:?]
      	at org.apache.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:199) [ofbiz.jar:?]
      	at org.apache.ofbiz.testtools.EntityXmlAssertTest.countTestCases(EntityXmlAssertTest.java:61) [ofbiz.jar:?]
      	at junit.framework.TestResult.startTest(TestResult.java:150) [junit-dep-4.10.jar:?]
      	at org.apache.ofbiz.testtools.EntityXmlAssertTest.run(EntityXmlAssertTest.java:70) [ofbiz.jar:?]
      	at junit.framework.TestSuite.runTest(TestSuite.java:243) [junit-dep-4.10.jar:?]
      	at junit.framework.TestSuite.run(TestSuite.java:238) [junit-dep-4.10.jar:?]
      	at org.apache.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:152) [ofbiz.jar:?]
      	at org.apache.ofbiz.base.container.ContainerLoader.startLoadedContainers(ContainerLoader.java:148) [ofbiz.jar:?]
      	at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:73) [ofbiz.jar:?]
      	at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupControlPanel.java:222) [ofbiz.jar:?]
      	at org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:72) [ofbiz.jar:?]
      	at org.apache.ofbiz.base.start.Start.main(Start.java:84) [ofbiz.jar:?]
      2017-06-29 18:58:29,740 |main                 |GenericDelegator              |E| Failure in storeAll operation: org.apache.ofbiz.entity.GenericEntityException: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:Content][contentId,CNTGIZMOSLRG(java.lang.String)][contentName,Large Gizmos(java.lang.String)][contentTypeId,WEB_SITE_PUB_PT(java.lang.String)][createdByUserLogin,admin(java.lang.String)][createdDate,2001-05-13 12:00:00.0(java.sql.Timestamp)][createdStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][createdTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][dataResourceId,CNTGIZMOSLRG(java.lang.String)][description,Large Widgets(java.lang.String)][lastUpdatedStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][lastUpdatedTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][localeString,en_US(java.lang.String)][mimeTypeId,text/html(java.lang.String)][ownerContentId,CNTGIZMOS(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.CONTENT (CONTENT_ID, CONTENT_TYPE_ID, OWNER_CONTENT_ID, DECORATOR_CONTENT_ID, INSTANCE_OF_CONTENT_ID, DATA_RESOURCE_ID, TEMPLATE_DATA_RESOURCE_ID, DATA_SOURCE_ID, STATUS_ID, PRIVILEGE_ENUM_ID, SERVICE_NAME, CUSTOM_METHOD_ID, CONTENT_NAME, DESCRIPTION, LOCALE_STRING, MIME_TYPE_ID, CHARACTER_SET_ID, CHILD_LEAF_COUNT, CHILD_BRANCH_COUNT, CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'CONTENT' caused a violation of foreign key constraint 'CONTENT_PCNTNT' for key (CNTGIZMOS).  The statement has been rolled back.)) (Error while inserting: [GenericEntity:Content][contentId,CNTGIZMOSLRG(java.lang.String)][contentName,Large Gizmos(java.lang.String)][contentTypeId,WEB_SITE_PUB_PT(java.lang.String)][createdByUserLogin,admin(java.lang.String)][createdDate,2001-05-13 12:00:00.0(java.sql.Timestamp)][createdStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][createdTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][dataResourceId,CNTGIZMOSLRG(java.lang.String)][description,Large Widgets(java.lang.String)][lastUpdatedStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][lastUpdatedTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][localeString,en_US(java.lang.String)][mimeTypeId,text/html(java.lang.String)][ownerContentId,CNTGIZMOS(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.CONTENT (CONTENT_ID, CONTENT_TYPE_ID, OWNER_CONTENT_ID, DECORATOR_CONTENT_ID, INSTANCE_OF_CONTENT_ID, DATA_RESOURCE_ID, TEMPLATE_DATA_RESOURCE_ID, DATA_SOURCE_ID, STATUS_ID, PRIVILEGE_ENUM_ID, SERVICE_NAME, CUSTOM_METHOD_ID, CONTENT_NAME, DESCRIPTION, LOCALE_STRING, MIME_TYPE_ID, CHARACTER_SET_ID, CHILD_LEAF_COUNT, CHILD_BRANCH_COUNT, CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'CONTENT' caused a violation of foreign key constraint 'CONTENT_PCNTNT' for key (CNTGIZMOS).  The statement has been rolled back.))). Rolling back transaction.
      org.apache.ofbiz.entity.GenericEntityException: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:Content][contentId,CNTGIZMOSLRG(java.lang.String)][contentName,Large Gizmos(java.lang.String)][contentTypeId,WEB_SITE_PUB_PT(java.lang.String)][createdByUserLogin,admin(java.lang.String)][createdDate,2001-05-13 12:00:00.0(java.sql.Timestamp)][createdStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][createdTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][dataResourceId,CNTGIZMOSLRG(java.lang.String)][description,Large Widgets(java.lang.String)][lastUpdatedStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][lastUpdatedTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][localeString,en_US(java.lang.String)][mimeTypeId,text/html(java.lang.String)][ownerContentId,CNTGIZMOS(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.CONTENT (CONTENT_ID, CONTENT_TYPE_ID, OWNER_CONTENT_ID, DECORATOR_CONTENT_ID, INSTANCE_OF_CONTENT_ID, DATA_RESOURCE_ID, TEMPLATE_DATA_RESOURCE_ID, DATA_SOURCE_ID, STATUS_ID, PRIVILEGE_ENUM_ID, SERVICE_NAME, CUSTOM_METHOD_ID, CONTENT_NAME, DESCRIPTION, LOCALE_STRING, MIME_TYPE_ID, CHARACTER_SET_ID, CHILD_LEAF_COUNT, CHILD_BRANCH_COUNT, CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'CONTENT' caused a violation of foreign key constraint 'CONTENT_PCNTNT' for key (CNTGIZMOS).  The statement has been rolled back.)) (Error while inserting: [GenericEntity:Content][contentId,CNTGIZMOSLRG(java.lang.String)][contentName,Large Gizmos(java.lang.String)][contentTypeId,WEB_SITE_PUB_PT(java.lang.String)][createdByUserLogin,admin(java.lang.String)][createdDate,2001-05-13 12:00:00.0(java.sql.Timestamp)][createdStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][createdTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][dataResourceId,CNTGIZMOSLRG(java.lang.String)][description,Large Widgets(java.lang.String)][lastUpdatedStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][lastUpdatedTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][localeString,en_US(java.lang.String)][mimeTypeId,text/html(java.lang.String)][ownerContentId,CNTGIZMOS(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.CONTENT (CONTENT_ID, CONTENT_TYPE_ID, OWNER_CONTENT_ID, DECORATOR_CONTENT_ID, INSTANCE_OF_CONTENT_ID, DATA_RESOURCE_ID, TEMPLATE_DATA_RESOURCE_ID, DATA_SOURCE_ID, STATUS_ID, PRIVILEGE_ENUM_ID, SERVICE_NAME, CUSTOM_METHOD_ID, CONTENT_NAME, DESCRIPTION, LOCALE_STRING, MIME_TYPE_ID, CHARACTER_SET_ID, CHILD_LEAF_COUNT, CHILD_BRANCH_COUNT, CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'CONTENT' caused a violation of foreign key constraint 'CONTENT_PCNTNT' for key (CNTGIZMOS).  The statement has been rolled back.)))
      	at org.apache.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:906) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1316) [ofbiz.jar:?]
      	at org.apache.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.java:258) [ofbiz.jar:?]
      	at org.apache.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:228) [ofbiz.jar:?]
      	at org.apache.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:199) [ofbiz.jar:?]
      	at org.apache.ofbiz.testtools.EntityXmlAssertTest.countTestCases(EntityXmlAssertTest.java:61) [ofbiz.jar:?]
      	at junit.framework.TestResult.startTest(TestResult.java:150) [junit-dep-4.10.jar:?]
      	at org.apache.ofbiz.testtools.EntityXmlAssertTest.run(EntityXmlAssertTest.java:70) [ofbiz.jar:?]
      	at junit.framework.TestSuite.runTest(TestSuite.java:243) [junit-dep-4.10.jar:?]
      	at junit.framework.TestSuite.run(TestSuite.java:238) [junit-dep-4.10.jar:?]
      	at org.apache.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:152) [ofbiz.jar:?]
      	at org.apache.ofbiz.base.container.ContainerLoader.startLoadedContainers(ContainerLoader.java:148) [ofbiz.jar:?]
      	at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:73) [ofbiz.jar:?]
      	at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupControlPanel.java:222) [ofbiz.jar:?]
      	at org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:72) [ofbiz.jar:?]
      	at org.apache.ofbiz.base.start.Start.main(Start.java:84) [ofbiz.jar:?]
      Caused by: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:Content][contentId,CNTGIZMOSLRG(java.lang.String)][contentName,Large Gizmos(java.lang.String)][contentTypeId,WEB_SITE_PUB_PT(java.lang.String)][createdByUserLogin,admin(java.lang.String)][createdDate,2001-05-13 12:00:00.0(java.sql.Timestamp)][createdStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][createdTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][dataResourceId,CNTGIZMOSLRG(java.lang.String)][description,Large Widgets(java.lang.String)][lastUpdatedStamp,2017-06-29 18:58:29.729(java.sql.Timestamp)][lastUpdatedTxStamp,2017-06-29 18:58:29.701(java.sql.Timestamp)][localeString,en_US(java.lang.String)][mimeTypeId,text/html(java.lang.String)][ownerContentId,CNTGIZMOS(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.CONTENT (CONTENT_ID, CONTENT_TYPE_ID, OWNER_CONTENT_ID, DECORATOR_CONTENT_ID, INSTANCE_OF_CONTENT_ID, DATA_RESOURCE_ID, TEMPLATE_DATA_RESOURCE_ID, DATA_SOURCE_ID, STATUS_ID, PRIVILEGE_ENUM_ID, SERVICE_NAME, CUSTOM_METHOD_ID, CONTENT_NAME, DESCRIPTION, LOCALE_STRING, MIME_TYPE_ID, CHARACTER_SET_ID, CHILD_LEAF_COUNT, CHILD_BRANCH_COUNT, CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'CONTENT' caused a violation of foreign key constraint 'CONTENT_PCNTNT' for key (CNTGIZMOS).  The statement has been rolled back.))
      	at org.apache.ofbiz.entity.datasource.GenericDAO.singleInsert(GenericDAO.java:178) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericDAO.insert(GenericDAO.java:115) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java:65) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:883) ~[ofbiz.jar:?]
      	... 15 more
      Caused by: org.apache.ofbiz.entity.GenericDataSourceException: SQL Exception while executing the following:INSERT INTO OFBIZ.CONTENT (CONTENT_ID, CONTENT_TYPE_ID, OWNER_CONTENT_ID, DECORATOR_CONTENT_ID, INSTANCE_OF_CONTENT_ID, DATA_RESOURCE_ID, TEMPLATE_DATA_RESOURCE_ID, DATA_SOURCE_ID, STATUS_ID, PRIVILEGE_ENUM_ID, SERVICE_NAME, CUSTOM_METHOD_ID, CONTENT_NAME, DESCRIPTION, LOCALE_STRING, MIME_TYPE_ID, CHARACTER_SET_ID, CHILD_LEAF_COUNT, CHILD_BRANCH_COUNT, CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'CONTENT' caused a violation of foreign key constraint 'CONTENT_PCNTNT' for key (CNTGIZMOS).  The statement has been rolled back.)
      	at org.apache.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:434) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericDAO.singleInsert(GenericDAO.java:173) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericDAO.insert(GenericDAO.java:115) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java:65) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:883) ~[ofbiz.jar:?]
      	... 15 more
      Caused by: java.sql.SQLIntegrityConstraintViolationException: INSERT on table 'CONTENT' caused a violation of foreign key constraint 'CONTENT_PCNTNT' for key (CNTGIZMOS).  The statement has been rolled back.
      	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) ~[commons-dbcp2-2.1.jar:2.1]
      	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) ~[commons-dbcp2-2.1.jar:2.1]
      	at org.apache.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:430) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericDAO.singleInsert(GenericDAO.java:173) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericDAO.insert(GenericDAO.java:115) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java:65) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:883) ~[ofbiz.jar:?]
      	... 15 more
      Caused by: org.apache.derby.iapi.error.StandardException: INSERT on table 'CONTENT' caused a violation of foreign key constraint 'CONTENT_PCNTNT' for key (CNTGIZMOS).  The statement has been rolled back.
      	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.sql.execute.ForeignKeyRIChecker.doCheck(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.sql.execute.RISetChecker.doFKCheck(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source) ~[derby-10.11.1.1.jar:?]
      	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) ~[commons-dbcp2-2.1.jar:2.1]
      	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) ~[commons-dbcp2-2.1.jar:2.1]
      	at org.apache.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:430) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericDAO.singleInsert(GenericDAO.java:173) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericDAO.insert(GenericDAO.java:115) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java:65) ~[ofbiz.jar:?]
      	at org.apache.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:883) ~[ofbiz.jar:?]
      	... 15 more
      2017-06-29 18:58:29,741 |main                 |TransactionUtil               |I| Transaction rollback only not set, rollback only is already set.
      

        Activity

        Hide
        mbrohl Michael Brohl added a comment -

        This is now fixed in r1800376. Lucene tests are passing now.

        Show
        mbrohl Michael Brohl added a comment - This is now fixed in r1800376. Lucene tests are passing now.
        Hide
        mbrohl Michael Brohl added a comment -

        The data is missing some content associations and the test code is not reflecting the new data, will fix this.

        Show
        mbrohl Michael Brohl added a comment - The data is missing some content associations and the test code is not reflecting the new data, will fix this.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        There might be cases where one plugin relies on another, but this should be well thought and not happen by accident.

        1. Agreed

          Regarding data: plugins should only add and reference data to the existing set in the base application, not to other plugins.

        2. Agreed, but I fear issues if 2 plugins have initially the same data and they later differ in time (one replaces the other)

          We should then have an automatic mechanism to pull dependencies on other plugins.

        3. Yes would be the right solution, we NEED something like that because of the point 2

        I'll soon answer you on the main issue (OFBIZ-9440)

        Show
        jacques.le.roux Jacques Le Roux added a comment - There might be cases where one plugin relies on another, but this should be well thought and not happen by accident. Agreed Regarding data: plugins should only add and reference data to the existing set in the base application, not to other plugins. Agreed, but I fear issues if 2 plugins have initially the same data and they later differ in time (one replaces the other) We should then have an automatic mechanism to pull dependencies on other plugins. Yes would be the right solution, we NEED something like that because of the point 2 I'll soon answer you on the main issue ( OFBIZ-9440 )
        Hide
        mbrohl Michael Brohl added a comment -

        Hi Jacques,

        I think this would only cover the real problems. Plugins should be self-contained and only rely on the base application. There should be no cross-reference between other (non-related) plugins. There might be cases where one plugin relies on another, but this should be well thought and not happen by accident.

        Regarding data: plugins should only add and reference data to the existing set in the base application, not to other plugins.

        We should then have an automatic mechanism to pull dependencies on other plugins.

        I was stumbling across several other issues in the Lucene and Solr components last night, the code quality should be improved and will work on this further.

        So -1 for the easy way out and +1 for sorting out the mess and making the plugins real plugins.

        Show
        mbrohl Michael Brohl added a comment - Hi Jacques, I think this would only cover the real problems. Plugins should be self-contained and only rely on the base application. There should be no cross-reference between other (non-related) plugins. There might be cases where one plugin relies on another, but this should be well thought and not happen by accident. Regarding data: plugins should only add and reference data to the existing set in the base application, not to other plugins. We should then have an automatic mechanism to pull dependencies on other plugins. I was stumbling across several other issues in the Lucene and Solr components last night, the code quality should be improved and will work on this further. So -1 for the easy way out and +1 for sorting out the mess and making the plugins real plugins.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        I Michael,

        I think we will cross this type of issue again and again, I mean not only with the lucene component (which was initially part of the content application cf. r1518925).

        So I wonder if we should not create a commonplugins component where we would put all cases which end with duplicated data, model, etc. This component would be always pulled if at least one of the OOTB plugins would be pulled and automatically loaded before other plugins, like datamodel in application, here also for common data. Is that worth a discussion?

        Show
        jacques.le.roux Jacques Le Roux added a comment - I Michael, I think we will cross this type of issue again and again, I mean not only with the lucene component (which was initially part of the content application cf. r1518925). So I wonder if we should not create a commonplugins component where we would put all cases which end with duplicated data, model, etc. This component would be always pulled if at least one of the OOTB plugins would be pulled and automatically loaded before other plugins, like datamodel in application, here also for common data. Is that worth a discussion?
        Hide
        mbrohl Michael Brohl added a comment -

        This is fixed in trunk r1800322.

        The fix prevents the data load failure but there are other issues running the tests. I'm investigating further.

        Show
        mbrohl Michael Brohl added a comment - This is fixed in trunk r1800322. The fix prevents the data load failure but there are other issues running the tests. I'm investigating further.
        Hide
        mbrohl Michael Brohl added a comment -

        The Lucene test data references to the ownerContentId "CNTGIZMOS" which is not defined in the lucene demo data.

            <Content contentId="CNTGIZMOSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTGIZMOS" contentName="Large Gizmos" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"
                dataResourceId="CNTGIZMOSLRG" mimeTypeId="text/html" localeString="en_US"/>
        

        It's instead defined in the ecommerce demo data in the file DemoWebsitePublishPointData.xml. sigh

        I'll try to define an independent data set for lucene.

        Show
        mbrohl Michael Brohl added a comment - The Lucene test data references to the ownerContentId "CNTGIZMOS" which is not defined in the lucene demo data. <Content contentId= "CNTGIZMOSLRG" contentTypeId= "WEB_SITE_PUB_PT" ownerContentId= "CNTGIZMOS" contentName= "Large Gizmos" description= "Large Widgets" createdDate= "2001-05-13 12:00:00.000" createdByUserLogin= "admin" dataResourceId= "CNTGIZMOSLRG" mimeTypeId= "text/html" localeString= "en_US" /> It's instead defined in the ecommerce demo data in the file DemoWebsitePublishPointData.xml. sigh I'll try to define an independent data set for lucene.

          People

          • Assignee:
            mbrohl Michael Brohl
            Reporter:
            mbrohl Michael Brohl
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development