Hello Yashwant,
I dont understand what you mean. Can you explain me more in detail? 

In my userPreferences table I have this two rows for my admin user:

+---------------+--------------------+-------------------------+-----------------+---------------------+-------------------------+-------------------------+-------------------------+-------------------------+
| USER_LOGIN_ID | USER_PREF_TYPE_ID  | USER_PREF_GROUP_TYPE_ID | 
USER_PREF_VALUE | USER_PREF_DATA_TYPE | LAST_UPDATED_STAMP      | 
LAST_UPDATED_TX_STAMP   | CREATED_STAMP           | CREATED_TX_STAMP        |
+---------------+--------------------+-------------------------+-----------------+---------------------+-------------------------+-------------------------+-------------------------+-------------------------+
| admin         | javaScriptEnabled  | GLOBAL_PREFERENCES      | Y              
 | NULL                | 2021-10-22 08:18:24.289 | 2021-10-22 08:18:24.240 | 
2021-10-21 12:49:19.178 | 2021-10-21 12:49:18.765 |
| admin         | VISUAL_THEME       | GLOBAL_PREFERENCES      | FLAT_GREY      
 | NULL                | 2021-10-21 12:50:10.397 | 2021-10-21 12:50:10.389 | 
2021-10-21 12:50:10.397 | 2021-10-21 12:50:10.389 

TIA
Rodrigo Baptista


On 2021/10/21 14:04:21, Yashwant Dhakad <yashwant.dha...@hotwaxsystems.com> 
wrote: 
> Hi Rodrigo,
> In Human Resource screen, the partyId field is set from
> defaultOrganizationPartyId and the defaultOrganizationPartyId is set from
> userPreferences.ORGANIZATION_PARTY, can you please check your
> UserPreference record for the logged-in user? The PartyRelationship record
> gets for this default organization party id.
> 
> On Thu, Oct 21, 2021 at 7:04 PM Pierre Smits <pierresm...@apache.org> wrote:
> 
> > HI Rodrigo,
> >
> > Please have a look at one of the demo sites and the demo data included in
> > the code base regarding party relationships.
> >
> > Not long ago I tried to improve the demo data set for the project, but
> > unfortunately that hit a brick wall.
> >
> > Met vriendelijke groet,
> >
> > Pierre Smits
> > *Proud* *contributor** of* Apache OFBiz <https://ofbiz.apache.org/> since
> > 2008 (without privileges)
> >
> > *Apache Directory <https://directory.apache.org>, PMC Member*
> > Apache Incubator <https://incubator.apache.org>, committer
> > Apache Steve <https://steve.apache.org>, committer
> >
> >
> > On Thu, Oct 21, 2021 at 3:24 PM Rodrigo Baptista <
> > rodrigo.bapti...@binaroo.com> wrote:
> >
> > > Hey Pierre,
> > >
> > > thanks for your help. The role in DemoLeadOwnersGroups was missing. I
> > > could create the relationship and this fixed the SQL exception but my
> > main
> > > problem is still there.
> > > I can´t see my company in the HR view. Do you have a documentation how to
> > > setup the system that I can see the Company in the HR view?
> > >
> > > best regards,
> > >
> > > Rodrigo Baptista
> > >
> > > On 2021/10/21 12:38:23, Pierre Smits <pierresm...@apache.org> wrote:
> > > > HI Rodrigo,
> > > > The error indicates that there is a mismatch between the partyIdFrom
> > and
> > > > the roleTypeIdFrom. Please check the roles assigned to the party.
> > > >
> > > > Also be aware, that the roleTypeId of the partyIdFrom
> > > (DemoLeadOwnersGroup)
> > > > seems incorrect. A group is - in directory parlance - an element below
> > > that
> > > > of the primary company (which in OFBiz should the roleTypeId
> > > > 'INTERNAL_ORGANIZATIO').
> > > >
> > > >
> > > > Met vriendelijke groet,
> > > >
> > > > Pierre Smits
> > > > *Proud* *contributor** of* Apache OFBiz <https://ofbiz.apache.org/>
> > > since
> > > > 2008 (without privileges)
> > > >
> > > > *Apache Directory <https://directory.apache.org>, PMC Member*
> > > > Apache Incubator <https://incubator.apache.org>, committer
> > > > Apache Steve <https://steve.apache.org>, committer
> > > >
> > > >
> > > > On Thu, Oct 21, 2021 at 1:56 PM Rodrigo Baptista <
> > > > rodrigo.bapti...@binaroo.com> wrote:
> > > >
> > > > > Hello,
> > > > > No i don´t have. When I create ofbiz without demo data I have nothing
> > > > > created.
> > > > >
> > > > > At the moment, i try to add the relationships to the entities. But i
> > > have
> > > > > a exception when i try to link the "LeadOwner(Personal Information)"
> > > and
> > > > > the "Group of Lead Owners(Party Group Information). But i get the
> > > following
> > > > > error:
> > > > >
> > > > > ------Start Error------
> > > > > The Following Errors Occurred:
> > > > >
> > > > > Exception thrown while creating the "newEntity" GenericValue:
> > > > > org.apache.ofbiz.entity.GenericEntityException: Error while
> > inserting:
> > > > >
> > >
> > [GenericEntity:PartyRelationship][comments,null()][createdStamp,2021-10-21
> > > > > 13:34:43.291(java.sql.Timestamp)][createdTxStamp,2021-10-21
> > > > > 13:34:43.258(java.sql.Timestamp)][fromDate,2021-10-21
> > > > > 13:34:13.0(java.sql.Timestamp)][lastUpdatedStamp,2021-10-21
> > > > > 13:34:43.291(java.sql.Timestamp)][lastUpdatedTxStamp,2021-10-21
> > > > >
> > >
> > 13:34:43.258(java.sql.Timestamp)][partyIdFrom,DemoLeadOwnersGroup(java.lang.String)][partyIdTo,DemoLeadOwner(java.lang.String)][partyRelationshipTypeId,LEAD_OWN_GRP_MEMBER(java.lang.String)][roleTypeIdFrom,INTERNAL_ORGANIZATIO(java.lang.String)][roleTypeIdTo,OWNER(java.lang.String)][securityGroupId,null()][statusId,PARTYREL_CREATED(java.lang.String)][thruDate,null()]
> > > > > (SQL Exception while executing the following:INSERT INTO
> > > PARTY_RELATIONSHIP
> > > > > (PARTY_ID_FROM, PARTY_ID_TO, ROLE_TYPE_ID_FROM, ROLE_TYPE_ID_TO,
> > > FROM_DATE,
> > > > > THRU_DATE, STATUS_ID, RELATION
> > > > >  SHIP_NAME, SECURITY_GROUP_ID, PRIORITY_TYPE_ID,
> > > > > PARTY_RELATIONSHIP_TYPE_ID, PERMISSIONS_ENUM_ID, POSITION_TITLE,
> > > COMMENTS,
> > > > > LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,
> > > CREATED_TX_STAMP)
> > > > > VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Cannot
> > > add
> > > > > or update a child row: a foreign key constraint fails
> > > > > (`ofbiz`.`party_relationship`, CONSTRAINT `PARTY_REL_FPROLE` FOREIGN
> > > KEY
> > > > > (`PARTY_ID_FROM`, `ROLE_TYPE_ID_FROM`) REFERENCES `PARTY_ROLE`
> > > (`PARTY_ID`,
> > > > > `ROLE_TYPE_ID`)))) (Error while inserting:
> > > > >
> > >
> > [GenericEntity:PartyRelationship][comments,null()][createdStamp,2021-10-21
> > > > > 13:34:43.291(java.sql.Timestamp)][createdTxStamp,2021-10-21
> > > > > 13:34:43.258(java.sql.Timestamp)][fromDate,2021-10-21
> > > > > 13:34:13.0(java.sql.Timestamp)][lastUpdatedStamp,2021-10-21
> > > > > 13:34:43.291(java.sql.Timestamp)][lastUpdatedTxStamp,2021-10-21
> > > > >
> > >
> > 13:34:43.258(java.sql.Timestamp)][partyIdFrom,DemoLeadOwnersGroup(java.lang.String)][partyIdTo,DemoLeadOwner(java.lang.String)][partyRelationshipTypeId,LEAD_OWN_GRP_
> > > > >
> > >
> > MEMBER(java.lang.String)][roleTypeIdFrom,INTERNAL_ORGANIZATIO(java.lang.String)][roleTypeIdTo,OWNER(java.lang.String)][securityGroupId,null()][statusId,PARTYREL_CREATED(java.lang.String)][thruDate,null()]
> > > > > (SQL Exception while executing the following:INSERT INTO
> > > PARTY_RELATIONSHIP
> > > > > (PARTY_ID_FROM, PARTY_ID_TO, ROLE_TYPE_ID_FROM, ROLE_TYPE_ID_TO,
> > > FROM_DATE,
> > > > > THRU_DATE, STATUS_ID, RELATIONSHIP_NAME, SECURITY_GROUP_ID,
> > > > > PRIORITY_TYPE_ID, PARTY_RELATIONSHIP_TYPE_ID, PERMISSIONS_ENUM_ID,
> > > > > POSITION_TITLE, COMMENTS, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP,
> > > > > CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?,
> > ?,
> > > ?,
> > > > > ?, ?, ?, ?, ?, ?, ?) (Cannot add or update a child row: a foreign key
> > > > > constraint fails (`ofbiz`.`party_relationship`, CONSTRAINT
> > > > > `PARTY_REL_FPROLE` FOREIGN KEY (`PARTY_ID_FROM`, `ROLE_TYPE_ID_FROM`)
> > > > > REFERENCES `PARTY_ROLE` (`PARTY_ID`, `ROLE_TYPE_ID`)))))
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > -----END Error -------
> > > > >
> > > > > On 2021/10/21 08:11:31, Pierre Smits <pierresm...@apache.org> wrote:
> > > > > > Hi Rodrigo,
> > > > > >
> > > > > > Do you have the primary company in your data set? This needs to
> > > exist.
> > > > > Have
> > > > > > a look at the demo data set, see the data regarding '<Party
> > > > > > partyId="Company"/> and related.
> > > > > >
> > > > > > Met vriendelijke groet,
> > > > > >
> > > > > > Pierre Smits
> > > > > > *Proud* *contributor** of* Apache OFBiz <https://ofbiz.apache.org/
> > >
> > > > > since
> > > > > > 2008 (without privileges)
> > > > > >
> > > > > > *Apache Directory <https://directory.apache.org>, PMC Member*
> > > > > > Apache Incubator <https://incubator.apache.org>, committer
> > > > > > Apache Steve <https://steve.apache.org>, committer
> > > > > >
> > > > > >
> > > > > > On Wed, Oct 20, 2021 at 4:19 PM Rodrigo Baptista <
> > > > > > rodrigo.bapti...@binaroo.com> wrote:
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > i have a problem with ofbiz. I installed the version 17.12 and
> > > 18.12
> > > > > and i
> > > > > > > have the same issue with both versions.
> > > > > > >
> > > > > > > What I do:
> > > > > > >
> > > > > > > 1. Installed Ofbiz with initial seed data. (./gradlew "ofbiz
> > > > > --load-data
> > > > > > > readers=seed,seed-initial" loadAdminUserLogin
> > -PuserLoginId=admin)
> > > > > > > 2. Start ofbiz (./gradlew ofbiz)
> > > > > > > 3. open HR View (/humanres/control/main)
> > > > > > >
> > > > > > > Now i have always a exception in my logs cause by the partyId is
> > > null:
> > > > > > >
> > > > > > > logs:
> > > > > > >
> > > > > > > ----Start Log-----
> > > > > > >
> > > > > > > freemarker.core.InvalidReferenceException: The following has
> > > evaluated
> > > > > to
> > > > > > > null or missing:
> > > > > > > ==> partyId  [in template
> > > > > > > "component://humanres/template/category/CategoryTree.ftl" at line
> > > 60,
> > > > > > > column 44]
> > > > > > > ----
> > > > > > > Tip: If the failing expression is known to legally refer to
> > > something
> > > > > > > that's sometimes null or missing, either specify a default value
> > > like
> > > > > > > myOptionalVar!myDefault, or use <#if
> > > > > > > myOptionalVar??>when-present<#else>when-missing</#if>. (These
> > only
> > > > > cover
> > > > > > > the last step of the expression; to cover the whole expression,
> > use
> > > > > > > parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
> > > > > > > ----
> > > > > > > FTL stack trace ("~" means nesting-related):
> > > > > > >        - Failed at: ${partyId}  [in template
> > > > > > > "component://humanres/template/category/CategoryTree.ftl" at line
> > > 60,
> > > > > > > column 42]
> > > > > > > ——
> > > > > > > ----End Log--------
> > > > > > >
> > > > > > > What i need is to create a company to manage the company.
> > > > > > >
> > > > > > > I created also a company with the documentation (
> > > > > > >
> > > > >
> > > https://cwiki.apache.org/confluence/display/OFBIZ/How+to+Setup+a+Company
> > )
> > > > > > > and it not fixed the issue.
> > > > > > >
> > > > > > > Does anybody have a solution for me?
> > > > > > >
> > > > > > >
> > > > > > > regards Rodrigo Baptista
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 
> 
> -- 
> Kind Regards,
> Yashwant Dhakad
> Sr. Technical Consultant
> 
> *HotWax Systems*
> *Enterprise open source experts*
> cell: +91-9098240513
> office: 0731-409-3684
> http://www.hotwaxsystems.com
> 

Reply via email to