[h2] Re: Unique index or primary key violation
Hi! It doesn't look like an original error from H2, H2 produces messages like Unique index or primary key violation: "PRIMARY_KEY_6 ON PUBLIC.AD(ACCU_ID, TARGET_ID, REPLAY_ID) VALUES ( /* key:1 */ 2, 3, 4), where 1 is an internal row number (_ROWID_) and other values are values of primary key columns. Please note that H2 1.4.192 is a very old unsupported version of H2 database. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/af3fee93-0f96-4c7b-8886-c49a8bcac386n%40googlegroups.com.
[h2] Re: Unique index or primary key violation: "PRIMARY KEY ON """".PAGE_INDEX" error
I am experiencing similar problem with an error: Unique index or primary key violation: "PRIMARY KEY ON .PAGE_INDEX"; SQL statement: ALTER TABLE XXX ADD CONSTRAINT YYY FOREIGN KEY(LOOKUPID) Legacy database created by H2 1.4.196 is opened by driver 1.4.197 successfully first time. Then disconnect and second attempt to connect by 1.4.197 driver fails with this error forever. I am planning to debug this issue, more details and may be fixes are later.. MV_STORE=false option is used. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] Re: Unique index or primary key violation in FullText indexes tables (error 23001)
Note that I am using server mode (the NetBeans IDE plugin). I just shut down the database, completely deleted the files, then successfully executed the above. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] Re: Unique index or primary key violation in FullText indexes tables (error 23001)
On Monday, December 21, 2009 at 9:52:17 PM UTC+11, Thomas Mueller Graf wrote: > > Hi, > > Thanks for your help! I can now reproduce the problem. The problem is > that currently, before inserting or deleting data, FT_INIT() has to be > called (only for the native fulltext search; not for the Lucene > search). > > That's a bug of course, I will fix it for the next release. > Hi Thomas, I see this seems to be a problem with 1.4.192. I don't know the exact steps to reproduce, however; what I am doing is dropping all objects then loading using runscript. I rebuild using the following: drop all objects; runscript from '/Users/bryan/Development/db/backup/local_mmm.sql.gz' compression gzip; CREATE ALIAS IF NOT EXISTS FT_INIT FOR "org.h2.fulltext.FullText.init"; CALL FT_INIT(); CALL FT_DROP_INDEX('PUBLIC', 'CARDSADDRESS'); CALL FT_CREATE_INDEX('PUBLIC', 'CARDSADDRESS', null); At the point before FT_INIT() no schema for FT exists. After FT_INIT FT schema and tables exist with no content. FT_DROP_INDEX was used just to see if it would help, it didn't. Once I run FT_CREATE_INDEX I get: Error code 23505, SQL state 23505: Unique index or primary key violation: "PRIMARY_KEY_1 ON FT.MAP(WORDID, ROWID) VALUES (1, 57336, 727241)"; SQL statement: INSERT INTO FT.MAP(ROWID, WORDID) VALUES(?, ?) [23505-192] No trace information is present from the DB. Note, I have successfully created this index in the past. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] Re: Unique index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) [23505-168] (using 1.3.168)
Having the same problem any solution to come out of this. using h2-1.3.160.jar and Apache-Tomcat-7.0.22. When tried to run recover option and recreate database found that create statement for some tables are found twice. What could be the reason for this? On Monday, March 17, 2014 3:07:11 PM UTC+8, Dieter Cailliau wrote: Using version 1.3.168 (in jboss 7.2.0). URL: jdbc:h2:/tmp/bms;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=5000 Database file is attached. Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) [23505-168] »···at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) [h2-1.3.168.jar:1.3.168] »···at org.h2.message.DbException.get(DbException.java:169) [h2-1.3.168.jar:1.3.168] »···at org.h2.message.DbException.get(DbException.java:146) [h2-1.3.168.jar:1.3.168] »···at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:81) [h2-1.3.168.jar:1.3.168] »···at org.h2.index.TreeIndex.add(TreeIndex.java:62) [h2-1.3.168.jar:1.3.168] »···at org.h2.table.RegularTable.addRowsToIndex(RegularTable.java:327) [h2-1.3.168.jar:1.3.168] »···at org.h2.table.RegularTable.addIndex(RegularTable.java:256) [h2-1.3.168.jar:1.3.168] »···at org.h2.engine.Database.open(Database.java:619) [h2-1.3.168.jar:1.3.168] »···at org.h2.engine.Database.openDatabase(Database.java:222) [h2-1.3.168.jar:1.3.168] »···at org.h2.engine.Database.init(Database.java:217) [h2-1.3.168.jar:1.3.168] »···at org.h2.engine.Engine.openSession(Engine.java:56) [h2-1.3.168.jar:1.3.168] »···at org.h2.engine.Engine.openSession(Engine.java:159) [h2-1.3.168.jar:1.3.168] »···at org.h2.engine.Engine.createSessionAndValidate(Engine.java:138) [h2-1.3.168.jar:1.3.168] »···at org.h2.engine.Engine.createSession(Engine.java:121) [h2-1.3.168.jar:1.3.168] »···at org.h2.engine.Engine.createSession(Engine.java:28) [h2-1.3.168.jar:1.3.168] »···at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:305) [h2-1.3.168.jar:1.3.168] »···at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:108) [h2-1.3.168.jar:1.3.168] »···at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:92) [h2-1.3.168.jar:1.3.168] »···at org.h2.Driver.connect(Driver.java:72) [h2-1.3.168.jar:1.3.168] »···at org.h2.jdbcx.JdbcDataSource.getJdbcConnection(JdbcDataSource.java:181) [h2-1.3.168.jar:1.3.168] »···at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:331) [h2-1.3.168.jar:1.3.168] »···at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:441) -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] Re: Unique index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) [23505-168] (using 1.3.168)
mano wrote Opening it with version 1.3.168 will give the error. Sorry, I meant 1.3.176. -- View this message in context: http://h2-database.66688.n3.nabble.com/Unique-index-or-primary-key-violation-SYS-ID-ON-PUBLIC-SYS-ID-23505-168-using-1-3-168-tp4028700p4029078.html Sent from the H2 Database mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] Re: Unique index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) [23505-168] (using 1.3.168)
Same problem here. I can add that my application is widely deployed, and each instance created a db for its internal configuration. Now everyone of them is failing, so I think it's not a problem of corruption... maybe the start parameters? The jdbc url with which it was created is: jdbc:h2://amp_db;LOCK_MODE=0;UNDO_LOG=0;TRACE_LEVEL_FILE=0;FILE_LOCK=SOCKET;AUTO_SERVER=TRUE You can find a failing db here: https://www.dropbox.com/s/h0i9ys98dz5xp88/amp_db.h2.zip Opening it with version 1.3.168 will give the error. Please advise here. I can't upgrade if this is not solved somehow... anyhow, thanks for the excellent work you're doing! Germano -- View this message in context: http://h2-database.66688.n3.nabble.com/Unique-index-or-primary-key-violation-SYS-ID-ON-PUBLIC-SYS-ID-23505-168-using-1-3-168-tp4028700p4029077.html Sent from the H2 Database mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
Re: [h2] Re: Unique index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) [23505-168] (using 1.3.168)
URL: jdbc:h2:/tmp/bms;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=5000 According to your query, the create_build was 168. I'm not using temporary tables (afaik) just regular JPA (hibernate inside jboss7). I didn't see OutOfMemory in my logs, but they don't go back to the first occurence of the problem, so i'm not sure. I am using XA. The error shows up when the first connection is obtained: org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:331). -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] Re: Unique index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) [23505-168] (using 1.3.168)
With 1.3.175 the error message is a bit longer: Uniqhttp://127.0.1.1:8082/test.do?jsessionid=4ea64ad64b043f1dd5de67ef7339a197#ue index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) VALUES ( /* key:266 */ 15, 0, 3, 'CREATE SEQUENCE PUBLIC.SYSTEM_SEQUENCE_803C1AF8_DCEB_49F0_8A0D_14C8577C2238 START WITH 34 BELONGS_TO_TABLE') [23505-175]http://127.0.1.1:8082/test.do?jsessionid=4ea64ad64b043f1dd5de67ef7339a197# 23505/23505 -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
Re: [h2] Re: Unique index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) [23505-168] (using 1.3.168)
Hi, Could you tell us, what database URL do you or did you use? It looks like a corruption of some kind, but I'm not sure. Regards, Thomas On Mon, Mar 17, 2014 at 8:11 AM, Dieter Cailliau dieter.caill...@gmail.comwrote: With 1.3.175 the error message is a bit longer: Uniqhttp://127.0.1.1:8082/test.do?jsessionid=4ea64ad64b043f1dd5de67ef7339a197#ue index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) VALUES ( /* key:266 */ 15, 0, 3, 'CREATE SEQUENCE PUBLIC.SYSTEM_SEQUENCE_803C1AF8_DCEB_49F0_8A0D_14C8577C2238 START WITH 34 BELONGS_TO_TABLE') [23505-175]http://127.0.1.1:8082/test.do?jsessionid=4ea64ad64b043f1dd5de67ef7339a197# 23505/23505 -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
Re: [h2] Re: Unique index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) [23505-168] (using 1.3.168)
Hi, Some more questions: - With which version of H2 was this database created? You can find it out using: select * from information_schema.settings where name='CREATE_BUILD' or have a look in the SQL script created by the recover tool. - Did the application run out of memory (once, or multiple times)? Known corruptions with older versions are: With version 1.3.171 and older: when using local temporary tables and not dropping them manually before closing the session, and then killing the process could result in a database that couldn't be opened. Regards, Thomas On Tue, Mar 18, 2014 at 6:31 AM, Thomas Mueller thomas.tom.muel...@gmail.com wrote: Hi, Could you tell us, what database URL do you or did you use? It looks like a corruption of some kind, but I'm not sure. Regards, Thomas On Mon, Mar 17, 2014 at 8:11 AM, Dieter Cailliau dieter.caill...@gmail.com wrote: With 1.3.175 the error message is a bit longer: Uniqhttp://127.0.1.1:8082/test.do?jsessionid=4ea64ad64b043f1dd5de67ef7339a197#ue index or primary key violation: SYS_ID ON PUBLIC.SYS(ID) VALUES ( /* key:266 */ 15, 0, 3, 'CREATE SEQUENCE PUBLIC.SYSTEM_SEQUENCE_803C1AF8_DCEB_49F0_8A0D_14C8577C2238 START WITH 34 BELONGS_TO_TABLE') [23505-175]http://127.0.1.1:8082/test.do?jsessionid=4ea64ad64b043f1dd5de67ef7339a197# 23505/23505 -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.