Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025882Openbravo ERPA. Platformpublic2014-03-03 17:082014-03-05 08:57
mblackhall 
AugustoMauch 
urgentmajoralways
closedno change required 
30Ubuntu 12.04.3
3.0MP27 
 
No
Mozilla Firefox
Core
No
0025882: Component provider check returning null and not allowing Openbravo to start
I have been trying to move my module to our production environment. It cannot run in production becuase the code for static rsource component is picking up a null Component resource in the following code (this is in StaticResourceComponent (i put in the log commands to see what is wrong)


public boolean isInDevelopment() {


  if (isInDevelopment == null) {
      isInDevelopment = false;
      for (ComponentProvider provider : componentProviders) {
        final List<ComponentResource> resources = provider.getGlobalComponentResources();
        if (resources == null || resources.size() == 0) {
          continue;
        }
        log.info(" Provider " + provider);
        log.info(" Provider " + provider.getModule().getDescription());
        log.info(" Provider " + provider.getModule().isInDevelopment());
        if (provider.getModule().isInDevelopment()) {
          isInDevelopment = true;
          return isInDevelopment;
        }
      }
    }
    return isInDevelopment;
}
The log shows null for a provider. This should not be possible . It must mean that Openbravo is created a null provider in its list.
Import module in live. This can't happen for any module, but why can a provider be created as null ?
Let me know where it builds the provider least and do not add one if it si null
No tags attached.
Issue History
2014-03-03 17:08mblackhallNew Issue
2014-03-03 17:08mblackhallAssigned To => AugustoMauch
2014-03-03 17:08mblackhallWeb browser => Mozilla Firefox
2014-03-03 17:08mblackhallModules => Core
2014-03-03 17:08mblackhallTriggers an Emergency Pack => No
2014-03-04 08:16alostaleWeb browserMozilla Firefox => Mozilla Firefox
2014-03-04 08:16alostaleOBNetwork customer => No
2014-03-04 08:16alostaleNote Added: 0064778
2014-03-04 08:16alostalePriorityimmediate => urgent
2014-03-04 08:16alostaleSeveritycritical => major
2014-03-04 08:16alostaleStatusnew => feedback
2014-03-04 16:46mblackhallNote Added: 0064802
2014-03-05 08:57alostaleStatusfeedback => closed
2014-03-05 08:57alostaleResolutionopen => no change required

Notes
(0064778)
alostale   
2014-03-04 08:16   
List of components is injected by Weld.

  @Inject
  @Any
  private Instance<ComponentProvider> componentProviders;

Can you share the module that's failing?
(0064802)
mblackhall   
2014-03-04 16:46   
Oke. I spotted I didn't have a dependent modules installed on my live version. After adding this module to the environment, it passed the code.

I still would have thought that a null provider could not be injected into the providers List but oke its working now. Thanks for your help. You can close the issue.