title: H2 - General error: "java.lang.NullPointerException" [50000-182]
body: <p>I have a quite big (>2.5 GB) h2 database file. Driver version is 1.4.182. Everything worked fine but recently the DB stop to work with exception:</p>
  
  <pre><code>Błąd ogólny: "java.lang.NullPointerException"
  General error: "java.lang.NullPointerException" [50000-182] HY000/50000 (Help)
  org.h2.jdbc.JdbcSQLException: Błąd ogólny: "java.lang.NullPointerException"
  General error: "java.lang.NullPointerException" [50000-182] 
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) 
      at org.h2.message.DbException.get(DbException.java:168) 
      at org.h2.message.DbException.convert(DbException.java:295) 
      at org.h2.engine.Database.openDatabase(Database.java:297) 
      at org.h2.engine.Database.&lt;init&gt;(Database.java:260) 
      at org.h2.engine.Engine.openSession(Engine.java:60) 
      at org.h2.engine.Engine.openSession(Engine.java:167) 
      at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145) 
      at org.h2.engine.Engine.createSession(Engine.java:128) 
      at org.h2.engine.Engine.createSession(Engine.java:26) 
      at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:347) 
      at org.h2.jdbc.JdbcConnection.&lt;init&gt;(JdbcConnection.java:108) 
      at org.h2.jdbc.JdbcConnection.&lt;init&gt;(JdbcConnection.java:92) 
      at org.h2.Driver.connect(Driver.java:72) 
      at org.h2.server.web.WebServer.getConnection(WebServer.java:750) 
      at org.h2.server.web.WebApp.test(WebApp.java:895) 
      at org.h2.server.web.WebApp.process(WebApp.java:221) 
      at org.h2.server.web.WebApp.processRequest(WebApp.java:170) 
      at org.h2.server.web.WebThread.process(WebThread.java:137) 
      at org.h2.server.web.WebThread.run(WebThread.java:93) 
      at java.lang.Thread.run(Thread.java:722) 
  Caused by: java.lang.NullPointerException 
      at org.h2.mvstore.db.ValueDataType.compare(ValueDataType.java:102) 
      at org.h2.mvstore.MVMap.compare(MVMap.java:741) 
      at org.h2.mvstore.Page.binarySearch(Page.java:388) 
      at org.h2.mvstore.MVMap.put(MVMap.java:179) 
      at org.h2.mvstore.MVMap.put(MVMap.java:133) 
      at org.h2.mvstore.db.TransactionStore.rollbackTo(TransactionStore.java:491) 
      at org.h2.mvstore.db.TransactionStore$Transaction.rollback(TransactionStore.java:785) 
      at org.h2.mvstore.db.MVTableEngine$Store.initTransactions(MVTableEngine.java:223) 
      at org.h2.engine.Database.open(Database.java:736) 
      at org.h2.engine.Database.openDatabase(Database.java:266) 
  ... 17 more 
  </code></pre>
  
  <p>The problem occurs in my application and using H2 web frontend.
  I have tried solution from <a href="https://stackoverflow.com/questions/21724841/generic-error-50000-175-caused-by-nullpointerexception">similar question</a> but I cannot downgrade H2 to 1.3.x as it cannot read 1.4.x DB files. </p>
  
  <p><strong>My questions are</strong>:</p>
  
  <p>How to handle it? Is it to possible to make it work again? I have tried downgrade H2 to 1.4.177 but it didn't help.</p>
  
  <p>Is there any way to at least recover data to other format? I could use other DB (Sqlite, etc.) however I would need a way to get to these data.</p>
  
  <p><strong>EDIT:</strong> updated stacktrace</p>
  
  <p><strong>EDIT 2:</strong> Result of using Recovery tool:</p>
  
  <pre><code>$ java -cp h2-1.4.182.jar org.h2.tools.Recover
  Exception in thread "main" java.lang.IllegalStateException: Unknown tag 50 [1.4.182/6]
     at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:762)
     at org.h2.mvstore.type.ObjectDataType.read(ObjectDataType.java:222)
     at org.h2.mvstore.db.TransactionStore$ArrayType.read(TransactionStore.java:1792)
     at org.h2.mvstore.db.TransactionStore$ArrayType.read(TransactionStore.java:1759)
     at org.h2.mvstore.Page.read(Page.java:843)
     at org.h2.mvstore.Page.read(Page.java:230)
     at org.h2.mvstore.MVStore.readPage(MVStore.java:1813)
     at org.h2.mvstore.MVMap.readPage(MVMap.java:769)
     at org.h2.mvstore.Page.getChildPage(Page.java:252)
     at org.h2.mvstore.MVMap.getFirstLast(MVMap.java:351)
     at org.h2.mvstore.MVMap.firstKey(MVMap.java:218)
     at org.h2.mvstore.db.TransactionStore.init(TransactionStore.java:169)
     at org.h2.mvstore.db.TransactionStore.&lt;init&gt;(TransactionStore.java:117)
     at org.h2.mvstore.db.TransactionStore.&lt;init&gt;(TransactionStore.java:81)
     at org.h2.tools.Recover.dumpMVStoreFile(Recover.java:593)
     at org.h2.tools.Recover.process(Recover.java:331)
     at org.h2.tools.Recover.runTool(Recover.java:192)
     at org.h2.tools.Recover.main(Recover.java:155)
  </code></pre>
  
  <p>I also noticed that two another files (.txt and .sql) has been created but they don't seem to contain  a data.</p>