Re: svn commit: r1825436 - /ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1825436 - /ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml

Scott Gray-3
Hi Taher,

I'm not sure I understand or if something has changed in the last few years
but seed-initial should always expect to be loaded after seed data so it
shouldn't be a problem for seed-initial to depend on seed data.  You would
never just load seed-initial into an empty database.

Regards
Scott

On 27 February 2018 at 23:41, <[hidden email]> wrote:

> Author: taher
> Date: Tue Feb 27 10:41:14 2018
> New Revision: 1825436
>
> URL: http://svn.apache.org/viewvc?rev=1825436&view=rev
> Log:
> Fixed: a bug in loading seed-only data into the system
>
> When calling OFBiz with the command gradlew "ofbiz -l readers=seed-initial"
> the system crashes. The reason is because of a faulty dependency of
> "seed-initial" data in the entityext component to "seed" data in the
> security
> component. The fix is simply to change the type of reader for the requested
> data in SecurityPermissionSeedData.xml from "seed" to "seed-initial"
>
> Modified:
>     ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml
>
> Modified: ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-
> component.xml
> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/
> framework/security/ofbiz-component.xml?rev=1825436&r1=
> 1825435&r2=1825436&view=diff
> ============================================================
> ==================
> --- ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml
> (original)
> +++ ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml
> Tue Feb 27 10:41:14 2018
> @@ -26,7 +26,7 @@ under the License.
>      <classpath type="dir" location="dtd"/>
>
>      <entity-resource type="model" reader-name="main" loader="main"
> location="entitydef/entitymodel.xml"/>
> -    <entity-resource type="data" reader-name="seed" loader="main"
> location="data/SecurityPermissionSeedData.xml"/>
> +    <entity-resource type="data" reader-name="seed-initial" loader="main"
> location="data/SecurityPermissionSeedData.xml"/>
>      <!-- NOTE: comment this line out to ensure no resetting of passwords
> -->
>      <entity-resource type="data" reader-name="demo" loader="main"
> location="data/PasswordSecurityDemoData.xml"/>
>      <entity-resource type="data" reader-name="demo" loader="main"
> location="data/SecurityGroupDemoData.xml"/>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1825436 - /ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml

taher
Hi Scott, yeah I reverted this commit.

I realized that the reason for the crash is actually the order of
writing the readers in the command line. There are still some issues
in other areas of loading, so I need to study it a bit further.

On Thu, Mar 1, 2018 at 12:46 AM, Scott Gray
<[hidden email]> wrote:

> Hi Taher,
>
> I'm not sure I understand or if something has changed in the last few years
> but seed-initial should always expect to be loaded after seed data so it
> shouldn't be a problem for seed-initial to depend on seed data.  You would
> never just load seed-initial into an empty database.
>
> Regards
> Scott
>
> On 27 February 2018 at 23:41, <[hidden email]> wrote:
>
>> Author: taher
>> Date: Tue Feb 27 10:41:14 2018
>> New Revision: 1825436
>>
>> URL: http://svn.apache.org/viewvc?rev=1825436&view=rev
>> Log:
>> Fixed: a bug in loading seed-only data into the system
>>
>> When calling OFBiz with the command gradlew "ofbiz -l readers=seed-initial"
>> the system crashes. The reason is because of a faulty dependency of
>> "seed-initial" data in the entityext component to "seed" data in the
>> security
>> component. The fix is simply to change the type of reader for the requested
>> data in SecurityPermissionSeedData.xml from "seed" to "seed-initial"
>>
>> Modified:
>>     ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml
>>
>> Modified: ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-
>> component.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/
>> framework/security/ofbiz-component.xml?rev=1825436&r1=
>> 1825435&r2=1825436&view=diff
>> ============================================================
>> ==================
>> --- ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml
>> (original)
>> +++ ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml
>> Tue Feb 27 10:41:14 2018
>> @@ -26,7 +26,7 @@ under the License.
>>      <classpath type="dir" location="dtd"/>
>>
>>      <entity-resource type="model" reader-name="main" loader="main"
>> location="entitydef/entitymodel.xml"/>
>> -    <entity-resource type="data" reader-name="seed" loader="main"
>> location="data/SecurityPermissionSeedData.xml"/>
>> +    <entity-resource type="data" reader-name="seed-initial" loader="main"
>> location="data/SecurityPermissionSeedData.xml"/>
>>      <!-- NOTE: comment this line out to ensure no resetting of passwords
>> -->
>>      <entity-resource type="data" reader-name="demo" loader="main"
>> location="data/PasswordSecurityDemoData.xml"/>
>>      <entity-resource type="data" reader-name="demo" loader="main"
>> location="data/SecurityGroupDemoData.xml"/>
>>
>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1825436 - /ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml

Scott Gray-3
Ah so you did, sorry!  I just picked a random commit from my inbox to
review without looking at the subsequent ones.

Regards
Scott

On 1 March 2018 at 10:57, Taher Alkhateeb <[hidden email]>
wrote:

> Hi Scott, yeah I reverted this commit.
>
> I realized that the reason for the crash is actually the order of
> writing the readers in the command line. There are still some issues
> in other areas of loading, so I need to study it a bit further.
>
> On Thu, Mar 1, 2018 at 12:46 AM, Scott Gray
> <[hidden email]> wrote:
> > Hi Taher,
> >
> > I'm not sure I understand or if something has changed in the last few
> years
> > but seed-initial should always expect to be loaded after seed data so it
> > shouldn't be a problem for seed-initial to depend on seed data.  You
> would
> > never just load seed-initial into an empty database.
> >
> > Regards
> > Scott
> >
> > On 27 February 2018 at 23:41, <[hidden email]> wrote:
> >
> >> Author: taher
> >> Date: Tue Feb 27 10:41:14 2018
> >> New Revision: 1825436
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1825436&view=rev
> >> Log:
> >> Fixed: a bug in loading seed-only data into the system
> >>
> >> When calling OFBiz with the command gradlew "ofbiz -l
> readers=seed-initial"
> >> the system crashes. The reason is because of a faulty dependency of
> >> "seed-initial" data in the entityext component to "seed" data in the
> >> security
> >> component. The fix is simply to change the type of reader for the
> requested
> >> data in SecurityPermissionSeedData.xml from "seed" to "seed-initial"
> >>
> >> Modified:
> >>     ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml
> >>
> >> Modified: ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-
> >> component.xml
> >> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/
> >> framework/security/ofbiz-component.xml?rev=1825436&r1=
> >> 1825435&r2=1825436&view=diff
> >> ============================================================
> >> ==================
> >> --- ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml
> >> (original)
> >> +++ ofbiz/ofbiz-framework/trunk/framework/security/ofbiz-component.xml
> >> Tue Feb 27 10:41:14 2018
> >> @@ -26,7 +26,7 @@ under the License.
> >>      <classpath type="dir" location="dtd"/>
> >>
> >>      <entity-resource type="model" reader-name="main" loader="main"
> >> location="entitydef/entitymodel.xml"/>
> >> -    <entity-resource type="data" reader-name="seed" loader="main"
> >> location="data/SecurityPermissionSeedData.xml"/>
> >> +    <entity-resource type="data" reader-name="seed-initial"
> loader="main"
> >> location="data/SecurityPermissionSeedData.xml"/>
> >>      <!-- NOTE: comment this line out to ensure no resetting of
> passwords
> >> -->
> >>      <entity-resource type="data" reader-name="demo" loader="main"
> >> location="data/PasswordSecurityDemoData.xml"/>
> >>      <entity-resource type="data" reader-name="demo" loader="main"
> >> location="data/SecurityGroupDemoData.xml"/>
> >>
> >>
> >>
>