views:

105

answers:

1

Using Java, Hibernate, and MySQL I persist instances of a class like this using the Hibernate support from Spring.

@Entity
public class MyEntity implements Serializable {

  private Long id;

  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }
}

This generally works fine. But now and then when trying to persist such an entity, I get this:

java.sql.SQLException: PROCEDURE schema.identity does not exist

The underlying MySQL error is:

SQL Error: 1305, SQLState: 42000

This is a regular MySQL error described in the MySQL manual.

My problem is that this system worked for months without any problem. Only recently I discovered the error described above. Do you have any ideas what could have caused this problem? What does Hibernate look for and doesn't find?

If this question should be on serverfault, feel free to migrate it :)

+2  A: 

In this post:

http://forums.mysql.com/read.php?39,96721,96721#msg-96721

They had the same type of errors and fixed it buy upgrading their MySQL connector to the latest one, but that was back in 2007. I hope that helps.

Loren C Fortner