Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007493Openbravo ERPA. Platformpublic2009-02-11 11:042009-04-22 00:00
schmidtm 
alostale 
normalminoralways
closedfixed 
5
2.40 
2.50beta 
Core
No
0007493: Application can not be deployed on Servlet 2.4-compliant webcontainer like Glassfish v3
While migrating OpenBravo to Glassfish v3 (prelude release) we discovered this exception on deployment:

java.lang.IllegalArgumentException: Invalid URL Pattern: [
       /ad_callouts/SL_ProductionPlan_Conversion.html
   ]
       at com.sun.enterprise.deployment.node.web.ServletMappingNode.setElementValue(ServletMappingNode.java:88)
       at com.sun.enterprise.deployment.node.SaxParserHandler.endElement(SaxParserHandler.java:423)

This is because our com.sun.enterprise.util.net.URLPattern.isValid() enforces the Servlet 2.4 spec:

SRV.13.2 Rules for Processing the Deployment Descriptor:

"URI paths specified in the deployment descriptor are assumed to be in URLdecoded
form. The containers must inform the developer with a descriptive
error message when URL contains CR(#xD) or LF(#xA). The containers must
preserve all other characters including whitespace in URL."

This constraint has been added to Servlet-2.4.

Most Servlet-2.3 implementations like tomcat are more forgiving by swalloing this in web.xml:

<url-pattern>
       /ad_callouts/SL_ProductionPlan_Conversion.html
</url-pattern>

Whereas for GFv3 and other 2.4-compliant webcontainers you have to modify this into:

<url-pattern>/ad_callouts/SL_ProductionPlan_Conversion.html</url-pattern>

I bet you don't write these aprox. 2000 servlet-mappings by hand, therefore it should be no big deal
to write them without CR/NL given that it's still backward-compatible and should cause no other grieve.

I've added a patch for your reference.

cheers,

Matthias Schmidt
Sun Microsystems, Inc.

No tags attached.
gz web.xml.diff.gz (49,950) 2009-02-11 11:04
https://issues.openbravo.com/file_download.php?file_id=828&type=bug
patch wad-rv24.patch (946) 2009-02-11 12:58
https://issues.openbravo.com/file_download.php?file_id=829&type=bug
Issue History
2009-02-11 11:04schmidtmNew Issue
2009-02-11 11:04schmidtmAssigned To => rafaroda
2009-02-11 11:04schmidtmFile Added: web.xml.diff.gz
2009-02-11 11:05rafarodaAssigned Torafaroda => jpabloae
2009-02-11 11:34jpabloaeStatusnew => acknowledged
2009-02-11 12:58jpabloaeFile Added: wad-rv24.patch
2009-02-11 12:59jpabloaeNote Added: 0013341
2009-02-11 12:59jpabloaeAssigned Tojpabloae => alostale
2009-02-18 11:43alostaleSeveritycritical => minor
2009-02-20 08:49svnbotCheckin
2009-02-20 08:49svnbotNote Added: 0013783
2009-02-20 08:49svnbotStatusacknowledged => resolved
2009-02-20 08:49svnbotResolutionopen => fixed
2009-02-20 08:49svnbotsvn_revision => 13443
2009-04-21 10:54psarobeStatusresolved => closed
2009-04-22 00:00anonymoussf_bug_id0 => 2777926

Notes
(0013341)
jpabloae   
2009-02-11 12:59   
You are right, this is wrong. I attach a patch that should fix it (wad-rv24.patch). I think this should be fixed in trunk and in r2.40.

I reassign this issue to the WAD maintainer (alostale).
(0013783)
svnbot   
2009-02-20 08:49   
Repository: openbravo
Revision: 13443
Author: alostale
Date: 2009-02-20 08:49:06 +0100 (Fri, 20 Feb 2009)

fixed bug 0007493: Application can not be deployed on Servlet 2.4-compliant webcontainer like Glassfish v3

---
U trunk/src-wad/src/org/openbravo/wad/web.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=13443&sc=1 [^]