org.hibernate.HibernateException: Error while accessing enum.values(): class com.mksoft.fbautomate.d
- by Misha Koshelev
This error is driving me nuts!!!
Caused by:  java.lang.NoSuchMethodException: com.mksoft.fbautomate.domain.Account$Type.values()
The same exact class works fine in a separate Groovy file.
Any ideas/help much appreciated.
Most confusing...
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Enum.html
has no values() method!
Here is my class:
@Entity class Account {
  @Id @GeneratedValue(strategy=GenerationType.AUTO)
  public Long id
  enum Type {MYVALUE}
  @Enumerated(EnumType.STRING)
  public Type type
  public String email
  //  @org.hibernate.annotations.Type(type="encryptedString")
  public String pass
  public String fullName
  String toString() { "type:\""+type+"\",email:\""+email+"\""+",fullName=\""+fullName+"\"" }
}
Thank you!
Misha