I have the following configuration:
I had the following
import org.springframework.data.annotation.Id;
Naturally, it should be:
import javax.persistence.Id;
Thanks to @JB Nizet
try this
@Column(name="geonameid",unique=true,nullable=false)
I faced the same error.I solved it and figured out i didn't put @Id annotations in id field in my Entity class.
@Entity
@Table(name="geonames")
public class Geoname implements Serializable {
@Column(name="geonameid")
private Long geonameid = null;
}