Issue number:
2988
Reviewed by:-
Toplink team
Problem description:-
The IllegalArgumentException throws during the message formatting.
The bug can be reproduced by the following example,
String ejbqlString =
"SELECT e.lastName, e.firstName FROM Employee e WHERE e.lastName = ?1 ";
Query query = em.createQuery(ejbqlString);
query.setParameter(1, "{04E4B7FA-E2F9-11DB-B2B2-000E0C09979A}");
List result = query.getResultList();
The code has been fixed in the method formatMessage of the class AbstractSessionLog. The logic to determine the message whether or not needs to be formatted has been changed to:
The message will be formatted if it has parameters passed around and contains special string "{0".
Test:-
entity-persistence-tests
Cheers, kyle