[hibernate-users] org.hibernate.HibernateException: Error while accessing enum.values(): class com.mksoft.fbautomate.domain.Account$Type
Misha Koshelev
misha680 at gmail.com
Fri Jun 18 17:34:49 EDT 2010
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
p.s. for the record if I move the enum _outside_ the entity class like
enum type {MYVALUE}
@Entity class Account {
...
}
all is fine. Any ideas??? Thank you. I am using Gradle.
More information about the hibernate-users
mailing list