Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036079Openbravo ERPA. Platformpublic2017-05-23 16:302017-06-15 14:29
ngarcia 
caristu 
immediateminoralways
closedfixed 
5
 
3.0PR17Q2.13.0PR17Q2.1 
AugustoMauch
Core
Production - Confirmed Stable
2016-10-14
3.0PR17Q1
https://code.openbravo.com/erp/devel/pi/rev/89f0eb718711 [^]
No
0036079: inconsistent process (ad_process) configuration generates invalid web.xml
Having defined an inconsistent/incorrect configuration for a process (ad_process) can generate an invalid web.xml which stops Tomcat to be started.

Example of incorrect definition:
  * Report = 'N'
  * UI Pattern = Standard
  * record in AD_MODEL_OBJECT_MAPPING with object_type = 'S'
As System Admin role:
   1. Set Core In Development
   2. Go to Report and Process Window and select 'Print Requisition' report
   3. Set it as Report = 'N'
   4. Make any change in the Process Class tab and undo it in order the update the updated column (thus the web.xml file will be generated again)
   5. Execute in DB: update ad_model_object set object_type = 'S' where ad_model_object_id = '1004400018'
   6. Compile
   7. Try to restart Tomcat and check the following error is raised:
      Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/openbravo]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name R1004400018
    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3425)

      Check in build/javasqlc/src/web.xml file that there is an <servlet-mapping> entry for the 1004400018 ad_model_object but there is not the <servlet-class> entry
No tags attached.
blocks defect 0036074 closed alostale inconsistent process (ad_process) configuration generates invalid web.xml 
Issue History
2017-05-24 10:28alostaleTypedefect => backport
2017-05-24 10:28alostaleTarget Version => 3.0PR17Q2
2017-05-24 10:35alostaleAssigned Toplatform => alostale
2017-05-24 16:14alostaleTarget Version3.0PR17Q2 => 3.0PR17Q2.1
2017-06-15 11:24hgbotCheckin
2017-06-15 11:24hgbotNote Added: 0097415
2017-06-15 11:24hgbotStatusscheduled => resolved
2017-06-15 11:24hgbotResolutionopen => fixed
2017-06-15 11:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q2.1/rev/977e2c53bf1e9c9cb84ed4619934b56cebd46f37 [^]
2017-06-15 11:24caristuAssigned Toalostale => caristu
2017-06-15 11:25caristuReview Assigned Tocaristu => AugustoMauch
2017-06-15 14:29AugustoMauchNote Added: 0097421
2017-06-15 14:29AugustoMauchStatusresolved => closed
2017-06-15 14:29AugustoMauchFixed in Version => 3.0PR17Q2.1

Notes
(0097415)
hgbot   
2017-06-15 11:24   
Repository: erp/backports/3.0PR17Q2.1
Changeset: 977e2c53bf1e9c9cb84ed4619934b56cebd46f37
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jun 15 11:24:17 2017 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR17Q2.1/rev/977e2c53bf1e9c9cb84ed4619934b56cebd46f37 [^]

fixed bug 36079: inconsistent ad_process generates invalid web.xml

  Some invalid defintions of ad_process generated invalid web.xml because mapping
  was included referencing to a class that was filtered out, causing Tomcat to
  refuse to start.

  It has been fixed by adding to the query that retrieves mappings the same restrictions
  already added to the query looking for classes, so mappings will be obtained
  only if class is present.

---
M src-wad/src/org/openbravo/wad/Wad_data.xsql
---
(0097421)
AugustoMauch   
2017-06-15 14:29   
Code reviewed and verified