CREATE_BUILD | 173  (h2-1.3.173.jar)

Using a ConnectionPool. We are using the BACKUP nativeH2 Query command. 
 We're not using 'MULTI_THREADED' property either so everything 
defaultCIPHER=AES;TRACE_LEVEL_SYSTEM_OUT=0;ALLOW_LITERALS=NUMBERS

On Tuesday, September 2, 2014 10:42:05 PM UTC-7, Thomas Mueller wrote:
>
> Hi,
>
> If you copy the file while the database is open, then the backup can be 
> corrupt in some cases (it's not so easy to reproduce it). Online backup is 
> supported, but you have to use the "backup" SQL statement (see the 
> documentation for details).
>
> In theory the corruption can have other reasons. 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.
>
> Regards,
> Thomas
>
>
>
> On Wednesday, September 3, 2014, Kam <[email protected] 
> <javascript:>> wrote:
>
>> I don't know what's causing it. We have a feature that backs up the H2 DB 
>> file and zips it via java. the DB is in use when we back it up (all it does 
>> is copy the h2 file) When we tried to use it, it's corrupted. This is the 
>> stack trace when I try to open it
>> ZipOutputStream append = new ZipOutputStream(new 
>> FileOutputStream(fileFullPath));
>>
>> java version "1.7.0_55" on mac and file size is 1.4 MBs and we have a lot 
>> of / (slashes) stored. I am not sure where to begin to find it. Is it H2 ? 
>> is it our code writing/copying the file? (tests can't reproduce it) What is 
>> this error ?
>>
>>
>> >java -cp lib/h2*.jar org.h2.tools.Shell -url 
>> "jdbc:h2:./data/path;CIPHER=AES;TRACE_LEVEL_SYSTEM_OUT=0;ALLOW_LITERALS=NUMBERS"
>>  
>> -user sa -password "pass1 pass1"
>>
>> Exception in thread "main" org.h2.jdbc.JdbcSQLException: General error: 
>> "java.lang.ArrayIndexOutOfBoundsException: 4" [50000-173]
>>
>> at org.h2.message.DbException.getJdbcSQLException(DbException.java:331)
>>
>> at org.h2.message.DbException.get(DbException.java:160)
>>
>> at org.h2.message.DbException.convert(DbException.java:283)
>>
>> at org.h2.table.RegularTable.removeRow(RegularTable.java:397)
>>
>> at org.h2.store.PageStore.redo(PageStore.java:1537)
>>
>> at org.h2.store.PageStore.redoDelete(PageStore.java:1511)
>>
>> at org.h2.store.PageLog.recover(PageLog.java:334)
>>
>> at org.h2.store.PageStore.recover(PageStore.java:1371)
>>
>> at org.h2.store.PageStore.openExisting(PageStore.java:361)
>>
>> at org.h2.store.PageStore.open(PageStore.java:285)
>>
>> at org.h2.engine.Database.getPageStore(Database.java:2210)
>>
>> at org.h2.engine.Database.open(Database.java:603)
>>
>> at org.h2.engine.Database.openDatabase(Database.java:226)
>>
>> at org.h2.engine.Database.<init>(Database.java:221)
>>
>> at org.h2.engine.Engine.openSession(Engine.java:56)
>>
>> at org.h2.engine.Engine.openSession(Engine.java:160)
>>
>> at org.h2.engine.Engine.createSessionAndValidate(Engine.java:139)
>>
>> at org.h2.engine.Engine.createSession(Engine.java:122)
>>
>> at org.h2.engine.Engine.createSession(Engine.java:28)
>>
>> at 
>> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:313)
>>
>> at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:105)
>>
>> at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:90)
>>
>> at org.h2.Driver.connect(Driver.java:73)
>>
>> at java.sql.DriverManager.getConnection(DriverManager.java:571)
>>
>> at java.sql.DriverManager.getConnection(DriverManager.java:215)
>>
>> at org.h2.tools.Shell.runTool(Shell.java:147)
>>
>> at org.h2.tools.Shell.main(Shell.java:80)
>>
>> Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
>>
>> at org.h2.index.PageBtree.getRow(PageBtree.java:172)
>>
>> at org.h2.index.PageBtreeLeaf.remove(PageBtreeLeaf.java:228)
>>
>> at org.h2.index.PageBtreeIndex.remove(PageBtreeIndex.java:238)
>>
>> at org.h2.table.RegularTable.removeRow(RegularTable.java:379)
>>
>> ... 23 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 [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.
>>
>

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

Reply via email to