Hi,

I think I found the problem. It will be fixed in the next release.

Regards,
Thomas


On Wed, Nov 18, 2009 at 7:33 AM, Rafferty <[email protected]> wrote:
> Hi Thomas -
>
> First I'd like to say how much I admire the engineering and
> professionalism of H2.  It's inspiring.
>
> I'm testing 1.2 with an app that I've been running with H2 for some
> time and seeing a new error that I hadn't seen before.
>
> When it opens an existing DB file with ACCESS_MODE_DATA=R it sometimes
> get an exception as below.  It looks like PageStore.recover() is
> getting called, which in turn is calling PageStore.writePage() , which
> bombs out because the conection was opened as read-only.
>
> I'm not sure what recovery is required for this DB.  Possibly, the DB
> is sometimes not being shutdown correctly, because this problem
> doesn't happen all the time.  Once it does, however it persists until
> I make the connection read-write.  Making the connection read-write
> makes the problem go away.
>
> I tested setting ACCESS_MODE_LOG=RW while leaving ACCESS_MODE_DATA=R
> but this didn't help.
>
> org.h2.jdbc.JdbcSQLException: The database is read only [90097-123]
>        at org.h2.message.Message.getSQLException(Message.java:111)
>        at org.h2.message.Message.getSQLException(Message.java:122)
>        at org.h2.message.Message.getSQLException(Message.java:75)
>        at org.h2.message.Message.getSQLException(Message.java:157)
>        at org.h2.engine.Database.checkWritingAllowed(Database.java:1852)
>        at org.h2.store.FileStore.checkWritingAllowed(FileStore.java:166)
>        at org.h2.store.FileStore.write(FileStore.java:332)
>        at org.h2.store.PageStore.writePage(PageStore.java:977)
>        at org.h2.store.PageLog.recover(PageLog.java:267)
>        at org.h2.store.PageStore.recover(PageStore.java:1003)
>        at org.h2.store.PageStore.openExisting(PageStore.java:296)
>        at org.h2.store.PageStore.open(PageStore.java:254)
>        at org.h2.engine.Database.getPageStore(Database.java:2299)
>        at org.h2.engine.Database.open(Database.java:625)
>        at org.h2.engine.Database.openDatabase(Database.java:228)
>        at org.h2.engine.Database.<init>(Database.java:222)
>        at org.h2.engine.Engine.openSession(Engine.java:58)
>        at org.h2.engine.Engine.openSession(Engine.java:142)
>        at org.h2.engine.Engine.getSession(Engine.java:122)
>        at org.h2.engine.SessionFactoryEmbedded.createSession
> (SessionFactoryEmbedded.java:17)
>        at org.h2.engine.SessionRemote.connectEmbeddedOrServer
> (SessionRemote.java:245)
>        at org.h2.engine.SessionRemote.createSession(SessionRemote.java:223)
>        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110)
>        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94)
>        at org.h2.Driver.connect(Driver.java:58)
>        at java.sql.DriverManager.getConnection(DriverManager.java:582)
>        at java.sql.DriverManager.getConnection(DriverManager.java:185)
>
> I'm using H2 1.2.123 on Windows XP with JDK 1.6.0_12
>
> --
>
> You received this message because you are subscribed to the Google Groups "H2 
> Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/h2-database?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=.


Reply via email to