org.hibernate.QueryException: Could not format constant value to SQL literal: bug.TestEnum.VALUE [FROM bug.TestEntity t WHERE t.testEnum = bug.TestEnum.VALUE]

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Alex Stockinger
, 2 years ago
could not resolve property: bs of: com.example.entities.B [SELECT a FROM com.example.entities.A a WHERE NOT a.bs IS EMPTY]
via Stack Overflow by user3073234
, 2 years ago
could not resolve property: testname of: com.web_application.RunEntity [SELECT r FROM com.web_application.RunEntity r WHERE r.testname = :testname AND r.testNumber = :testnumber AND r.environment = :environment AND r.source = :source]
via Stack Overflow by Tobias
, 2 years ago
could not resolve property: Id of: pizzahibernate.model.Pizza [SELECT SUM(Anz_Normal*Preis_normal+Preis_family*Anz_family) from pizzahibernate.model.Bestellung,pizzahibernate.model.Pizza p,pizzahibernate.model.Kunde where p.Id = pizza and Email = 'a@f']
via Stack Overflow by Amila Iddamalgoda
, 2 years ago
query must begin with SELECT or FROM: update [ update com.shop.domain.User set registered = '1' where user_activation_key = '04c42f1c-a55d-49cd-8bde-8d340f054d76']
org.hibernate.QueryException: Could not format constant value to SQL literal: bug.TestEnum.VALUE [FROM bug.TestEntity t WHERE t.testEnum = bug.TestEnum.VALUE]
at org.hibernate.QueryException.generateQueryException(QueryException.java:137)

Users with the same issue

8 times, 7 months ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.