I was able to fix the corrupted table by exporting the data using Squirrel 
QL, dropping the table, recreating and then reloading the data.  The 
offending table was CHANGE_MESSAGES.

On Tuesday, November 1, 2016 at 8:45:29 AM UTC-4, Michael Franz wrote:
>
> Hi,
>
> Now that I have recovered my database, I am trying to setup a better 
> backup system by extracting the data using org.h2.tools.Script.  
> Steps do far:
> 1. Recover
> 2. move *.db to a save location
> 3. RunScript -url jdbc:h2:./ReviewDB -script ReviewDB.h2.sql 
> 4. Script -url jdbc:h2:./ReviewDB -script ReviewDB.zip -options 
> compression zip [1]
>
> When Script executes I get this exception:
> Exception in thread "main" org.h2.jdbc.JdbcSQLException: IO Exception: 
> "java.io.IOException: org.h2.jdbc.JdbcSQLException: IO Exception: ""Missing 
> lob entry, block: 2241"" [90028-174]"; "lob: null table: 56 id: 4058"; SQL 
> statement:
> SCRIPT  TO 'ReviewDB.zip'  compression zip [90031-174]
>     at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
>     at org.h2.message.DbException.get(DbException.java:161)
>     at org.h2.message.DbException.convertIOException(DbException.java:318)
>     at org.h2.value.ValueLobDb.getString(ValueLobDb.java:320)
>     at org.h2.value.ValueLobDb.getSQL(ValueLobDb.java:433)
>     at 
> org.h2.command.dml.ScriptCommand.generateInsertValues(ScriptCommand.java:416)
>     at org.h2.command.dml.ScriptCommand.query(ScriptCommand.java:291)
>     at org.h2.command.CommandContainer.query(CommandContainer.java:91)
>     at org.h2.command.Command.executeQuery(Command.java:196)
>     at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:177)
>     at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:156)
>     at org.h2.tools.Script.processScript(Script.java:126)
>     at org.h2.tools.Script.runTool(Script.java:111)
>     at org.h2.tools.Script.main(Script.java:53)
> Caused by: java.io.IOException: org.h2.jdbc.JdbcSQLException: IO 
> Exception: "Missing lob entry, block: 2241" [90028-174]
>     at 
> org.h2.message.DbException.convertToIOException(DbException.java:351)
>     at 
> org.h2.store.LobStorageBackend$LobInputStream.fillBuffer(LobStorageBackend.java:780)
>     at 
> org.h2.store.LobStorageBackend$LobInputStream.readFully(LobStorageBackend.java:752)
>     at 
> org.h2.store.LobStorageBackend$LobInputStream.read(LobStorageBackend.java:743)
>     at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
>     at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
>     at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
>     at java.io.InputStreamReader.read(InputStreamReader.java:184)
>     at java.io.BufferedReader.fill(BufferedReader.java:161)
>     at java.io.BufferedReader.read1(BufferedReader.java:212)
>     at java.io.BufferedReader.read(BufferedReader.java:286)
>     at org.h2.util.IOUtils.copyAndCloseInput(IOUtils.java:196)
>     at org.h2.util.IOUtils.readStringAndClose(IOUtils.java:301)
>     at org.h2.value.ValueLobDb.getString(ValueLobDb.java:310)
>     ... 10 more
> Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "Missing lob entry, 
> block: 2241" [90028-174]
>     at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
>     at org.h2.message.DbException.get(DbException.java:172)
>     at org.h2.message.DbException.get(DbException.java:149)
>     at org.h2.store.LobStorageBackend.readBlock(LobStorageBackend.java:237)
>     at 
> org.h2.store.LobStorageBackend$LobInputStream.fillBuffer(LobStorageBackend.java:776)
>     ... 22 more
>
> How does my recovered database start off being corrupt?  Is there 
> something I need to fix/edit in the ReviewDB.h2.sql to prevent this?  
> Should I use a newer version of H2 for this recovery?  I am currently using 
> 1.3.174.
>
> I have run a recover on this recovered database and still have a missing 
> lob, just a different id.
>
> Michael
>
> [1] This is a modified version of Script to use userid/password of null
>

-- 
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 https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to