Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-10641

Error in GetLocaleListTests.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Release Branch 17.12, Trunk
    • 17.12.01
    • framework
    • None

    Description

      As reported in OFBIZ-10458:

      A test error related to GetLocaleListTests.java seems to happen only on a fresh trunk install when running unit tests. For instance it always happens on trunk demo, and sometimes locally when clearing all and restarting, while testing for instance. Here is the error:

      2018-11-06 03:01:48,777 |Test worker          |ComponentLocationResolver     |E| Could not get root location for component with name [base], error was: org.apache.ofbiz.base.component.ComponentException: No component found named : base
      org.apache.ofbiz.base.component.ComponentException: No component found named : base
      	at org.apache.ofbiz.base.component.ComponentConfig.getComponentConfig(ComponentConfig.java:260) ~[main/:?]
      	at org.apache.ofbiz.base.component.ComponentConfig.getComponentConfig(ComponentConfig.java:241) ~[main/:?]
      	at org.apache.ofbiz.base.component.ComponentConfig.getRootLocation(ComponentConfig.java:288) ~[main/:?]
      	at org.apache.ofbiz.base.location.ComponentLocationResolver.getBaseLocation(ComponentLocationResolver.java:67) [main/:?]
      	at org.apache.ofbiz.base.location.ComponentLocationResolver.resolveLocation(ComponentLocationResolver.java:41) [main/:?]
      	at org.apache.ofbiz.base.location.FlexibleLocation.resolveLocation(FlexibleLocation.java:117) [main/:?]
      	at org.apache.ofbiz.base.location.FlexibleLocation.resolveLocation(FlexibleLocation.java:103) [main/:?]
      	at org.apache.ofbiz.base.util.GroovyUtil.getScriptClassFromLocation(GroovyUtil.java:154) [main/:?]
      	at org.apache.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:206) [main/:?]
      	at org.apache.ofbiz.base.util.GroovyUtil.<clinit>(GroovyUtil.java:66) [main/:?]
      	at org.apache.ofbiz.common.GetLocaleListTests.runScript(GetLocaleListTests.java:51) [test/:?]
      	at org.apache.ofbiz.common.GetLocaleListTests.frenchLocaleName(GetLocaleListTests.java:64) [test/:?]
          [...]
       

      It's no stopping tests. I'm not sure yet if R17 is concerned (did not try).

      Mathieu suggested to

      replace the location component://base/config/GroovyInit.groovy with ofbizhome://framework/base/config/GroovyInit.groovy

      because

      GroovyUtil [should not] depend on the component container in the first place

      in GroovyUtil.java and it seems to work. Committing and checking trunk demo error.log should do the trick. Then I'll check for R17 locally.

      Attachments

        Activity

          People

            jleroux Jacques Le Roux
            jleroux Jacques Le Roux
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: