On Jan 29, 2013, at 4:04 PM, "Howard W. Smith, Jr." <[email protected]> 
wrote:

> On Tue, Jan 29, 2013 at 6:08 PM, Konstantin Kolinko
> <[email protected]>wrote:
> 
>> 2013/1/30 Caldarale, Charles R <[email protected]>:
>>>> From: Howard W. Smith, Jr. [mailto:[email protected]]
>>>> Subject: Latest-version TomEE 1.5.2-SNAPSHOT (Tomcat 7.0.34?) just died
>> on me, nothing in server logs
>>> 
>>>> Sending this to tomee/openejb and tomcat user mailing lists.
>>> 
>>> Cross-posting is really frowned upon.
>>> 
>>>> Jan 29, 2013 10:27:25 AM org.apache.catalina.core.StandardWrapperValve
>> event
>>>> SEVERE: Servlet.service() for servlet [Push Servlet] in context with
>> path
>>>> [/mcmsweb] threw exception
>>>> java.lang.NumberFormatException: For input string: "(TomEE)/7"
>>>> at java.lang.NumberFormatException.forInputString(Unknown Source)
>>>> at java.lang.Integer.parseInt(Unknown Source)
>>>> at java.lang.Integer.valueOf(Unknown Source)
>>>> at
>> org.atmosphere.container.Tomcat7CometSupport.bz51881(Tomcat7CometSupport.java:141)
>>> 
>>> Sure looks like an Atmosphere problem from here...
>>> 
>> 
>> +1.
>> 
>> 
>> https://github.com/Atmosphere/atmosphere/blob/master/modules/cpr/src/main/java/org/atmosphere/container/Tomcat7CometSupport.java#L129
>> 
>> That "bz51881" method... an example of what you should never do...
>> 
>> It tries to parse a version string to "workaround" a bug that was
>> properly fixed more than a year ago, and fails horribly.
>> 
>> It is a normal practice to modify the "server info" value, e.g. [1].
>> It is useless to rely on it. It is no wonder that the one used by
>> TomEE is different from Tomcat.
>> 
>> [1] http://tomcat.apache.org/tomcat-7.0-doc/security-howto.html#Valves
>> 
>> 
>> Best regards,
>> Konstantin Kolinko
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
> TomEE committers, per Konstantin's response above, can you let me know, if
> this is TomEE or Atmosphere issue?

Looks like an Atmosphere issue.  It's basically doing:

String[] tomcatVersion =  
config.getServletContext().getServerInfo().substring(14).split("\\.");

The getServerInfo() method was updated to add "(TomEE)" in there so people can 
have more info on the flavor of Tomcat they're using.


-David

Reply via email to