Bug 1298521

Summary: [GSS](6.4.z) UnknownFormatConversionException is thrown if a customer TimerInfoObject contains illegal format characters as toString() output
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: wfink
Component: EJBAssignee: wfink
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: bmaxwell, david.lloyd, jbilek, msochure, pjurak, ppenicka
Target Milestone: CR1   
Target Release: EAP 6.4.14   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-23 08:24:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1401452    

Description wfink 2016-01-14 10:29:52 UTC
Description of problem:

A timer execution can fail with  exception if the Timers Info object (which is custom code) contains characters which are relevant for String.format replacement:
java.util.UnknownFormatConversionException: Conversion = '!'
        at java.util.Formatter.checkText(Formatter.java:2547)
        at java.util.Formatter.parse(Formatter.java:2533)
        at java.util.Formatter.format(Formatter.java:2469)
        at java.util.Formatter.format(Formatter.java:2423)
        at java.lang.String.format(String.java:2792)
        at org.jboss.as.ejb3.timerservice.TimerImpl.toString(TimerImpl.java:568)
        at java.lang.String.valueOf(String.java:2849)
        at java.lang.StringBuilder.append(StringBuilder.java:128)
        at org.jboss.as.ejb3.timerservice.TimerServiceImpl$TimerCreationTransactionSynchronization.afterCompletion(TimerServiceImpl.java:1106)

How reproducible:
Create a timer which include an InfoObject that contains "%!" if toString() is called.
Enable DEBUG/TRACE for the ejb timers or force a failure in timeout is invoked.
Both should use the toString() method and fail.

Comment 2 wfink 2016-01-14 18:23:42 UTC
PR send: https://github.com/jbossas/jboss-eap/pull/2683

Comment 4 Jiří Bílek 2017-02-22 17:09:54 UTC
Verified with EAP 6.4.14.CP.CR1

Comment 5 Petr Penicka 2017-03-23 08:24:06 UTC
Released with EAP 6.4.14 on March 14 (ZIPs) and March 22 (RPMs).