Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035834Openbravo ERPA. Platformpublic2017-04-25 15:552017-05-29 17:43
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR17Q3 
caristu
Core
No
0035834: platform modules fail in CI
CI for platform modules is failing in org.openbravo.client.application.test.MenuTemplateTest.testApplication (see [1]).

With the following error:
java.lang.IllegalStateException: freemarker.template.TemplateModelException: get(navigationBarComponents) failed on instance of org.openbravo.client.application.MainLayoutComponent
    at org.openbravo.client.kernel.freemarker.FreemarkerTemplateProcessor.processTemplate(FreemarkerTemplateProcessor.java:69)
    at org.openbravo.client.kernel.freemarker.FreemarkerTemplateProcessor.processTemplate(FreemarkerTemplateProcessor.java:48)
    at org.openbravo.client.kernel.BaseTemplateProcessor.process(BaseTemplateProcessor.java:60)
...
Caused by: java.lang.IllegalStateException: Exception when creating component E918C30CA7DB434AA854720F4FCA32A4
    at org.openbravo.client.application.NavigationBarComponentGenerator.generateComponent(NavigationBarComponentGenerator.java:138)
    at org.openbravo.client.application.NavigationBarComponentGenerator.generateNavigationBarComponents(NavigationBarComponentGenerator.java:92)
    at org.openbravo.client.application.NavigationBarComponentGenerator.getDynamicNavigationBarComponents(NavigationBarComponentGenerator.java:76)
    at org.openbravo.client.application.MainLayoutComponent.getNavigationBarComponents(MainLayoutComponent.java:47)
Caused by: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.Dependent
    at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:596)
    at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:626)
    at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:692)
    at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:136)


[1] https://ci.openbravo.com/job/mod-simple/12411/testReport/ [^]
See CI for platform modules (ie. https://ci.openbravo.com/job/mod-simple/12411/testReport/ [^])
This problem started after login refactor project (0035553). It seems to be caused because there are 2 different instances of bean manager which are not able to properly create contexts for Dependent scope. The solution is to change test infrastructure to force to use the same manager.
No tags attached.
related to feature request 0035553 closed caristu Improve scalability of the login process 
Issue History
2017-04-25 15:55alostaleNew Issue
2017-04-25 15:55alostaleAssigned To => platform
2017-04-25 15:55alostaleModules => Core
2017-04-25 15:55alostaleTriggers an Emergency Pack => No
2017-04-25 15:56alostaleRelationship addedrelated to 0035553
2017-04-25 15:56alostaleAssigned Toplatform => alostale
2017-04-25 15:56alostaleReview Assigned To => caristu
2017-04-25 16:00hgbotCheckin
2017-04-25 16:00hgbotNote Added: 0096159
2017-04-25 16:00hgbotStatusnew => resolved
2017-04-25 16:00hgbotResolutionopen => fixed
2017-04-25 16:00hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a157881ce09679dfddc16ccf6eb4e610fba13683 [^]
2017-04-25 16:43alostaleNote Added: 0096161
2017-04-28 08:16caristuNote Added: 0096246
2017-04-28 08:16caristuStatusresolved => closed
2017-04-28 08:16caristuFixed in Version => 3.0PR17Q3
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096906

Notes
(0096159)
hgbot   
2017-04-25 16:00   
Repository: erp/devel/pi
Changeset: a157881ce09679dfddc16ccf6eb4e610fba13683
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Apr 25 15:59:15 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a157881ce09679dfddc16ccf6eb4e610fba13683 [^]

fixed bug 35834: platform modules fail in CI

  Two different instances of Weld bean manager were in use, this caused dependant
  context not to be consistently handled in jUnit Arquillian test cases.

  Solved by setting the same instance for static and instance bean manager in WeldUtils
  whenever a test class is statarted.

---
M modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java
M modules/org.openbravo.base.weld/src/org/openbravo/base/weld/WeldUtils.java
---
(0096161)
alostale   
2017-04-25 16:43   
got a successful build after fix is applied: https://ci.openbravo.com/view/modules/job/mod-platform/511/ [^]
(0096246)
caristu   
2017-04-28 08:16   
Reviewed
(0096906)
hudsonbot   
2017-05-29 17:43   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^]
Maturity status: Test