[jira] [Commented] (OFBIZ-9243) load demo data failure

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

[jira] [Commented] (OFBIZ-9243) load demo data failure

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-9243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15941678#comment-15941678 ]

Taher Alkhateeb commented on OFBIZ-9243:
----------------------------------------

Hi Deepak,

Well, this depends on what you are trying to do. The plugins will always load _after_ framework and applications. So the only concern is for a plugin after another plugin. So for a plugin to override the webapp of another plugin might be a bad design taste IMO because it indicates a non-modular design where you have to hack the guts of another plugin for your plugin to work.

Also, having a forced loading sequence among the plugins means they depend on shared stuff. This shared stuff should be taken a level lower (take it to the common component, or data-model for example). Fixing the root cause in my opinion is a much more clean solution that resorting to hacks like ordering the load. This becomes especially relevant if you want to consider a plugin to be a stand-alone piece of code that delivers value as opposed to something that hacks other components and is deeply entangled with them.

So in my opinion, a plugin should only depend on another plugin in case of some _functionality_ or _feature_ (services, entities, widgets, or other code artifacts) but not because of some _state_ (data-loading, webapp loading, etc ...). I think depending on _state_ makes things much, much more complex. Heck that's the reason why the world is shifting to functional programming.

> load demo data failure
> ----------------------
>
>                 Key: OFBIZ-9243
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9243
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Wai
>         Attachments: ofbiz-framework-buildbot gradlew loadDefault.log.txt
>
>
> checkout latest ofbiz-framework and ofbiz-plugins
> $ gradlew cleanAll build
> $ gradlew loadDefault...using derby
> console output...
> 2017-03-02 17:18:32,143 |main                 |EntityDataLoadContainer       |I| 00040 of 17229 from file:/ofbiz-framework/plugins/webpos/data/PosSyncSettings.xml
> 2017-03-02 17:18:32,143 |main                 |EntityDataLoadContainer       |I| The following errors occurred in the data load:
> 2017-03-02 17:18:32,143 |main                 |EntityDataLoadContainer       |I| [loadData]: Error loading XML Resource "file:/ofbiz-framework/plugins/ebay/data/DemoEbayData.xml"; Error was: A transaction error occurred reading data
> 2017-03-02 17:18:32,144 |main                 |EntityDataLoadContainer       |I| [loadData]: Error loading XML Resource "file:/ofbiz-framework/plugins/myportal/data/MyPortalDemoData.xml"; Error was: A transaction error occurred reading data
> 2017-03-02 17:18:32,144 |main                 |EntityDataLoadContainer       |I| =-=-=-=-=-=-= Finished the data load with 17229 rows changed.
> }}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)