diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java index 40394b0ea..4a0032bd2 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java @@ -1315,7 +1315,7 @@ public class JPQLExpressionBuilder return factory.newLiteral(value, Literal.TYPE_UNKNOWN); } catch (NoSuchFieldException nsfe) { throw parseException(EX_USER, "no-field", - new Object[]{ className, fieldName }, nsfe); + new Object[]{ c.getName(), fieldName }, nsfe); } catch (Exception e) { throw parseException(EX_USER, "unaccessible-field", new Object[]{ className, fieldName }, e);