org.hibernate.HibernateException: Error while accessing enum.values(): class com.mksoft.fbautomate.d

Posted by Misha Koshelev on Stack Overflow See other posts from Stack Overflow or by Misha Koshelev
Published on 2010-06-18T03:08:05Z Indexed on 2010/06/18 3:13 UTC
Read the original article Hit count: 295

Filed under:
|
|
|
|

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

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate