What can cause "PROCEDURE schema.identity does not exist" using MySQL and Hibernate?
Using Java, Hibernate and MySQL I store instances of such a class using Spring's Hibernate support.
@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 works fine. But from time to time, trying to keep an entity like this, I get this:
java.sql.SQLException: PROCEDURE schema.identity does not exist
Basic MySQL error:
SQL Error: 1305, SQLState: 42000
This is a common MySQL error described in the MySQL manual .
My problem is that this system has been running for months without any problem. It was only recently that I discovered the error described above. Do you have any ideas that might be causing this problem? What is Hibernate looking for and not finding?
If this question should be on serverfault, feel free to move it :)
In this post:
http://forums.mysql.com/read.php?39,96721,96721#msg-96721
They had the same type of errors and fixed the purchase of updating their MySQL connector to the last one, but that was back in 2007. Hope it helps.
source to share
The same exception happened today and this article helped. The problem was that I started tomcat first, but could not start mysql. After I started mysql, the application worked for most of the time, but was unable to insert a record with the above exception. Restarting tomcat resolved this issue.
source to share