Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. ConstantExpression.printSQL() has thrown a ClassCastException
    EclipseLink Core
    1
    0
    0
  2. EnumTypeConverter.convertObjectValueToDataValue() has thrown a ClassCastException
    EclipseLink Core
    3
    0
    0

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Enum
2 matching frames hidden
    at org.eclipse.persistence.internal.expressions.QueryKeyExpression.getFieldValue(QueryKeyExpression.java:420)
    at org.eclipse.persistence.internal.expressions.ConstantExpression.printSQL(ConstantExpression.java:152)
    at org.eclipse.persistence.expressions.ExpressionOperator.printDuo(ExpressionOperator.java:2239)
    at org.eclipse.persistence.internal.expressions.CompoundExpression.printSQL(CompoundExpression.java:286)
15 frames hidden

External results for this pattern (1)

  1. java.lang.String cannot be cast to java.lang.Enum Query: ReadAllQuery(name="MyEntity.findEnum" referenceClass=MyEntity jpql="SELECT myEntity FROM MyEntity myEntity WHERE myEntity.myEnum = 'ENUM'")
    Show stack trace