[ https://issues.apache.org/jira/browse/OFBIZ-4231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux closed OFBIZ-4231. ---------------------------------- Resolution: Not A Problem Assignee: Jacques Le Roux Sergei, You should have a look at http://svn.apache.org/viewvc?view=revision&revision=739743. Where notably the ofbiz/trunk/applications/securityext/data/SecurityExtData.xml have been removed and replaced by demo data. So, I suggest to rather handle that in your application. If you really think it's should be handled OOTB as seed in OFBiz (I don't think so for security reasons, but I must admit I have not a clear opininon about that), then please discuss it in dev ML before doing anything else You may also be interested by [history about that|http://ofbiz.markmail.org/search/%3CParty+partyId%3Dsystem+partyTypeId%3DPERSON/%3E+list:org.apache.ofbiz.commits#query:%3CParty%20partyId%3Dsystem%20partyTypeId%3DPERSON%2F%3E%20list%3Aorg.apache.ofbiz.commits+page:1+mid:oefiszwzzvwgxbsu+state:results] and some discussions around it http://markmail.org/message/pu5mox36dnlfdsc3 http://markmail.org/message/7ciat57wbdx4xjtm Thanks > User login : system does not have related Party > ----------------------------------------------- > > Key: OFBIZ-4231 > URL: https://issues.apache.org/jira/browse/OFBIZ-4231 > Project: OFBiz > Issue Type: Bug > Affects Versions: Release Branch 10.04 > Environment: Data scope: SEED > Reporter: Sergei > Assignee: Jacques Le Roux > Original Estimate: 1h > Remaining Estimate: 1h > > I faced a problem, which will appear for the seed db initialization (not > demo)!!! > I have setup email sending for order confirmation, the each new email has > the attachment in PDF. During the mail sending chain of services are called > (via callback events) and in the end of the chain these services are called: > <!-- dataresource role ecas --> > <eca service="createDataResourceRole" event="invoke"> > <action service="ensurePartyRole" mode="sync" run-as-user="system"/> > </eca> > <service name="ensurePartyRole" engine="simple" > > location="component://party/script/org/ofbiz/party/party/PartySimpleMethods.xml" > invoke="ensureNaPartyRole" auth="false"> > <description>Ensure that the party is in the specified > role.</description> > <attribute name="partyId" type="String" mode="IN" optional="true"/> > <attribute name="roleTypeId" type="String" mode="IN" > optional="false"/> > </service> > as you can see these services are called by "system" UserLogin. > ensurePartyRole - throws an exception, because of partyId = null. I > researched db model, and found that the UserLogin "system" exists, but > without a party. > However, these methods are called after the mail was sent, but the overall > transaction is rollbacked, so the next retries fire the same problems, as > result we have 3 retries and 3 mails in the mailbox. > To fix this problem, I have created the "system" party and associated it with > the UserLogin (I got it from the Demo data): > <!-- Party for System UserLogin Account - just in case logic depends on > it --> > <Party partyId="system" partyTypeId="PERSON"/> > <Person partyId="system" firstName="System" lastName="Account"/> > <!-- various automated processes will cause it to be put in this role > anyway --> > <PartyRole partyId="system" roleTypeId="PACKER"/> > <UserLogin userLoginId="system" partyId="system"/> -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira