Alex the Rocker created TOMEE-410:
-------------------------------------

             Summary: web.xml validation rejects load-on-startup values having 
extraneous white spaces
                 Key: TOMEE-410
                 URL: https://issues.apache.org/jira/browse/TOMEE-410
             Project: TomEE
          Issue Type: Bug
          Components: Compliance Checks
    Affects Versions: 1.0.0
         Environment: Tested on Windows 2008 R2 SP1 with ORACLE Java 7 Update 7 
64-bit Windows version
            Reporter: Alex the Rocker


The web.xml validation of TomEE/TomEE+ doesn't behaves like Tomcat 7.0.27's 
when there is a white space in the load-on-startup value of a servlet 
declaration, like this one:

      <load-on-startup> 1 </load-on-startup>

In this case, the web application is not registered by TomEE+, and have this 
stack trace in catalina.out:

Caused by: org.apache.tomee.catalina.TomEERuntimeException: 
org.apache.openejb.OpenEJBException: Cannot unmarshall the web.xml file: 
file:/app/apache-tomee-webprofile-1.0.0/webapps/myApp/WEB-INF/web.xml: 
java.lang.NumberFormatException: For input string: " 1 "
        at 
org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:1112)
        at 
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:627)
        at 
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:588)
        at 
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:117)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)


Please note that the problem was reproduced with Apache TomEE+ 1.0.0 on Windows 
with 64-bit JDK 7 update 7 on Windows 2008 R2 SP1.
Please also note that the web application was based on Servlet 2.5 level of 
compliance.

Using the same operating system & JDK version, there is not such issue with 
Tomcat 7.0.27.

Also this issue cannot be reproduce using IBM WebSphere 8.0.0.1 or ORACLE 
WebLogic 12x.

I don't know what Servlet 2.5 specification says about load-on-startup values, 
but the impact of this TomEE/TomeEE+ behaviour is that some applications 
running on Tomcat / WebSphere / WebLogic cannot be deployed Out Of The Box, 
which may slow down TomEE adoption.

As such, I don't think it's a minor issue. But we never know, perhaps TomEE 
developers will says that TomEE is strictly implementing Servlet specification 
and other app servers don't :)

Regards,
Alex




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to