Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032507
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformtrivialhave not tried2016-03-18 12:482016-06-17 19:36
ReporteralostaleView Statuspublic 
Assigned Toplatform 
PrioritynormalResolutionfixedFixed in Version3.0PR16Q2
StatusclosedFix in branchFixed in SCM revision05ad78bbb02e
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0032507: NPE when executing GenerateComponentTest.testStaticResources test case

DescriptionWhenever GenerateComponentTest.testStaticResources test case is executed a NPE is logged.
Steps To ReproduceRun GenerateComponentTest.testStaticResources
  -> check log:

    [junit] 300809 [main] ERROR org.openbravo.client.kernel.StaticResourceComponent - Error generating component; null
    [junit] java.lang.NullPointerException
    [junit] at org.openbravo.client.kernel.StaticResourceComponent.generate(StaticResourceComponent.java:105)
    [junit] at org.openbravo.client.kernel.ComponentGenerator.generate(ComponentGenerator.java:65)
    [junit] at org.openbravo.client.kernel.freemarker.test.GenerateComponentTest.generateComponent(GenerateComponentTest.java:67)
    [junit] at org.openbravo.client.kernel.freemarker.test.GenerateComponentTest.testStaticResources(GenerateComponentTest.java:55)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0032506 closedplatform GenerateComponentTest.testApplication test case is ignored 

-  Notes
(0085231)
hgbot (developer)
2016-03-21 08:15

Repository: erp/devel/pi
Changeset: 6406c7c2cfbeeeb675c7247648c655c10df80d80
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Mar 18 13:00:05 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6406c7c2cfbeeeb675c7247648c655c10df80d80 [^]

fixed bug 32507: NPE when executing GenerateComponentTest.testStaticResources

  StaticResourcesComponent assumes there is a ServletContext to read templates
  based on it. As test is executed out of Tomcat there is no ServletContext,
  causing NPE.

  Fixed by mocking a ServletContext.

  Additionally ApplicationComponent assumes there is a session to get format values
  from causing also NPE when executing as test.

  Fixed by dealing with this case and returning an empty map.

---
M modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/freemarker/test/GenerateComponentTest.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ApplicationComponent.java
---
(0085250)
hudsonbot (developer)
2016-03-21 14:02

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/ee80ac4a1a50 [^]
Maturity status: Test
(0085265)
caristu (developer)
2016-03-22 19:35

Verified
(0085581)
hgbot (developer)
2016-04-13 08:39

Repository: erp/devel/pi
Changeset: 05ad78bbb02e5a85cb378d5c8862ce7856494dac
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Mar 18 13:00:05 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/05ad78bbb02e5a85cb378d5c8862ce7856494dac [^]

fixed bug 32507: NPE when executing GenerateComponentTest.testStaticResources

  StaticResourcesComponent assumes there is a ServletContext to read templates
  based on it. As test is executed out of Tomcat there is no ServletContext,
  causing NPE.

  Fixed by mocking a ServletContext.

  Additionally ApplicationComponent assumes there is a session to get format values
  from causing also NPE when executing as test.

  Fixed by dealing with this case and returning an empty map.

---
M modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/freemarker/test/GenerateComponentTest.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ApplicationComponent.java
---
(0085583)
alostale (manager)
2016-04-13 08:40

closing again: it was unintentionally reopened.
(0087441)
hudsonbot (developer)
2016-06-17 19:36

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/0dc7be081b1c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-03-18 12:48 alostale New Issue
2016-03-18 12:48 alostale Assigned To => platform
2016-03-18 12:48 alostale Modules => Core
2016-03-18 12:48 alostale Triggers an Emergency Pack => No
2016-03-18 12:48 alostale Relationship added related to 0032506
2016-03-21 08:15 hgbot Checkin
2016-03-21 08:15 hgbot Note Added: 0085231
2016-03-21 08:15 hgbot Status new => resolved
2016-03-21 08:15 hgbot Resolution open => fixed
2016-03-21 08:15 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6406c7c2cfbeeeb675c7247648c655c10df80d80 [^]
2016-03-21 14:02 hudsonbot Checkin
2016-03-21 14:02 hudsonbot Note Added: 0085250
2016-03-22 19:32 caristu Review Assigned To => caristu
2016-03-22 19:35 caristu Status resolved => closed
2016-03-22 19:35 caristu Fixed in Version => 3.0PR16Q2
2016-03-22 19:35 caristu Note Added: 0085265
2016-04-13 08:39 hgbot Checkin
2016-04-13 08:39 hgbot Note Added: 0085581
2016-04-13 08:39 hgbot Status closed => resolved
2016-04-13 08:39 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/6406c7c2cfbeeeb675c7247648c655c10df80d80 [^] => http://code.openbravo.com/erp/devel/pi/rev/05ad78bbb02e5a85cb378d5c8862ce7856494dac [^]
2016-04-13 08:40 alostale Note Added: 0085583
2016-04-13 08:40 alostale Status resolved => closed
2016-06-17 19:36 hudsonbot Checkin
2016-06-17 19:36 hudsonbot Note Added: 0087441


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker