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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031358
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] Reservations modulemajoralways2015-11-04 16:462015-11-09 14:09
ReporterngarciaView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisione17cce4891b8
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date2015-05-05
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/d3e797b23239b892edc7b2140f69b7557632936f [^]
Regression levelProduction - Confirmed Stable
Review Assigned Tocaristu
Regression introduced in release
Summary

0031358: Resource Reservation widget is not working in 3.0PR15Q3, it blocks the application

DescriptionResource Reservation widget is not working in 3.0PR15Q3, it blocks the application
Steps To ReproduceAs system admin role:
   Install the Resources and Reservations Management module
As group admin role:
   Add the Resource Reservation widget to the workspace
   Check an empty error pop-up is shown and it could not be closed
   The log shows:
      ERROR org.openbravo.service.json.DefaultJsonDataService -
java.lang.NullPointerException
    at org.openbravo.service.json.DefaultJsonDataService.doPreAction(DefaultJsonDataService.java:812)
    at org.openbravo.service.json.DefaultJsonDataService.fetch(DefaultJsonDataService.java:101)
    at org.openbravo.service.json.DefaultJsonDataService.fetch(DefaultJsonDataService.java:92)
    at org.openbravo.module.resources.calendar.ResourcesCalendarDataSource.fetch(ResourcesCalendarDataSource.java:54)
...
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by feature request 0029782 closedgorkaion Openbravo ERP Hooks needed on some processes to be used by modules 
caused by defect 00313713.0PR15Q3 closedalostale Openbravo ERP API change: DefaultJsonDataService can't be instantiated with new 
related to defect 0031373 closedalostale Openbravo ERP UI frozen if calendar data request fails 

-  Notes
(0081487)
vmromanos (manager)
2015-11-04 19:32

At this point https://code.openbravo.com/erp/devel/main/rev/7c5e3781c593#l1.32 [^] the extraActions is null
(0081492)
alostale (manager)
2015-11-05 09:38

The problem is in org.openbravo.module.resources.calendar.ResourcesCalendarDataSource.getJsonDataService which is creating an anonymous class extending DefaultJsonDataService and instantiates it.

This, together with 0029782 causes NPE because it is assumed DefaultJsonDataService life cycle is managed by container so using @Inject should be safe, which is the case for all other DefaultJsonDataService instances. This assumption should be correct.

Therefore, the fix shouldn't be applied in DefaultJsonDataService but in ResourcesCalendarDataSource.
(0081494)
hgbot (developer)
2015-11-05 09:59

Repository: erp/pmods/org.openbravo.module.resources
Changeset: e17cce4891b84cf9f7a751a55872971c3c205e67
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Nov 05 09:51:09 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.resources/rev/e17cce4891b84cf9f7a751a55872971c3c205e67 [^]

fixed bug 31358: NPE in Resource Reservation widget starting from 3.0PR15Q3

  DefaultJsonDataService assumes its life cycle is always managed by container,
  so it is safe to use dependency injection directly using @Inject annotations.

  The problem was ResourcesCalendarDataSource.getJsonDataService was creating an
  anonymous class extending DefaultJsonDataService and it was being directly
  instantiated. This caused injections points to be resolved as null and a NPE
  was thrown.

  The solution is to replace this code by an actual class extending DefaultJsonDataService
  managed by the container.

---
M src/org/openbravo/module/resources/calendar/ResourcesCalendarDataSource.java
A src/org/openbravo/module/resources/calendar/ResourcesCalendarDataService.java
---
(0081495)
alostale (manager)
2015-11-05 10:03

Published new Resource and Reservation Management version 1.0.100 [1] solving this issue.

[1] http://centralrepository.openbravo.com/openbravo/org.openbravo.forge.ui/sso/ForgeModuleVersionDetail?moduleVersionId=963DB4F060A64F208496A61B9E40B950 [^]
(0081624)
caristu (manager)
2015-11-09 14:09

Code review + testing OK.

Using version 1.0.100, the widget is added without errors into the Workspace.

- Issue History
Date Modified Username Field Change
2015-11-04 16:46 ngarcia New Issue
2015-11-04 16:46 ngarcia Assigned To => Triage Finance
2015-11-04 16:46 ngarcia Resolution time => 1447282800
2015-11-04 16:47 ngarcia Issue Monitored: networkb
2015-11-04 19:32 vmromanos Regression date => 2015-03-17
2015-11-04 19:32 vmromanos Regression introduced by commit => https://code.openbravo.com/erp/devel/main/rev/7c5e3781c593 [^]
2015-11-04 19:32 vmromanos Regression level => Production - Confirmed Stable
2015-11-04 19:32 vmromanos Note Added: 0081487
2015-11-04 19:32 vmromanos Assigned To Triage Finance => platform
2015-11-04 19:40 vmromanos Project Modules => Openbravo ERP
2015-11-04 19:40 vmromanos Modules => JSON Datasource
2015-11-04 19:40 vmromanos Regression introduced in release => 3.0PR15Q3
2015-11-04 19:40 vmromanos Triggers an Emergency Pack => No
2015-11-04 19:40 vmromanos Category Reservations module => A. Platform
2015-11-05 09:08 alostale Relationship added caused by 0029782
2015-11-05 09:10 alostale Regression date 2015-03-17 => 2015-05-05
2015-11-05 09:10 alostale Regression introduced by commit https://code.openbravo.com/erp/devel/main/rev/7c5e3781c593 [^] => https://code.openbravo.com/erp/devel/pi/rev/d3e797b23239b892edc7b2140f69b7557632936f [^]
2015-11-05 09:27 alostale Project Openbravo ERP => Modules
2015-11-05 09:28 alostale Regression introduced in release 3.0PR15Q3 =>
2015-11-05 09:28 alostale Category A. Platform => Resource and Reservation Management for Contracts
2015-11-05 09:29 alostale Category Resource and Reservation Management for Contracts => Reservations module
2015-11-05 09:30 alostale Review Assigned To => caristu
2015-11-05 09:38 alostale Note Added: 0081492
2015-11-05 09:59 hgbot Checkin
2015-11-05 09:59 hgbot Note Added: 0081494
2015-11-05 09:59 hgbot Status new => resolved
2015-11-05 09:59 hgbot Resolution open => fixed
2015-11-05 09:59 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.module.resources/rev/e17cce4891b84cf9f7a751a55872971c3c205e67 [^]
2015-11-05 10:03 alostale Note Added: 0081495
2015-11-05 10:06 alostale Assigned To platform => alostale
2015-11-05 12:08 alostale Relationship added caused by 0031371
2015-11-05 12:36 alostale Relationship added related to 0031373
2015-11-09 14:09 caristu Note Added: 0081624
2015-11-09 14:09 caristu Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker