Hi, I am sorry to say that, but it looks like a corruption problem. I am very interested in analyzing and solving this problem. Corruption problems have top priority for me. I have a few question:
- What is your database URL? - Did you use multiple connections? - The first workarounds is: append ;RECOVER=1 to the database URL. Does it work when you do this? - The second workarounds is: delete the index.db file (it is re-created automatically) and try again. Does it work when you do this? - The third workarounds is: use the tool org.h2.tools.Recover to create the SQL script file, and then re-create the database using this script. Does it work when you do this? - With which version of H2 was this database created? You can find it out using: select * from information_schema.settings where name='CREATE_BUILD' - Do you use any settings or special features (for example, the setting LOG=0, or two phase commit, linked tables, cache settings)? - Is the application multi-threaded? - What operating system, file system, and virtual machine (java -version) do you use? - How big is the database (file sizes)? - Is the database usually closed normally, or is process terminated forcefully or the computer switched off? - Is it possible to reproduce this problem using a fresh database (sometimes, or always)? - Are there any other exceptions (maybe in the .trace.db file)? Could you send them please? - Do you still have any .trace.db files, and if yes could you send them? - Could you send the .data.db file where this exception occurs? Regards, Thomas On Mon, Dec 1, 2008 at 4:10 PM, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote: > Unique index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) > [23001-102] 23001/23001 (Help) > org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: SYS_ID > ON PUBLIC.SYS(ID) [23001-102] > at org.h2.message.Message.getSQLException(Message.java:103) > at org.h2.message.Message.getSQLException(Message.java:114) > at org.h2.message.Message.getSQLException(Message.java:77) > at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:161) > at org.h2.index.TreeIndex.add(TreeIndex.java:57) > at org.h2.table.TableData.addRowsToIndex(TableData.java:264) > at org.h2.table.TableData.addIndex(TableData.java:200) > at org.h2.engine.Database.open(Database.java:586) > at org.h2.engine.Database.<init>(Database.java:210) > at org.h2.engine.Engine.openSession(Engine.java:57) > at org.h2.engine.Engine.openSession(Engine.java:126) > at org.h2.engine.Engine.getSession(Engine.java:109) > at org.h2.engine.Session.createSession(Session.java:309) > at > org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:251) > at org.h2.engine.SessionRemote.createSession(SessionRemote.java:229) > at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110) > at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94) > at org.h2.Driver.connect(Driver.java:54) > at org.h2.server.web.WebServer.getConnection(WebServer.java:629) > at org.h2.server.web.WebThread$1LoginTask.run(WebThread.java:1175) > at java.lang.Thread.run(Unknown Source) > > -- > Aladejebi Ayodeji A., > DabarObjects Solutions > Phone: +234 9 481 7 156 > Mobile: +234 803 589 1780 > Email: [EMAIL PROTECTED] > Web: www.dabarobjects.com > Blog: blog.dabarobjects.com > > Participate, Collaborate, Innovate > Join Community: > http://www.cowblock.net/ > > Get A Free Blog: > http://blogs.cowblock.net/ > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
