-
Bug
-
Resolution: Done
-
Critical
-
2.0.1.GA
-
None
-
None
-
Release Notes
RESTEasy logging fails with an exception in certain situations. This is caused by the slf4j -> RESTEasy logging migration.
RESTEasy logging uses MessageFormat.format() for formatting log messages. MessageFormat does not allow the "{}" construct. However, there are logging messages spread around the RESTEasy code which use the construct, causing the following exception instead of producing the log message.
Caused by: java.lang.IllegalArgumentException: can't parse argument number
at java.text.MessageFormat.makeFormat(MessageFormat.java:1339) [:1.6.0_21]
at java.text.MessageFormat.applyPattern(MessageFormat.java:458) [:1.6.0_21]
at java.text.MessageFormat.<init>(MessageFormat.java:350) [:1.6.0_21]
at java.text.MessageFormat.format(MessageFormat.java:811) [:1.6.0_21]
at org.jboss.resteasy.logging.impl.Log4jLogger.warn(Log4jLogger.java:110) [:]
at org.jboss.resteasy.util.TypeConverter.getType(TypeConverter.java:83) [:]
at org.jboss.resteasy.plugins.providers.DefaultTextPlain.readFrom(DefaultTextPlain.java:38) [:]
at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:105) [:]
at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.read(GZIPDecodingInterceptor.java:46) [:]
at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:108) [:]
at org.jboss.resteasy.core.messagebody.ReaderUtility.doRead(ReaderUtility.java:111) [:]
... 31 more
List of files containing the "{}" construct follows:
resteasy-guice/src/main/java/org/jboss/resteasy/plugins/guice/GuiceResteasyBootstrapServletContextListener.java
resteasy-guice/src/main/java/org/jboss/resteasy/plugins/guice/ModuleProcessor.java
providers/multipart/src/test/java/org/jboss/resteasy/test/providers/multipart/SimpleMimeMultipartResource.java
providers/yaml/src/main/java/org/jboss/resteasy/plugins/providers/YamlProvider.java
providers/test-all-jaxb/src/test/java/org/jboss/resteasy/test/providers/jaxb/JAXBCache.java
providers/jaxb/src/test/java/org/jboss/resteasy/test/providers/jaxb/JAXBCache.java
resteasy-jaxrs/src/main/java/org/jboss/resteasy/util/TypeConverter.java
resteasy-jaxrs/src/main/java/org/jboss/resteasy/core/ResourceLocator.java