tags:

views:

320

answers:

0

Below is my entity id's definition and I am using hibernate as the jpa implemention

@Id
@TableGenerator(name="customer_generator",
  table="system_sequences",pkColumnName="sequence_name",
  valueColumnName="sequence_next_hi_value",initialValue=1,allocationSize=20)
@GeneratedValue(strategy = GenerationType.TABLE, generator = "customer_generator")
@Column(name="custid", unique=true, nullable=false)
private Long id;

I am using Mysql. Below is the part of the error trace

Caused by:
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'databrowser.system_sequences' doesn't exist
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1026)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
 at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
 at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
 at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228)
 at org.hibernate.id.MultipleHiLoPerTableGenerator.doWorkInCurrentTransaction(MultipleHiLoPerTableGenerator.java:135)
 at org.hibernate.engine.TransactionHelper$1Work.doWork(TransactionHelper.java:38)
  ... 53 more