Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035654Openbravo ERP00. Application dictionarypublic2017-03-30 14:132017-09-21 16:49
eduardo_Argal 
caristu 
highmajorsometimes
closedfixed 
5
 
3.0PR17Q4 
alostale
Core
No
0035654: module validation fails for killable BG processes using CDI
Export database task failing when trying to modify a BG process to be killable in case its classes make use of ie CDI.

The required java class uses weld and that makes export.database fail due to a validation
install org.openbravo.retail.autocancelreservation module
set is as in development = 'Y'
go to dictionary and flag as killable VoidLayawaysBGProcess (Report and Process)
export database

Find error attached.

Process do implement killable interface
No tags attached.
related to feature request 00297513.0PR15Q3 closed rafademiguel It would be nice to have the ability to kill a background process 
txt KillableProcessError.txt (3,155) 2017-03-30 14:13
https://issues.openbravo.com/file_download.php?file_id=10624&type=bug
Issue History
2017-03-30 14:13eduardo_ArgalNew Issue
2017-03-30 14:13eduardo_ArgalAssigned To => platform
2017-03-30 14:13eduardo_ArgalFile Added: KillableProcessError.txt
2017-03-30 14:13eduardo_ArgalModules => Core
2017-03-30 14:13eduardo_ArgalTriggers an Emergency Pack => No
2017-03-30 16:04shuehnerIssue Monitored: shuehner
2017-03-30 16:05shuehnerNote Added: 0095718
2017-04-07 08:58alostaleSummaryExport database task failing when trying to modify a BG process to be killable => module validation fails for killable BG processes using CDI
2017-04-07 08:58alostaleDescription Updatedbug_revision_view_page.php?rev_id=14975#r14975
2017-04-07 08:59alostaleStatusnew => acknowledged
2017-09-06 13:03caristuRelationship addedrelated to 0029751
2017-09-06 17:11hgbotCheckin
2017-09-06 17:11hgbotNote Added: 0098870
2017-09-06 17:11hgbotStatusacknowledged => resolved
2017-09-06 17:11hgbotResolutionopen => fixed
2017-09-06 17:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b8e85d42ebbcbce3c676d8b625f35b9a12fc6db0 [^]
2017-09-06 17:20caristuAssigned Toplatform => caristu
2017-09-06 17:20caristuReview Assigned To => alostale
2017-09-08 12:02alostaleNote Added: 0098903
2017-09-08 12:02alostaleStatusresolved => closed
2017-09-08 12:02alostaleFixed in Version => 3.0PR17Q4
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099365

Notes
(0095718)
shuehner   
2017-03-30 16:05   
Looks like export.db classpath is not the full project.class.path causing Class.forName to fail to the some injection related class
(0098870)
hgbot   
2017-09-06 17:11   
Repository: erp/devel/pi
Changeset: b8e85d42ebbcbce3c676d8b625f35b9a12fc6db0
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Sep 06 17:09:53 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b8e85d42ebbcbce3c676d8b625f35b9a12fc6db0 [^]

fixes bug 35654: module validation fails for killable BG processes using CDI

 The DatabaseValidator class uses Class.forName(className) to retrieve the class of the background processes and then determine if they implement the KillableProcess interface.

 When using that method, the class is also initialized. This initialization failed in some cases with a java.lang.NoClassDefFoundError if the class was making use of weld (CDI).

 As we don't need to initialize the background process class to determine if it implements the KillableProcess interface, we replace the usage of Class.forName(className) with Class.forName(className, false, classLoader). With the second argument the class initialization is prevented.

---
M src/org/openbravo/service/system/DatabaseValidator.java
---
(0098903)
alostale   
2017-09-08 12:02   
reviewed + tested
(0099365)
hudsonbot   
2017-09-21 16:49   
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/9750b78d3e5c [^]
Maturity status: Test