Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to locate static metamodel field

What does this error mean?

 07:48:42,807 ERROR [org.hibernate.jpa.internal.metamodel.MetadataContext] (ServerService Thread Pool -- 25) HHH015011: Unable to locate static metamodel field : com.lm.model.UserId_#id 

This is how that field is defined

@Embeddable
public class UserId implements Identifier<UserId> {
    @Column( name = "user_id", columnDefinition = "uuid" )
    protected UUID id;                                                                                                                                                                     
like image 467
xenoterracide Avatar asked Apr 04 '14 12:04

xenoterracide


2 Answers

I stumbled across the same issue. I don't think it is a bug. This error occurs when you add/edit your entity model, for example a new field was added in the entity class.

To over come this error, you have to regenerate the meta model. Clean your project and build it gain.

If using Maven run maven clean. (provided you POM is configured correctly so that it regenerate the meta model which the JPA needs).

like image 122
Sanjeev Avatar answered Sep 16 '22 16:09

Sanjeev


It seems to be bug in Hibernate itself. It is described here: https://hibernate.atlassian.net/browse/HHH-8712

like image 39
Augustin Ghauratto Avatar answered Sep 19 '22 16:09

Augustin Ghauratto