OK - Never mind. getMethods is what I was thinking of. getDeclaredMethods is indeed only supposed to return methods from the subclass.
Sent from my iPad On Oct 9, 2012, at 3:27 PM, Ralph Goers <[email protected]> wrote: > I will look at your fix tonight when I have more than my iPad. > > I'm not sure this is a bug now that I see what it is. IIRC, this might be > correct. I believe there is another method that only returns the methods in > the actual class, not from super classes also. > > Ralph > > Sent from my iPad > > On Oct 9, 2012, at 2:26 PM, Gary Gregory <[email protected]> wrote: > >> Here is what converterClass.getDeclaredMethods() returns in >> PatternParser.createConverter(String, StringBuilder, >> Map<String,Class<PatternConverter>>, List<String>) line: 428: >> >> [ >> public void >> org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter.format(org.apache.logging.log4j.core.LogEvent,java.lang.StringBuilder), >> >> >> public static >> org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter >> org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter.newInstance(java.lang.String[]), >> >> >> public static >> org.apache.logging.log4j.core.pattern.ThrowablePatternConverter >> org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter.newInstance(java.lang.String[]) >> ] >> >> This is a bug in Oracle Java 1.6.0_017 as noted in >> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6815786 >> >> This is quite a pickle and still broken in 1.6.0_035! >> >> ARG! GRR! Icing on the $#$^& cake: >> >> "Evaluation: Will investigate. Posted Date : 2010-07-22 01:25:56.0" >> >> Workaround anyone? >> >> Gary >> >> On Tue, Oct 9, 2012 at 9:55 AM, Ralph Goers <[email protected]> >> wrote: >>> This is the same error you saw before, which makes no sense to me since >>> ExtendedThrowablePatternConverter and RootThrowablePatternConverter do not >>> contain multiple newInstance methods. >>> >>> Ralph >>> >>> On Oct 9, 2012, at 6:00 AM, Gary Gregory wrote: >>> >>>> I am seeing these failures. Clues and/or fixes appreciated >>>> >>>> Running org.apache.logging.log4j.core.pattern.ExtendedThrowableTest >>>> 2012-10-09 08:42:12,906 ERROR Class class >>>> org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter >>>> cannot contain multiple newInstance methods >>>> 2012-10-09 08:42:12,906 ERROR Unrecognized conversion specifier [xEx] >>>> starting at position 78 in conversion pattern. >>>> 2012-10-09 08:42:12,910 WARN Unable to instantiate WindowsAnsiOutputStream >>>> 2012-10-09 08:42:12,911 ERROR Class class >>>> org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter >>>> cannot contain multiple newInstance methods >>>> 2012-10-09 08:42:12,911 ERROR Unrecognized conversion specifier [xEx] >>>> starting at position 73 in conversion pattern. >>>> 2012-10-09 08:42:13,050 WARN Unable to instantiate WindowsAnsiOutputStream >>>> 2012-10-09 08:42:13,055 WARN No Loggers were configured, using default >>>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.737 sec >>>> <<< FAILURE! >>>> Running org.apache.logging.log4j.core.pattern.MapPatternConverterTest >>>> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.104 sec >>>> Running org.apache.logging.log4j.core.pattern.MarkerPatternConverterTest >>>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.106 sec >>>> Running org.apache.logging.log4j.core.pattern.NameAbbreviatorTest >>>> Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.094 sec >>>> Running org.apache.logging.log4j.core.pattern.PatternParserTest >>>> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.441 sec >>>> Running org.apache.logging.log4j.core.pattern.RegexReplacementConverterTest >>>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.414 sec >>>> Running org.apache.logging.log4j.core.pattern.RegexReplacementTest >>>> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.46 sec >>>> Running >>>> org.apache.logging.log4j.core.pattern.RootThrowablePatternConverterTest >>>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.114 sec >>>> Running org.apache.logging.log4j.core.pattern.RootThrowableTest >>>> 2012-10-09 08:42:18,264 ERROR Class class >>>> org.apache.logging.log4j.core.pattern.RootThrowablePatternConverter cannot >>>> contain multiple newInstance methods >>>> 2012-10-09 08:42:18,265 ERROR Unrecognized conversion specifier [rEx] >>>> starting at position 78 in conversion pattern. >>>> 2012-10-09 08:42:18,270 WARN Unable to instantiate WindowsAnsiOutputStream >>>> 2012-10-09 08:42:18,273 ERROR Class class >>>> org.apache.logging.log4j.core.pattern.RootThrowablePatternConverter cannot >>>> contain multiple newInstance methods >>>> 2012-10-09 08:42:18,273 ERROR Unrecognized conversion specifier [rEx] >>>> starting at position 73 in conversion pattern. >>>> 2012-10-09 08:42:18,386 WARN Unable to instantiate WindowsAnsiOutputStream >>>> 2012-10-09 08:42:18,390 WARN No Loggers were configured, using default >>>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.532 sec >>>> <<< FAILURE! >>>> >>>> Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500) >>>> Maven home: C:\Java\apache-maven-3.0.4\bin\.. >>>> Java version: 1.6.0_35, vendor: Sun Microsystems Inc. >>>> Java home: C:\Program Files\Java\jdk1.6.0_35\jre >>>> Default locale: en_US, platform encoding: Cp1252 >>>> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" >>>> >>>> -- >>>> E-Mail: [email protected] | [email protected] >>>> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0 >>>> Spring Batch in Action: http://bit.ly/bqpbCK >>>> Blog: http://garygregory.wordpress.com >>>> Home: http://garygregory.com/ >>>> Tweet! http://twitter.com/GaryGregory >> >> >> >> -- >> E-Mail: [email protected] | [email protected] >> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0 >> Spring Batch in Action: http://bit.ly/bqpbCK >> Blog: http://garygregory.wordpress.com >> Home: http://garygregory.com/ >> Tweet! http://twitter.com/GaryGregory
