Mantis - Resin
Viewing Issue Advanced Details
1690 minor always 04-16-07 05:10 06-05-07 16:40
sam  
ferg  
normal  
closed 3.1.0  
fixed  
none    
none 3.1.2  
0001690: BTree insert of mismatched value
(snapshot 2007-04-16)

Error occurred when persisting a new bean that has an int primary key marked with @Id, using the built-in Resin database.

[08:07:51.522] Caused by: java.sql.SQLException: BTree insert of mismatched value
[08:07:51.522] at com.caucho.db.index.BTree.insertLeafBlock(BTree.java:457)
[08:07:51.522] at com.caucho.db.index.BTree.insertValue(BTree.java:418)
[08:07:51.522] at com.caucho.db.index.BTree.insert(BTree.java:370)
[08:07:51.522] at com.caucho.db.index.BTree.insert(BTree.java:329)
[08:07:51.522] at com.caucho.db.table.IntColumn.setIndex(IntColumn.java:283)
[08:07:51.522] at com.caucho.db.table.Table.insertRow(Table.java:775)
[08:07:51.522] at com.caucho.db.table.Table.insert(Table.java:707)
[08:07:51.522] at com.caucho.db.sql.InsertQuery.execute(InsertQuery.java:115)
[08:07:51.522] at com.caucho.db.jdbc.PreparedStatementImpl.execute(PreparedStatementImpl.java:345)
[08:07:51.522] at com.caucho.db.jdbc.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:313)
[08:07:51.522] at com.caucho.sql.UserPreparedStatement.executeUpdate(UserPreparedStatement.java:98)
[08:07:51.522] at example.Category.__caucho_create(Category.java)
[08:07:51.522] at com.caucho.amber.manager.AmberConnection.createInternal(AmberConnection.java:2685)
[08:07:51.522] at com.caucho.amber.manager.AmberConnection.createInternal(AmberConnection.java:2643)
[08:07:51.522] at com.caucho.amber.manager.AmberConnection.persistInternal(AmberConnection.java:2864)
[08:07:51.522] at com.caucho.amber.manager.AmberConnection.persist(AmberConnection.java:283)
[08:07:51.522] ... 25 more

Notes
(0001850)
sam   
04-16-07 05:47   
The problem is corrected if @GeneratedValue is added to the primary key field. The database tables are being created by Amber.
(0001855)
ferg   
04-17-07 20:01   
This would need to be reported against 3.1.1.
(0001856)
sam   
04-18-07 11:12   
fixed incorrect version
(0002015)
ferg   
06-05-07 16:40   
jpa/0u0k