Bug 63050 - NumberFormatException depending on language and logging level
Summary: NumberFormatException depending on language and logging level
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 9
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 9.0.14
Hardware: PC All
: P2 major (vote)
Target Milestone: -----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-31 21:34 UTC by evernat
Modified: 2019-01-04 09:42 UTC (History)
0 users



Attachments
patch (4.26 KB, text/plain)
2018-12-31 21:45 UTC, evernat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description evernat 2018-12-31 21:34:49 UTC
To reproduce the exception:
1. set a particular language, for example "set JAVA_OPTS=-Duser.language=fr"
2. set logging level, for example ".level = FINE" in conf/logging.properties
3. start Tomcat

Patch is pending.

Trace:
31-Dec-2018 22:26:31.587 GRAVE [main] org.apache.catalina.startup.Catalina.start Le composant Server requis n'a pas démarré, en conséquence Tomcat ne peut démarrer.
 org.apache.catalina.LifecycleException: Echec de démarrage du composant [org.apache.catalina.mapper.MapperListener@6dc17b83]
        at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:933)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:637)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: java.lang.IllegalArgumentException: can't parse argument number: 2]
        at java.text.MessageFormat.makeFormat(MessageFormat.java:1429)
        at java.text.MessageFormat.applyPattern(MessageFormat.java:479)
        at java.text.MessageFormat.<init>(MessageFormat.java:362)
        at org.apache.tomcat.util.res.StringManager.getString(StringManager.java:163)
        at org.apache.catalina.mapper.MapperListener.registerContext(MapperListener.java:387)
        at org.apache.catalina.mapper.MapperListener.registerHost(MapperListener.java:307)
        at org.apache.catalina.mapper.MapperListener.startInternal(MapperListener.java:113)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        ... 11 more
Caused by: java.lang.NumberFormatException: For input string: "2]"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:580)
        at java.lang.Integer.parseInt(Integer.java:615)
        at java.text.MessageFormat.makeFormat(MessageFormat.java:1427)
        ... 18 more
Comment 1 evernat 2018-12-31 21:41:21 UTC
Patch for this exception and others like this one:
https://github.com/apache/tomcat/pull/135
Comment 3 Remy Maucherat 2018-12-31 22:44:00 UTC
I made the changes in poeditor, but you could have done it there just as well. The changes will be merged in Tomcat before the next build.
Comment 4 Mark Thomas 2019-01-04 09:42:24 UTC
Updates have been imported into 9.0.x for 9.0.15 onwards.