Re: [h2] 1.4.182 corruption

2015-01-09 Thread Dieter Cailliau
he means 1.4.183

Op donderdag 8 januari 2015 23:52:40 UTC+1 schreef marcolopes:
>
> 1.3.183 ??
>
> On Thursday, December 18, 2014 at 9:07:16 PM UTC, Thomas Mueller wrote:
>>
>> Hi,
>>
>> Yes, this looks like the bug that was fixed in version 1.3.183. I'm 
>> afraid this database is not recoverable.
>>
>> Regards,
>> Thomas
>>
>> On Thu, Dec 18, 2014 at 1:53 PM, Dieter Cailliau  
>> wrote:
>>>
>>>
>>> File corrupted while reading record: "/tmp/bms.auto.mv.db". Possible 
>>> solution: use the recovery tool [90030-182] 
>>> <http://127.0.1.1:8082/login.do?jsessionid=cd6441ab484bba9d2abe4db0d5455f69#>
>>>  90030/90030 (Help) 
>>> <http://h2database.com/javadoc/org/h2/constant/ErrorCode.html#c90030>
>>> org.h2.jdbc.JdbcSQLException: File corrupted while reading record: 
>>> "/tmp/bms.auto.mv.db". Possible solution: use the recovery tool [90030-182]
>>> at 
>>> org.h2.message.DbException.getJdbcSQLException(DbException.java:345 
>>> <http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=345&build=182>
>>> )
>>> at org.h2.message.DbException.get(DbException.java:168 
>>> <http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=168&build=182>
>>> )
>>> at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:115 
>>> <http://h2database.com/html/source.html?file=org/h2/mvstore/db/MVTableEngine.java&line=115&build=182>
>>> )
>>> at org.h2.engine.Database.getPageStore(Database.java:2376 
>>> <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=2376&build=182>
>>> )
>>> at org.h2.engine.Database.open(Database.java:666 
>>> <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=666&build=182>
>>> )
>>> at org.h2.engine.Database.openDatabase(Database.java:266 
>>> <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=266&build=182>
>>> )
>>> at org.h2.engine.Database.(Database.java:260 
>>> <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=260&build=182>
>>> )
>>> at org.h2.engine.Engine.openSession(Engine.java:60 
>>> <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=60&build=182>
>>> )
>>> at org.h2.engine.Engine.openSession(Engine.java:167 
>>> <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=167&build=182>
>>> )
>>> at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145 
>>> <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=145&build=182>
>>> )
>>> at org.h2.engine.Engine.createSession(Engine.java:128 
>>> <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=128&build=182>
>>> )
>>> at org.h2.engine.Engine.createSession(Engine.java:26 
>>> <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=26&build=182>
>>> )
>>> at 
>>> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:347 
>>> <http://h2database.com/html/source.html?file=org/h2/engine/SessionRemote.java&line=347&build=182>
>>> )
>>> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:108 
>>> <http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcConnection.java&line=108&build=182>
>>> )
>>> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:92 
>>> <http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcConnection.java&line=92&build=182>
>>> )
>>> at org.h2.Driver.connect(Driver.java:72 
>>> <http://h2database.com/html/source.html?file=org/h2/Driver.java&line=72&build=182>
>>> )
>>> at org.h2.server.web.WebServer.getConnection(WebServer.java:750 
>>> <http://h2database.com/html/source.html?file=org/h2/server/web/WebServer.java&line=750&build=182>
>>> )
>>> 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=182>
>>> )
>>> at org.h2.server.web.WebApp.process(WebApp.java:211 
>>> <http://h2database.com/html/source.html?fi

Re: [h2] 1.4.182 corruption

2014-12-19 Thread Dieter Cailliau
Thank's Thomas for your great work and dedication. 
I don't need this data to be recovered, so i'm lucky :) 


Op donderdag 18 december 2014 22:07:16 UTC+1 schreef Thomas Mueller:
>
> Hi,
>
> Yes, this looks like the bug that was fixed in version 1.3.183. I'm afraid 
> this database is not recoverable.
>
> Regards,
> Thomas
>
> On Thu, Dec 18, 2014 at 1:53 PM, Dieter Cailliau  > wrote:
>>
>>
>> File corrupted while reading record: "/tmp/bms.auto.mv.db". Possible 
>> solution: use the recovery tool [90030-182] 
>> <http://127.0.1.1:8082/login.do?jsessionid=cd6441ab484bba9d2abe4db0d5455f69#>
>>  90030/90030 (Help) 
>> <http://h2database.com/javadoc/org/h2/constant/ErrorCode.html#c90030>
>> org.h2.jdbc.JdbcSQLException: File corrupted while reading record: 
>> "/tmp/bms.auto.mv.db". Possible solution: use the recovery tool [90030-182]
>> at 
>> org.h2.message.DbException.getJdbcSQLException(DbException.java:345 
>> <http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=345&build=182>
>> )
>> at org.h2.message.DbException.get(DbException.java:168 
>> <http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=168&build=182>
>> )
>> at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:115 
>> <http://h2database.com/html/source.html?file=org/h2/mvstore/db/MVTableEngine.java&line=115&build=182>
>> )
>> at org.h2.engine.Database.getPageStore(Database.java:2376 
>> <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=2376&build=182>
>> )
>> at org.h2.engine.Database.open(Database.java:666 
>> <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=666&build=182>
>> )
>> at org.h2.engine.Database.openDatabase(Database.java:266 
>> <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=266&build=182>
>> )
>> at org.h2.engine.Database.(Database.java:260 
>> <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=260&build=182>
>> )
>> at org.h2.engine.Engine.openSession(Engine.java:60 
>> <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=60&build=182>
>> )
>> at org.h2.engine.Engine.openSession(Engine.java:167 
>> <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=167&build=182>
>> )
>> at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145 
>> <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=145&build=182>
>> )
>> at org.h2.engine.Engine.createSession(Engine.java:128 
>> <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=128&build=182>
>> )
>> at org.h2.engine.Engine.createSession(Engine.java:26 
>> <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=26&build=182>
>> )
>> at 
>> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:347 
>> <http://h2database.com/html/source.html?file=org/h2/engine/SessionRemote.java&line=347&build=182>
>> )
>> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:108 
>> <http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcConnection.java&line=108&build=182>
>> )
>> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:92 
>> <http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcConnection.java&line=92&build=182>
>> )
>> at org.h2.Driver.connect(Driver.java:72 
>> <http://h2database.com/html/source.html?file=org/h2/Driver.java&line=72&build=182>
>> )
>> at org.h2.server.web.WebServer.getConnection(WebServer.java:750 
>> <http://h2database.com/html/source.html?file=org/h2/server/web/WebServer.java&line=750&build=182>
>> )
>> 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=182>
>> )
>> 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=182>
>> )
>> 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=182>
>> )
>> at org.h

[h2] Re: java-level deadlock

2014-09-22 Thread Dieter Cailliau
The fix is in Version 1.3.174 (2013-10-19).


Is it possible to find out in which version the bug was introduced? I have 
deployments using 1.3.168 and i don't remember having seen this happening. 
I have seen it happening in 1.3.173 though. I'm wondering whether to 
upgrade the 1.3.168 deployments or leave them alone.

-- 
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] Unique index or primary key violation: "SYS_ID ON PUBLIC.SYS(ID)" [23505-168] (using 1.3.168)

2014-03-27 Thread Dieter Cailliau
Thoms the database is attached to the first post of this topic.

Op donderdag 20 maart 2014 07:53:26 UTC+1 schreef Thomas Mueller:
>
> Hi,
>
> > I'm not using temporary tables 
>
> I think there are some cases where Hibernate creates temporary tables, and 
> for some queries (those that return many rows) the database itself creates 
> temporary tables.
>
> If you still have the database file, could you send it to me please? I 
> would like to analyze it.
>
> Regards,
> Thomas
>
>
>
> On Tuesday, March 18, 2014, Dieter Cailliau 
> > 
> wrote:
>
>> 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.
>>
>

-- 
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)

2014-03-18 Thread Dieter Cailliau
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)

2014-03-17 Thread Dieter Cailliau
With 1.3.175 the error message is a bit longer:

Unique
 
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]
 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] unable to write: "the database is read only" after system crash

2013-10-08 Thread Dieter Cailliau
Thanks! That works fine.

-- 
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/groups/opt_out.


Re: [h2] corrupt database 1.3.168

2013-10-02 Thread Dieter Cailliau
I'm sure the corruption was not there using 1.3.161 because its just an 
empty scheme I created once back then (i can send it if it helps).

Whatever happens in that file later on, happens by a more recent h2.jar 
(1.3.168 in this report).

I completely understand there's nothing you can do without a .db file or 
reproducible test.


Op dinsdag 1 oktober 2013 19:36:04 UTC+2 schreef Thomas Mueller:
>
> Hi,
>
> Well, the problem is, if the database was created with an old version, 
> then the corruption might have been there already when you switched to a 
> new version. Corruption problems are very hard to analyze, because there is 
> no log file that tells us which change in the database file was created by 
> which version of H2...
>
> Of course, if the problem is reproducible, yes, that's another case. 
> Reproducible problems are usually quite easy to analyze and fix.
>
> Regards,
> Thomas
>
>
>
> On Tue, Oct 1, 2013 at 4:12 PM, Dieter Cailliau 
> 
> > wrote:
>
>> I assume that that fact (that the h2 version with which i created the 
>> schema = 1.3.161) is not relevant for the problem experienced in 1.3.168 
>> which is still a problem in 1.3.168? 
>> It is true that i have created a schema once using an older h2, and kept 
>> that db file as a file to start of in my app, even though i've been 
>> upgrading h2.jar along in my app. 
>> If this is a problem (using this db file against an uptodate h2.jar), 
>> please tell me. 
>>
>> Op woensdag 21 augustus 2013 07:43:45 UTC+2 schreef Thomas Mueller:
>>
>>> Hi,
>>>
>>> The empty database was created with version 1.3.161, as the 
>>> "CREATE_BUILD" is 161. Since then, a few bugs have been fixed that could 
>>> cause corruption; see the change log for details. I suggest to try again 
>>> with a more recent version of H2. If it is still a problem, it would be 
>>> great if you could provide a simple, reproducible test case.
>>>
>>> Regards,
>>> Thomas
>>>
>>>
>>> On Tuesday, August 13, 2013, Dieter Cailliau wrote:
>>>
>>>> jdbc:h2:/tmp/x;DB_CLOSE_DELAY=**-1;LOCK_TIMEOUT=5000
>>>> It's a small db (3M on a windows7) with small tables (about 100 rows).
>>>> I'm using multiple threads.
>>>> I attached the empty schema. If it helps i can send you a (non-corrupt) 
>>>> populated one. I'm still trying to reproduce the corruption.
>>>> While reading the list, i learned that h2 performs a corruption 
>>>> correction at open-time: i think that does not help, because the opening 
>>>> succeeds, but later that query fails.
>>>>
>>>> Thanks!
>>>>
>>>> Op dinsdag 13 augustus 2013 10:18:19 UTC+2 schreef Noel Grandin:
>>>>>
>>>>>
>>>>> On 2013-08-13 10:05, Dieter Cailliau wrote: 
>>>>> > 
>>>>> > Here's another example of ArrayIndexOutOfBoundsException at 
>>>>> > org.h2.index.PageDataLeaf.**getR**owAt: this happened on 1.3.168. 
>>>>> The most 
>>>>> > recent fix i found in changelog about this kind of error was 
>>>>> 1.3.166, 
>>>>> > so probably there's still something wrong since then, or have there 
>>>>> > been fixes related to this, since 1.3.168? 
>>>>>
>>>>> What does your database URL look like? 
>>>>>
>>>>  -- 
>>>> 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+unsubscribe@**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<http://groups.google.com/group/h2-database>
>>>> .
>>>> For more options, visit 
>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>  
>>>>  
>>>>
>>>  -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to h2-da...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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/groups/opt_out.


[h2] Re: unable to write: "the database is read only" after system crash

2013-10-02 Thread Dieter Cailliau
Yes I'm using 2-phase-commit because I use xa-datasource (this is an xml 
element in jboss' standalone-full-ha.xml), but I never really found out how 
to configure the thing (jboss as 7.2.0.Final with h2) to perform recovery. 
I've pasted the config xml below.

Note: having recovery is also not 'a must' for me actually, so would there 
be a way to proceed from this situation, somehow skipping recovery?

Note: i'm using xa because i need to send/rollback JMS messages 
transactionally along with the db transaction.






jdbc:h2:${jboss.server.data.dir:/tmp}/bms;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=${com.x.lock.timeout.ms:5000}

h2

bms



bms






org.h2.jdbcx.JdbcDataSource





-- 
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/groups/opt_out.


Re: [h2] corrupt database 1.3.168

2013-10-01 Thread Dieter Cailliau
I assume that that fact (that the h2 version with which i created the 
schema = 1.3.161) is not relevant for the problem experienced in 1.3.168 
which is still a problem in 1.3.168? 
It is true that i have created a schema once using an older h2, and kept 
that db file as a file to start of in my app, even though i've been 
upgrading h2.jar along in my app. 
If this is a problem (using this db file against an uptodate h2.jar), 
please tell me. 

Op woensdag 21 augustus 2013 07:43:45 UTC+2 schreef Thomas Mueller:
>
> Hi,
>
> The empty database was created with version 1.3.161, as the "CREATE_BUILD" 
> is 161. Since then, a few bugs have been fixed that could cause corruption; 
> see the change log for details. I suggest to try again with a more recent 
> version of H2. If it is still a problem, it would be great if you could 
> provide a simple, reproducible test case.
>
> Regards,
> Thomas
>
>
> On Tuesday, August 13, 2013, Dieter Cailliau wrote:
>
>> jdbc:h2:/tmp/x;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=5000
>> It's a small db (3M on a windows7) with small tables (about 100 rows).
>> I'm using multiple threads.
>> I attached the empty schema. If it helps i can send you a (non-corrupt) 
>> populated one. I'm still trying to reproduce the corruption.
>> While reading the list, i learned that h2 performs a corruption 
>> correction at open-time: i think that does not help, because the opening 
>> succeeds, but later that query fails.
>>
>> Thanks!
>>
>> Op dinsdag 13 augustus 2013 10:18:19 UTC+2 schreef Noel Grandin:
>>>
>>>
>>> On 2013-08-13 10:05, Dieter Cailliau wrote: 
>>> > 
>>> > Here's another example of ArrayIndexOutOfBoundsException at 
>>> > org.h2.index.PageDataLeaf.**getRowAt: this happened on 1.3.168. The 
>>> most 
>>> > recent fix i found in changelog about this kind of error was 1.3.166, 
>>> > so probably there's still something wrong since then, or have there 
>>> > been fixes related to this, since 1.3.168? 
>>>
>>> What does your database URL look like? 
>>>
>>  -- 
>> 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/groups/opt_out.
>>  
>>  
>>
>

-- 
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/groups/opt_out.


Re: [h2] unable to write: "the database is read only" after system crash

2013-09-30 Thread Dieter Cailliau
Every insert gives this in bms.trace.db

org.h2.jdbc.JdbcSQLException: The database is read only; SQL statement:
insert into Element (lastSeen, sources, name, options, tupple, host_string, 
assets2, DTYPE, string) values (?, ?, ?, ?, ?, ?, ?, 
'DeviceCapabilityService', ?) [90097-168]^M
at 
org.h2.message.DbException.getJdbcSQLException(DbException.java:329)^M
at org.h2.message.DbException.get(DbException.java:169)^M
at org.h2.message.DbException.get(DbException.java:146)^M
at org.h2.message.DbException.get(DbException.java:135)^M
at org.h2.engine.Database.checkWritingAllowed(Database.java:1702)^M
at org.h2.table.Table.checkWritingAllowed(Table.java:1060)^M
at org.h2.engine.User.hasRight(User.java:111)^M
at org.h2.engine.User.checkRight(User.java:97)^M
at org.h2.command.dml.Insert.insertRows(Insert.java:93)^M
at org.h2.command.dml.Insert.update(Insert.java:84)^M
at 
org.h2.command.CommandContainer.update(CommandContainer.java:75)^M
at org.h2.command.Command.executeUpdate(Command.java:230)^M
at 
org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:156)^M
at 
org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:142)^M
at 
org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)^M
at 
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:125)^M
at 
org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58)^M
at 
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3058)^M
at 
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3499)^M
at 
org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88)^M
at 
org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)^M
at 
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)^M
at 
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:275)^M
at 
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:328)^M
at 
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)^M
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1212)^M
at 
org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:996)^M
at 
org.jboss.as.jpa.container.AbstractEntityManager.flush(AbstractEntityManager.java:439)^M
at ...my code

Note that the problem started off on a win7, next i copied the bms.h2.db 
file to my ubuntu laptop, restart my app, and i get stuck the same way. The 
file permissions on linux are set to allow everyone to read/write. The file 
permissions on Win7 were also such that the SYSTEM user can do anything. So 
i guess it must be something inside the file.

-- 
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/groups/opt_out.


[h2] Re: unable to write: "the database is read only" after system crash

2013-09-30 Thread Dieter Cailliau
I'm using h2-1.3.168 in jboss 7.2.0.Final on a Win7.

-- 
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/groups/opt_out.


[h2] corrupt database 1.3.168

2013-08-13 Thread Dieter Cailliau

Here's another example of ArrayIndexOutOfBoundsException at 
org.h2.index.PageDataLeaf.getRowAt: this happened on 1.3.168. The most 
recent fix i found in changelog about this kind of error was 1.3.166, so 
probably there's still something wrong since then, or have there been fixes 
related to this, since 1.3.168?

Unfortunately i don't have the corrupted db file.

 
Caused by: org.h2.jdbc.JdbcSQLException: General error: 
"java.lang.ArrayIndexOutOfBoundsException: 0"; SQL statement:
select device0_.string as string5_, device0_.lastSeen as lastSeen5_, 
device0_.sources as sources5_, device0_.id as id5_, device0_.name as 
name5_, device0_.options as options5_, device0_.assets2 as assets8_5_, 
device0_.parent_string as parent16_5_, device0_.boardNumber as 
boardNum9_5_, device0_.outputBoardVersion as outputB11_5_, 
device0_.rgbFromScaler as rgbFrom12_5_, device0_.timing as timing5_, 
device0_.genlock as genlock5_, device0_.DTYPE as DTYPE5_ from Element 
device0_ inner join Interface interfaces1_ on 
device0_.string=interfaces1_.device_string where device0_.DTYPE in 
('Device', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'w', 'y', 'z', 'aa', 
'ab', 'ac', 'ad', 'ae', 'af', 'ag', 'ah', 'ai', 'aj', 'ak', 'al', 'am', 
'an') and interfaces1_.DTYPE='RJ45Connector' order by device0_.string 
[5-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:158) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.message.DbException.convert(DbException.java:281) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.command.Command.executeQuery(Command.java:195) 
[h2-1.3.168.jar:1.3.168] 
at 
org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:109) 
[h2-1.3.168.jar:1.3.168] 
at 
org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
 

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[rt.jar:1.6.0_27] 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
[rt.jar:1.6.0_27] 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
[rt.jar:1.6.0_27] 
at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_27] 
at 
org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
 
[hibernate-core-4.1.6.Final.jar:4.1.6.Final] 
... 105 more 
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 
at org.h2.index.PageDataLeaf.getRowAt(PageDataLeaf.java:327) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.index.PageDataLeaf.getRowWithKey(PageDataLeaf.java:443) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.index.PageDataNode.getRowWithKey(PageDataNode.java:270) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.index.PageDataIndex.getRowWithKey(PageDataIndex.java:406) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.index.PageDataIndex.getRow(PageDataIndex.java:395) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.table.RegularTable.getRow(RegularTable.java:109) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.index.PageBtreeIndex.getRow(PageBtreeIndex.java:295) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.index.PageBtreeCursor.get(PageBtreeCursor.java:45) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.index.IndexCursor.get(IndexCursor.java:223) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.table.TableFilter.getValue(TableFilter.java:875) 
[h2-1.3.168.jar:1.3.168] 
at 
org.h2.expression.ExpressionColumn.getValue(ExpressionColumn.java:175) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.expression.ConditionIn.getValue(ConditionIn.java:44) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.expression.ConditionAndOr.getValue(ConditionAndOr.java:83) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.expression.ConditionAndOr.getValue(ConditionAndOr.java:83) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.expression.Expression.getBooleanValue(Expression.java:180) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.command.dml.Select.queryFlat(Select.java:515) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.command.dml.Select.queryWithoutCache(Select.java:618) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.command.dml.Query.query(Query.java:307) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.command.dml.Query.query(Query.java:277) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.command.dml.Query.query(Query.java:36) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.command.CommandContainer.query(CommandContainer.java:86) 
[h2-1.3.168.jar:1.3.168] 
at org.h2.command.Command.executeQuery(Command.java:191) 
[h2-1.3.168.jar:1.3.168] 
... 112 more 

-- 
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