Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 16.11.01
    • Component/s: None
    • Labels:
      None

      Description

      $ ant load-extseed on a fresh database

      [java] 2015-07-07 16:15:06,249 |main |EntitySaxReader |I| Transaction Timeout set to 2 hours (7200 seconds)
      [java] 2015-07-07 16:15:06,298 |main |EntitySaxReader |I| Finished 3 values from file:/ofbiz-trunk/specialpurpose/passport/data/OAuth2CommonSeedData.xml
      [java] 2015-07-07 16:15:06,298 |main |EntitySaxReader |I| Beginning import from URL: file:/ofbiz-trunk/specialpurpose/passport/data/OAuth2LinkedInSeedData.xml
      [java] 2015-07-07 16:15:06,298 |main |EntitySaxReader |I| Transaction Timeout set to 2 hours (7200 seconds)
      [java] 2015-07-07 16:15:06,309 |main |GenericDelegator |E| Failure in create operation for entity [ThirdPartyLogin]: org.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:ThirdPartyLogin][createdStamp,2015-07-07 16:15:06.306(java.sql.Timestamp)][createdTxStamp,2015-07-07 16:15:06.298(java.sql.Timestamp)][fromDate,2011-01-01 00:00:00.0(java.sql.Timestamp)][lastUpdatedStamp,2015-07-07 16:15:06.306(java.sql.Timestamp)][lastUpdatedTxStamp,2015-07-07 16:15:06.298(java.sql.Timestamp)][loginMethTypeId,OAuth2(java.lang.String)][loginProviderId,LinkedIn(java.lang.String)][productStoreId,9000(java.lang.String)] (SQL Exception while executing the following:INSERT INTO public.THIRD_PARTY_LOGIN (PRODUCT_STORE_ID, LOGIN_METH_TYPE_ID, LOGIN_PROVIDER_ID, FROM_DATE, THRU_DATE, SEQUENCE_NUM, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: insert or update on table "third_party_login" violates foreign key constraint "prod_store_logins"
      [java] Detail: Key (product_store_id)=(9000) is not present in table "product_store".)). Rolling back transaction.
      [java] 2015-07-07 16:15:06,309 |main |TransactionUtil |W| Calling transaction setRollbackOnly; this stack trace shows where this is happening:
      [java] java.lang.Exception: Failure in create operation for entity [ThirdPartyLogin]: org.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:ThirdPartyLogin][createdStamp,2015-07-07 16:15:06.306(java.sql.Timestamp)][createdTxStamp,2015-07-07 16:15:06.298(java.sql.Timestamp)][fromDate,2011-01-01 00:00:00.0(java.sql.Timestamp)][lastUpdatedStamp,2015-07-07 16:15:06.306(java.sql.Timestamp)][lastUpdatedTxStamp,2015-07-07 16:15:06.298(java.sql.Timestamp)][loginMethTypeId,OAuth2(java.lang.String)][loginProviderId,LinkedIn(java.lang.String)][productStoreId,9000(java.lang.String)] (SQL Exception while executing the following:INSERT INTO public.THIRD_PARTY_LOGIN (PRODUCT_STORE_ID, LOGIN_METH_TYPE_ID, LOGIN_PROVIDER_ID, FROM_DATE, THRU_DATE, SEQUENCE_NUM, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: insert or update on table "third_party_login" violates foreign key constraint "prod_store_logins"
      [java] Detail: Key (product_store_id)=(9000) is not present in table "product_store".)). Rolling back transaction.
      [java] at org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:374) [ofbiz-entity.jar:?]
      [java] at org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:313) [ofbiz-entity.jar:?]
      [java] at org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:925) [ofbiz-entity.jar:?]

        Activity

        Hide
        wt Wai added a comment -

        Looks good. Closing issue. Thanks

        Show
        wt Wai added a comment - Looks good. Closing issue. Thanks
        Hide
        shi.jinghai Shi Jinghai added a comment -

        Thanks Wai.

        1. I changed passport enditymodel.xml to remove the 3 warnings on ThirdPartyLogin during OFBiz start.
        2. Remove classpath of lib/* from ofbiz-component.xml as the path doesn't exist in the component.

        It's in trunk rev. 1689990.

        Please check whether it's good now.

        Show
        shi.jinghai Shi Jinghai added a comment - Thanks Wai. 1. I changed passport enditymodel.xml to remove the 3 warnings on ThirdPartyLogin during OFBiz start. 2. Remove classpath of lib/* from ofbiz-component.xml as the path doesn't exist in the component. It's in trunk rev. 1689990. Please check whether it's good now.
        Hide
        wt Wai added a comment -

        After installing the seed data. I discovered some warning messages when ofbiz is run.
        I'm using postgresql with character set utf8.

        console output:

        2015-07-08 19:29:07,345 |delegator-startup-1 |ModelReader |I| Finished loading entities; #Entities=878 #ViewEntities=323 #Fields=9170 #Relationships=2982 #AutoRelationships=2197
        2015-07-08 19:29:07,375 |delegator-startup-1 |GenericDelegator |I| Doing entity definition check...
        2015-07-08 19:29:07,381 |delegator-startup-1 |ModelEntityChecker |I| [initReservedWords] array length = 1025
        2015-07-08 19:29:07,507 |delegator-startup-1 |GenericDelegator |W| ===== Found 4 warnings when checking the entity definitions:
        2015-07-08 19:29:07,508 |delegator-startup-1 |GenericDelegator |W| [FieldNotUnique] Field [userLoginId of entity SecmgrSgrpAssignedUserMemberUsersView is not unique for that entity.
        2015-07-08 19:29:07,508 |delegator-startup-1 |GenericDelegator |W| [RelFKNameGT18] The foreign key named LINKEDIN_USER_STORE (length:19) was greater than 18 characters in length for relation ProductStore of entity LinkedInUser.
        2015-07-08 19:29:07,508 |delegator-startup-1 |GenericDelegator |W| [RelFKNameGT18] The foreign key named STORE_OAUTH_LINKEDIN (length:20) was greater than 18 characters in length for relation ProductStore of entity OAuth2LinkedIn.
        2015-07-08 19:29:07,508 |delegator-startup-1 |GenericDelegator |W| [RelationNameNotUnique] Relation EnumerationType of entity ThirdPartyLogin is not unique for that entity.
        2015-07-08 19:29:07,512 |OFBiz-batch-1 |GenericDelegator |I| Delegator "default" initializing helper "localposttenant" for entity group "org.ofbiz.tenant".
        2015-07-08 19:29:07,512 |OFBiz-batch-2 |GenericDelegator |I| Delegator "default" initializing helper "localpostolap" for entity group "org.ofbiz.olap".
        2015-07-08 19:29:07,516 |OFBiz-batch-3 |GenericDelegator |I| Delegator "default" initializing helper "localpostgres" for entity group "org.ofbiz".
        2015-07-08 19:29:07,521 |OFBiz-batch-3 |GenericDelegator |I| Doing database check as requested in entityengine.xml with addMissing=true
        2015-07-08 19:29:07,521 |OFBiz-batch-1 |GenericDelegator |I| Doing database check as requested in entityengine.xml with addMissing=true

        Show
        wt Wai added a comment - After installing the seed data. I discovered some warning messages when ofbiz is run. I'm using postgresql with character set utf8. console output: 2015-07-08 19:29:07,345 |delegator-startup-1 |ModelReader |I| Finished loading entities; #Entities=878 #ViewEntities=323 #Fields=9170 #Relationships=2982 #AutoRelationships=2197 2015-07-08 19:29:07,375 |delegator-startup-1 |GenericDelegator |I| Doing entity definition check... 2015-07-08 19:29:07,381 |delegator-startup-1 |ModelEntityChecker |I| [initReservedWords] array length = 1025 2015-07-08 19:29:07,507 |delegator-startup-1 |GenericDelegator |W| = = = = = Found 4 warnings when checking the entity definitions: 2015-07-08 19:29:07,508 |delegator-startup-1 |GenericDelegator |W| [FieldNotUnique] Field [userLoginId of entity SecmgrSgrpAssignedUserMemberUsersView is not unique for that entity. 2015-07-08 19:29:07,508 |delegator-startup-1 |GenericDelegator |W| [RelFKNameGT18] The foreign key named LINKEDIN_USER_STORE (length:19) was greater than 18 characters in length for relation ProductStore of entity LinkedInUser. 2015-07-08 19:29:07,508 |delegator-startup-1 |GenericDelegator |W| [RelFKNameGT18] The foreign key named STORE_OAUTH_LINKEDIN (length:20) was greater than 18 characters in length for relation ProductStore of entity OAuth2LinkedIn. 2015-07-08 19:29:07,508 |delegator-startup-1 |GenericDelegator |W| [RelationNameNotUnique] Relation EnumerationType of entity ThirdPartyLogin is not unique for that entity. 2015-07-08 19:29:07,512 |OFBiz-batch-1 |GenericDelegator |I| Delegator "default" initializing helper "localposttenant" for entity group "org.ofbiz.tenant". 2015-07-08 19:29:07,512 |OFBiz-batch-2 |GenericDelegator |I| Delegator "default" initializing helper "localpostolap" for entity group "org.ofbiz.olap". 2015-07-08 19:29:07,516 |OFBiz-batch-3 |GenericDelegator |I| Delegator "default" initializing helper "localpostgres" for entity group "org.ofbiz". 2015-07-08 19:29:07,521 |OFBiz-batch-3 |GenericDelegator |I| Doing database check as requested in entityengine.xml with addMissing=true 2015-07-08 19:29:07,521 |OFBiz-batch-1 |GenericDelegator |I| Doing database check as requested in entityengine.xml with addMissing=true
        Hide
        wt Wai added a comment -

        Thanks for the fix. Closing the issue.

        Show
        wt Wai added a comment - Thanks for the fix. Closing the issue.
        Hide
        shi.jinghai Shi Jinghai added a comment -

        Thanks Wai. Obviously it's my fault.

        Now I changed OAuth2GitHubSeedData.xml and OAuth2LinkedInSeedData.xml from seed to demo as the productStoreId 9000 is in a demo data.

        The change is in trunk rev. 1689781. Please check whether it's ok for you.

        Show
        shi.jinghai Shi Jinghai added a comment - Thanks Wai. Obviously it's my fault. Now I changed OAuth2GitHubSeedData.xml and OAuth2LinkedInSeedData.xml from seed to demo as the productStoreId 9000 is in a demo data. The change is in trunk rev. 1689781. Please check whether it's ok for you.

          People

          • Assignee:
            shi.jinghai Shi Jinghai
            Reporter:
            wt Wai
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development