With 1.4.179 I am facing this problem
Unique index or primary key violation: "PRIMARY KEY ON """".PAGE_INDEX";
SQL statement:
ALTER TABLE PUBLIC.TABACCOUNT ADD CONSTRAINT
PUBLIC.FK_TABACCOUNT_PARENTACCOUNTNO FOREIGN KEY(PARENTACCOUNTNO) INDEX
PUBLIC.FK_TABACCOUNT_PARENTACCOUNTNO_INDEX_D REFERENCES
PUBLIC.TABACCOUNT(ACCOUNTNO) INDEX PUBLIC.PRIMARY_KEY_DC6 NOCHECK
[23505-179]
<http://192.168.43.206:8082/login.do?jsessionid=3a9c7be376a442f869ae96c77692d959#>
23505/23505 (Help)
<http://h2database.com/javadoc/org/h2/constant/ErrorCode.html#c23505>
org.h2.jdbc.JdbcSQLException: Unique index or primary key violation:
"PRIMARY KEY ON """".PAGE_INDEX"; SQL statement:
ALTER TABLE PUBLIC.TABACCOUNT ADD CONSTRAINT
PUBLIC.FK_TABACCOUNT_PARENTACCOUNTNO FOREIGN KEY(PARENTACCOUNTNO) INDEX
PUBLIC.FK_TABACCOUNT_PARENTACCOUNTNO_INDEX_D REFERENCES
PUBLIC.TABACCOUNT(ACCOUNTNO) INDEX PUBLIC.PRIMARY_KEY_DC6 NOCHECK
[23505-179]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345
<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=345&build=179>)
at org.h2.message.DbException.get(DbException.java:179
<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=179&build=179>)
at org.h2.message.DbException.get(DbException.java:155
<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=155&build=179>)
at
org.h2.index.PageDataIndex.getNewDuplicateKeyException(PageDataIndex.java:165
<http://h2database.com/html/source.html?file=org/h2/index/PageDataIndex.java&line=165&build=179>)
at org.h2.index.PageDataIndex.add(PageDataIndex.java:143
<http://h2database.com/html/source.html?file=org/h2/index/PageDataIndex.java&line=143&build=179>)
at org.h2.store.PageStore.addMeta(PageStore.java:1812
<http://h2database.com/html/source.html?file=org/h2/store/PageStore.java&line=1812&build=179>)
at org.h2.index.PageBtreeIndex.<init>(PageBtreeIndex.java:63
<http://h2database.com/html/source.html?file=org/h2/index/PageBtreeIndex.java&line=63&build=179>)
at org.h2.table.RegularTable.addIndex(RegularTable.java:234
<http://h2database.com/html/source.html?file=org/h2/table/RegularTable.java&line=234&build=179>)
at
org.h2.command.ddl.AlterTableAddConstraint.createIndex(AlterTableAddConstraint.java:287
<http://h2database.com/html/source.html?file=org/h2/command/ddl/AlterTableAddConstraint.java&line=287&build=179>)
at
org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:236
<http://h2database.com/html/source.html?file=org/h2/command/ddl/AlterTableAddConstraint.java&line=236&build=179>)
at
org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:72
<http://h2database.com/html/source.html?file=org/h2/command/ddl/AlterTableAddConstraint.java&line=72&build=179>)
at org.h2.engine.MetaRecord.execute(MetaRecord.java:58
<http://h2database.com/html/source.html?file=org/h2/engine/MetaRecord.java&line=58&build=179>)
at org.h2.engine.Database.open(Database.java:729
<http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=729&build=179>)
at org.h2.engine.Database.openDatabase(Database.java:263
<http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=263&build=179>)
at org.h2.engine.Database.<init>(Database.java:257
<http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=257&build=179>)
at org.h2.engine.Engine.openSession(Engine.java:58
<http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=58&build=179>)
at org.h2.engine.Engine.openSession(Engine.java:165
<http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=165&build=179>)
at org.h2.engine.Engine.createSessionAndValidate(Engine.java:143
<http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=143&build=179>)
at org.h2.engine.Engine.createSession(Engine.java:126
<http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=126&build=179>)
at org.h2.engine.Engine.createSession(Engine.java:26
<http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=26&build=179>)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:335
<http://h2database.com/html/source.html?file=org/h2/engine/SessionRemote.java&line=335&build=179>)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107
<http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcConnection.java&line=107&build=179>)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91
<http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcConnection.java&line=91&build=179>)
at org.h2.Driver.connect(Driver.java:72
<http://h2database.com/html/source.html?file=org/h2/Driver.java&line=72&build=179>)
at org.h2.server.web.WebServer.getConnection(WebServer.java:682
<http://h2database.com/html/source.html?file=org/h2/server/web/WebServer.java&line=682&build=179>)
at org.h2.server.web.WebApp.login(WebApp.java:957
<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=957&build=179>)
at org.h2.server.web.WebApp.process(WebApp.java:211
<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=211&build=179>)
at org.h2.server.web.WebApp.processRequest(WebApp.java:170
<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=170&build=179>)
at org.h2.server.web.WebThread.process(WebThread.java:137
<http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=137&build=179>)
at org.h2.server.web.WebThread.run(WebThread.java:93
<http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=93&build=179>)
at java.lang.Thread.run(Unknown Source)
On Monday, June 2, 2014 9:46:18 PM UTC+5:30, Thomas Mueller wrote:
>
> Hi,
>
> I finally found and fixed the problem now. This problem will be fixed in
> the next release. One workaround is to not upgrade to version 1.3.176 if
> the database was created with an earlier version. Another workaround is to
> export the database file to a SQL script and re-create it.
>
> Regards,
> Thomas
>
>
>
> On Wed, May 28, 2014 at 4:42 PM, Nick99 <[email protected] <javascript:>
> > wrote:
>
>> Same problem.
>>
>> 1.
>> The database was created in CREATE_BUILD 170, then was used with 1.3.174.
>> I've tried using 1.4.178 on that database in Hibernate-based product - got
>>
>> org.h2.jdbc.JdbcSQLException: Unique index or primary key violation:
>> "PRIMARY KEY ON """".PAGE_INDEX"; SQL statement:[...]
>>
>> 1.3.175 works ok on that db. 1.3.176 is not.
>>
>> 2.
>> Opening the db in 1.3.176 Console produces this (table names removed):
>>
>> Unique index or primary key violation: "PRIMARY KEY ON """".PAGE_INDEX";
>> SQL statement:
>> ALTER TABLE PUBLIC.-------------- ADD CONSTRAINT
>> PUBLIC.FK28D9808AF98221CA FOREIGN KEY(JESID) REFERENCES
>> PUBLIC.--------------(ID) NOCHECK [23505-176] 23505/23505 (Help)
>>
>>
>> On Monday, May 26, 2014 10:33:05 AM UTC+3, Germano Rizzo wrote:
>>>
>>> Provided here
>>> <https://groups.google.com/forum/?hl=it#!topic/h2-database/lNp80bgbvBY>.
>>> Thanks!
>>>
>>> Il giorno giovedì 22 maggio 2014 17:43:18 UTC+2, Thomas Mueller ha
>>> scritto:
>>>>
>>>> Hi
>>>>
>>>> I would need a reproducible test case, or the database file.
>>>>
>>>> Regards, Thomas
>>>>
>>>> On Thursday, May 22, 2014, jack jin <[email protected]> wrote:
>>>>
>>>>> when I upgrade to 1.3.176,I have the same problem. the old version h2
>>>>> is works fine with the db file
>>>>>
>>>>> On Tuesday, May 6, 2014 5:00:52 PM UTC+8, Germano Rizzo wrote:
>>>>>>
>>>>>> Hi Thomas,
>>>>>> so your opinion is that all the db's are corrupted? The
>>>>>> strange thing is, they fail to open only with the latest stable version.
>>>>>> Every other version I tried works fine, and this configuration have
>>>>>> worked
>>>>>> in 40 installations for 3 years now, across different versions of H2. Do
>>>>>> you want me to start another thread?
>>>>>>
>>>>>> Germano
>>>>>>
>>>>>> Il giorno martedì 6 maggio 2014 07:59:45 UTC+2, Thomas Mueller ha
>>>>>> scritto:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> If you are using LOCK_MODE=0;UNDO_LOG=0 then you need to be aware
>>>>>>> of the risks. See the FAQ and the documentation.
>>>>>>>
>>>>>>> Please use different email subjects for different problems.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Thomas
>>>>>>>
>>>>>>>
>>>>>>> On Monday, May 5, 2014, mano <[email protected]> wrote:
>>>>>>>
>>>>>>>> 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.na
>>>>>>>> bble.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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.