[jira] [Created] (OFBIZ-10641) Error in GetLocaleListTests.java

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

[jira] [Created] (OFBIZ-10641) Error in GetLocaleListTests.java

Nicolas Malin (Jira)
Jacques Le Roux created OFBIZ-10641:
---------------------------------------

             Summary: Error in GetLocaleListTests.java
                 Key: OFBIZ-10641
                 URL: https://issues.apache.org/jira/browse/OFBIZ-10641
             Project: OFBiz
          Issue Type: Bug
          Components: framework
    Affects Versions: Trunk
            Reporter: Jacques Le Roux
            Assignee: Jacques Le Roux
             Fix For: Upcoming Branch


As reported in OFBIZ-10458:

A test error related to GetLocaleListTests.java seems to happen only(?) on a fresh trink 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:
{code}
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/:?]
    [...]
 {code}

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

Mathieu suggested to
{quote}
replace the location {{component://base/config/GroovyInit.groovy}} with {{ofbizhome://framework/base/config/GroovyInit.groovy}}
{quote}
because
{quote}
{{GroovyUtil}} [should not] depend on the component container in the first place
{quote}

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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)