Discussion:
[h2] H2 corrupted DB
Osvaldas Ziukas
2015-04-29 10:40:36 UTC
Permalink
This happend with newest H2 version i got and updated programs. h2-1.4.187.jar

In 3 Days i renewed ~200 client programs, same happend to at least 5


04-28 16:53:35 database: flush
org.h2.message.DbException: General error: "java.lang.IllegalStateException: Reading from cache:nio:/home/gmps/mobile/database/localDb_v3.66.mv.db failed; file length 589824 read length 384 at 639611 [1.4.187/1]" [50000-187]
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.convert(DbException.java:295)
at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:93)
at org.h2.mvstore.MVStore.panic(MVStore.java:368)
at org.h2.mvstore.MVStore.<init>(MVStore.java:351)
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2782)
at org.h2.mvstore.db.MVTableEngine$Store.<init>(MVTableEngine.java:162)
at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:98)
at org.h2.engine.Database.getPageStore(Database.java:2389)
at org.h2.engine.Database.open(Database.java:669)
at org.h2.engine.Database.openDatabase(Database.java:266)
at org.h2.engine.Database.<init>(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.<init>(JdbcConnection.java:108)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
at org.h2.Driver.connect(Driver.java:72)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at lt.dekbera.mobileClient.model.dBservice.H2localDb.connectToDB(H2localDb.java:981)
at lt.dekbera.mobileClient.model.dBservice.H2localDb.connectToDB(H2localDb.java:987)
at lt.dekbera.mobileClient.model.dBservice.H2localDb.<init>(H2localDb.java:40)
at lt.dekbera.mobileClient.DataManager.<init>(DataManager.java:103)
at lt.dekbera.mobileClient.MobileClientUIService.initNewModules(MobileClientUIService.java:525)
at lt.dekbera.mobileClient.MobileClientUIService.<init>(MobileClientUIService.java:72)
at lt.dekbera.mobileClient.MobileClient.initService(MobileClient.java:64)
at lt.dekbera.mobileClient.MobileClient.start(MobileClient.java:44)
at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication$3$1.run(Unknown Source)
--
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-***@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Thomas Mueller
2015-04-29 18:37:17 UTC
Permalink
Hi,

The database is trying to read past the end of the file... Would it be
possible to send me the database file to investigate?

Regards,
Thomas
Post by Osvaldas Ziukas
This happend with newest H2 version i got and updated programs. h2-1.4.187.jar
In 3 Days i renewed ~200 client programs, same happend to at least 5
04-28 16:53:35 database: flush
org.h2.message.DbException: General error: "java.lang.IllegalStateException: Reading from cache:nio:/home/gmps/mobile/database/localDb_v3.66.mv.db failed; file length 589824 read length 384 at 639611 [1.4.187/1]" [50000-187]
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.convert(DbException.java:295)
at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:93)
at org.h2.mvstore.MVStore.panic(MVStore.java:368)
at org.h2.mvstore.MVStore.<init>(MVStore.java:351)
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2782)
at org.h2.mvstore.db.MVTableEngine$Store.<init>(MVTableEngine.java:162)
at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:98)
at org.h2.engine.Database.getPageStore(Database.java:2389)
at org.h2.engine.Database.open(Database.java:669)
at org.h2.engine.Database.openDatabase(Database.java:266)
at org.h2.engine.Database.<init>(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.<init>(JdbcConnection.java:108)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
at org.h2.Driver.connect(Driver.java:72)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at lt.dekbera.mobileClient.model.dBservice.H2localDb.connectToDB(H2localDb.java:981)
at lt.dekbera.mobileClient.model.dBservice.H2localDb.connectToDB(H2localDb.java:987)
at lt.dekbera.mobileClient.model.dBservice.H2localDb.<init>(H2localDb.java:40)
at lt.dekbera.mobileClient.DataManager.<init>(DataManager.java:103)
at lt.dekbera.mobileClient.MobileClientUIService.initNewModules(MobileClientUIService.java:525)
at lt.dekbera.mobileClient.MobileClientUIService.<init>(MobileClientUIService.java:72)
at lt.dekbera.mobileClient.MobileClient.initService(MobileClient.java:64)
at lt.dekbera.mobileClient.MobileClient.start(MobileClient.java:44)
at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication$3$1.run(Unknown Source)
--
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
.
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+***@googlegroups.com.
To post to this group, send email to h2-***@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Osvaldas Ziukas
2015-04-29 22:26:20 UTC
Permalink
Hello here is db 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+***@googlegroups.com.
To post to this group, send email to h2-***@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Thomas Mueller
2015-05-05 05:45:57 UTC
Permalink
Hi,

That's strange. The last part of the file is missing.

Looking at the H2 source code, the file truncate code is very simple and
conservative (MVStore.shrinkFileIfPossible, which is calling
getFileLengthInUse). It looks unlikely that there is a bug in this area.

Could you describe what you did to get into this state? One possible way to
get into this situation is to copy the database file while it is in use,
without using the online backup command. Or truncate the file in some other
way. Other than that, I wouldn't know a way. Do you have a reproducible
test case?

Regards
Thomas
Hello here is db 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
.
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+***@googlegroups.com.
To post to this group, send email to h2-***@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Osvaldas Ziukas
2015-05-05 06:50:34 UTC
Permalink
Post by Thomas Mueller
Hi,
That's strange. The last part of the file is missing.
Looking at the H2 source code, the file truncate code is very simple and
conservative (MVStore.shrinkFileIfPossible, which is calling
getFileLengthInUse). It looks unlikely that there is a bug in this area.
Could you describe what you did to get into this state? One possible way
to get into this situation is to copy the database file while it is in use,
without using the online backup command. Or truncate the file in some other
way. Other than that, I wouldn't know a way. Do you have a reproducible
test case?
Regards
Thomas
Hello here is db 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
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Sadly no, we use H2 database in our aplications and this issue happens
sometimes, first appearance noticed after half an year of work. As far as i
know no one copy modify of effect db and it happens during h2 use. Only
effects who can reduce size of db are old records delete by id, nothing
else.
--
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-***@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Thomas Mueller
2015-10-15 15:50:04 UTC
Permalink
Hi,

FYI this problem is fixed since version 1.4.188. The problem was that if
writes were re-ordered, and a power failure occurred, truncate was
sometimes done before a previous write.

Regards,
Thomas
Post by Osvaldas Ziukas
Post by Thomas Mueller
Hi,
That's strange. The last part of the file is missing.
Looking at the H2 source code, the file truncate code is very simple and
conservative (MVStore.shrinkFileIfPossible, which is calling
getFileLengthInUse). It looks unlikely that there is a bug in this area.
Could you describe what you did to get into this state? One possible way
to get into this situation is to copy the database file while it is in use,
without using the online backup command. Or truncate the file in some other
way. Other than that, I wouldn't know a way. Do you have a reproducible
test case?
Regards
Thomas
Hello here is db 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
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Sadly no, we use H2 database in our aplications and this issue happens
sometimes, first appearance noticed after half an year of work. As far as i
know no one copy modify of effect db and it happens during h2 use. Only
effects who can reduce size of db are old records delete by id, nothing
else.
--
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
.
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+***@googlegroups.com.
To post to this group, send email to h2-***@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Alex. Sun
2016-01-30 09:14:09 UTC
Permalink
Hi,

I have the same problem with version 1.4.190, any suggestion?

圚 2015幎10月15日星期四 UTC+8䞋午11:50:09Thomas Mueller写道
Post by Thomas Mueller
Hi,
FYI this problem is fixed since version 1.4.188. The problem was that if
writes were re-ordered, and a power failure occurred, truncate was
sometimes done before a previous write.
Regards,
Thomas
Post by Osvaldas Ziukas
Post by Thomas Mueller
Hi,
That's strange. The last part of the file is missing.
Looking at the H2 source code, the file truncate code is very simple and
conservative (MVStore.shrinkFileIfPossible, which is calling
getFileLengthInUse). It looks unlikely that there is a bug in this area.
Could you describe what you did to get into this state? One possible way
to get into this situation is to copy the database file while it is in use,
without using the online backup command. Or truncate the file in some other
way. Other than that, I wouldn't know a way. Do you have a reproducible
test case?
Regards
Thomas
Hello here is db 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
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Sadly no, we use H2 database in our aplications and this issue happens
sometimes, first appearance noticed after half an year of work. As far as i
know no one copy modify of effect db and it happens during h2 use. Only
effects who can reduce size of db are old records delete by id, nothing
else.
--
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
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+***@googlegroups.com.
To post to this group, send email to h2-***@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Vasil Stoynev
2017-04-21 09:05:18 UTC
Permalink
Hi,

unfortunately the problem seems to persist.

Happened with v. 1.4.193 and MVStore. Root cause is java.io.EOFException
at org.h2.mvstore.DataUtils.readFully(DataUtils.java:423).


Greetings,
Vasil


On Thursday, October 15, 2015 at 6:50:09 PM UTC+3, Thomas Mueller Graf
Post by Thomas Mueller
Hi,
FYI this problem is fixed since version 1.4.188. The problem was that if
writes were re-ordered, and a power failure occurred, truncate was
sometimes done before a previous write.
Regards,
Thomas
Post by Osvaldas Ziukas
Post by Thomas Mueller
Hi,
That's strange. The last part of the file is missing.
Looking at the H2 source code, the file truncate code is very simple and
conservative (MVStore.shrinkFileIfPossible, which is calling
getFileLengthInUse). It looks unlikely that there is a bug in this area.
Could you describe what you did to get into this state? One possible way
to get into this situation is to copy the database file while it is in use,
without using the online backup command. Or truncate the file in some other
way. Other than that, I wouldn't know a way. Do you have a reproducible
test case?
Regards
Thomas
Hello here is db 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
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Sadly no, we use H2 database in our aplications and this issue happens
sometimes, first appearance noticed after half an year of work. As far as i
know no one copy modify of effect db and it happens during h2 use. Only
effects who can reduce size of db are old records delete by id, nothing
else.
--
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
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+***@googlegroups.com.
To post to this group, send email to h2-***@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Florian Fankhauser
2017-05-03 13:32:36 UTC
Permalink
Same problem here.

H2 version: 1.4.195
OS: 64-bit Linux with kernel 4.10
OpenJDK version "1.8.0_121"

Florian

java.lang.IllegalStateException: Reading from nio:/home/flo/database.trace.db
failed; file length 234 read length 7958 at 234 [1.4.195/1]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765)
at org.h2.mvstore.DataUtils.readFully(DataUtils.java:435)
at org.h2.mvstore.FileStore.readFully(FileStore.java:98)
at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:565)
at org.h2.mvstore.MVStore.<init>(MVStore.java:358)
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930)
at org.h2.mvstore.MVStoreTool.compact(MVStoreTool.java:483)
at org.h2.mvstore.MVStoreTool.compact(MVStoreTool.java:440)
at eu.littera.re.admin.backup.BackupJob.h2MVStoreCompactFile(BackupJob.java
:208)
at eu.littera.re.admin.backup.BackupJob.lambda$execute$0(BackupJob.java:151
)
at java.util.Optional.map(Optional.java:215)
at eu.littera.re.admin.backup.BackupJob.execute(BackupJob.java:149)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.EOFException: null
at org.h2.mvstore.DataUtils.readFully(DataUtils.java:423)
... 14 common frames omitted
Post by Osvaldas Ziukas
This happend with newest H2 version i got and updated programs. h2-1.4.187.jar
In 3 Days i renewed ~200 client programs, same happend to at least 5
04-28 16:53:35 database: flush
org.h2.message.DbException: General error: "java.lang.IllegalStateException: Reading from cache:nio:/home/gmps/mobile/database/localDb_v3.66.mv.db failed; file length 589824 read length 384 at 639611 [1.4.187/1]" [50000-187]
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.convert(DbException.java:295)
at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:93)
at org.h2.mvstore.MVStore.panic(MVStore.java:368)
at org.h2.mvstore.MVStore.<init>(MVStore.java:351)
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2782)
at org.h2.mvstore.db.MVTableEngine$Store.<init>(MVTableEngine.java:162)
at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:98)
at org.h2.engine.Database.getPageStore(Database.java:2389)
at org.h2.engine.Database.open(Database.java:669)
at org.h2.engine.Database.openDatabase(Database.java:266)
at org.h2.engine.Database.<init>(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.<init>(JdbcConnection.java:108)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
at org.h2.Driver.connect(Driver.java:72)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at lt.dekbera.mobileClient.model.dBservice.H2localDb.connectToDB(H2localDb.java:981)
at lt.dekbera.mobileClient.model.dBservice.H2localDb.connectToDB(H2localDb.java:987)
at lt.dekbera.mobileClient.model.dBservice.H2localDb.<init>(H2localDb.java:40)
at lt.dekbera.mobileClient.DataManager.<init>(DataManager.java:103)
at lt.dekbera.mobileClient.MobileClientUIService.initNewModules(MobileClientUIService.java:525)
at lt.dekbera.mobileClient.MobileClientUIService.<init>(MobileClientUIService.java:72)
at lt.dekbera.mobileClient.MobileClient.initService(MobileClient.java:64)
at lt.dekbera.mobileClient.MobileClient.start(MobileClient.java:44)
at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication$3$1.run(Unknown Source)
--
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-***@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
gana joe
2018-01-04 01:43:39 UTC
Permalink
in h2-1.4.196.jar I also got this problem .


2018-01-02 23:04:51 053 ->[RxCachedThreadScheduler-1]--[INFO ]--[Bus]--KnxRouter 䞊线,未曟䞊线讟倇
2018-01-02 23:04:51 053 ->[RxCachedThreadScheduler-1]--[INFO ]--[Bus]--匀始䞊线KNX讟倇
2018-01-02 23:04:51 100 ->[RxCachedThreadScheduler-1]--[INFO ]--[Bus]--䞊线讟倇,physicalAddress = 5/1/1 ,mac = KX/5/1/1 ,channel = 1, type =COMMON LIGHT
2018-01-02 23:04:51 116 ->[RxCachedThreadScheduler-1]--[ERROR]--[Bus]--cusume event error
java.lang.IllegalStateException: Could not build lazy iterator for class com.moorgen.knx.bridge.knx.data.KnxDataPoint
at com.j256.ormlite.dao.LazyForeignCollection.closeableIterator(LazyForeignCollection.java:72) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.iterator(LazyForeignCollection.java:54) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.toArray(LazyForeignCollection.java:213) ~[KnxMoorgenBridge.jar:?]
at java.util.ArrayList.<init>(Unknown Source) ~[?:1.8.0_144]
at com.moorgen.knx.bridge.knx.data.KnxDevice.getDatapoints(KnxDevice.java:120) ~[KnxMoorgenBridge.jar:?]
at com.moorgen.knx.bridge.bus.Bus.onlineKnxDevices(Bus.java:154) ~[KnxMoorgenBridge.jar:?]
at com.moorgen.knx.bridge.bus.Bus.lambda$startMessageEventLoop$0(Bus.java:108) ~[KnxMoorgenBridge.jar:?]
at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:61) [KnxMoorgenBridge.jar:?]
at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:399) [KnxMoorgenBridge.jar:?]
at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:175) [KnxMoorgenBridge.jar:?]
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:59) [KnxMoorgenBridge.jar:?]
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:51) [KnxMoorgenBridge.jar:?]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_144]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]
Caused by: java.sql.SQLException: Could not build prepared-query iterator for class com.moorgen.knx.bridge.knx.data.KnxDataPoint
at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:25) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.BaseDaoImpl.createIterator(BaseDaoImpl.java:1102) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.BaseDaoImpl.iterator(BaseDaoImpl.java:608) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.seperateIteratorThrow(LazyForeignCollection.java:309) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.iteratorThrow(LazyForeignCollection.java:83) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.closeableIterator(LazyForeignCollection.java:70) ~[KnxMoorgenBridge.jar:?]
... 17 more
Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: Reading from nio:D:/KnxMoorgenBridge/KnxMoorgenBridge/2017_12_07/bin/devices.mv.db failed; file length 520192 read length 256 at 528630 [1.4.196/1]"; SQL statement:
SELECT * FROM `knx_datapoints` WHERE `device_no` = ? [50000-196]
at org.h2.engine.SessionRemote.done(SessionRemote.java:629) ~[KnxMoorgenBridge.jar:?]
at org.h2.command.CommandRemote.executeQuery(CommandRemote.java:176) ~[KnxMoorgenBridge.jar:?]
at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:111) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.jdbc.JdbcCompiledStatement.runQuery(JdbcCompiledStatement.java:63) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.stmt.SelectIterator.<init>(SelectIterator.java:57) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.stmt.StatementExecutor.buildIterator(StatementExecutor.java:247) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.BaseDaoImpl.createIterator(BaseDaoImpl.java:1098) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.BaseDaoImpl.iterator(BaseDaoImpl.java:608) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.seperateIteratorThrow(LazyForeignCollection.java:309) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.iteratorThrow(LazyForeignCollection.java:83) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.closeableIterator(LazyForeignCollection.java:70) ~[KnxMoorgenBridge.jar:?]
--
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-***@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Ayush Mathur
2018-10-17 17:36:36 UTC
Permalink
Hi,

Is there any update on this issue, we are facing same problem with H2
version 1.4.196 ? It looks like some CTE NPE issues were resolved in
1.4.197: https://github.com/h2database/h2database/issues/645
Post by gana joe
in h2-1.4.196.jar I also got this problem .
2018-01-02 23:04:51 053 ->[RxCachedThreadScheduler-1]--[INFO ]--[Bus]--KnxRouter 䞊线,未曟䞊线讟倇
2018-01-02 23:04:51 053 ->[RxCachedThreadScheduler-1]--[INFO ]--[Bus]--匀始䞊线KNX讟倇
2018-01-02 23:04:51 100 ->[RxCachedThreadScheduler-1]--[INFO ]--[Bus]--䞊线讟倇,physicalAddress = 5/1/1 ,mac = KX/5/1/1 ,channel = 1, type =COMMON LIGHT
2018-01-02 23:04:51 116 ->[RxCachedThreadScheduler-1]--[ERROR]--[Bus]--cusume event error
java.lang.IllegalStateException: Could not build lazy iterator for class com.moorgen.knx.bridge.knx.data.KnxDataPoint
at com.j256.ormlite.dao.LazyForeignCollection.closeableIterator(LazyForeignCollection.java:72) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.iterator(LazyForeignCollection.java:54) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.toArray(LazyForeignCollection.java:213) ~[KnxMoorgenBridge.jar:?]
at java.util.ArrayList.<init>(Unknown Source) ~[?:1.8.0_144]
at com.moorgen.knx.bridge.knx.data.KnxDevice.getDatapoints(KnxDevice.java:120) ~[KnxMoorgenBridge.jar:?]
at com.moorgen.knx.bridge.bus.Bus.onlineKnxDevices(Bus.java:154) ~[KnxMoorgenBridge.jar:?]
at com.moorgen.knx.bridge.bus.Bus.lambda$startMessageEventLoop$0(Bus.java:108) ~[KnxMoorgenBridge.jar:?]
at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:61) [KnxMoorgenBridge.jar:?]
at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:399) [KnxMoorgenBridge.jar:?]
at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:175) [KnxMoorgenBridge.jar:?]
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:59) [KnxMoorgenBridge.jar:?]
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:51) [KnxMoorgenBridge.jar:?]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_144]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]
Caused by: java.sql.SQLException: Could not build prepared-query iterator for class com.moorgen.knx.bridge.knx.data.KnxDataPoint
at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:25) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.BaseDaoImpl.createIterator(BaseDaoImpl.java:1102) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.BaseDaoImpl.iterator(BaseDaoImpl.java:608) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.seperateIteratorThrow(LazyForeignCollection.java:309) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.iteratorThrow(LazyForeignCollection.java:83) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.closeableIterator(LazyForeignCollection.java:70) ~[KnxMoorgenBridge.jar:?]
... 17 more
SELECT * FROM `knx_datapoints` WHERE `device_no` = ? [50000-196]
at org.h2.engine.SessionRemote.done(SessionRemote.java:629) ~[KnxMoorgenBridge.jar:?]
at org.h2.command.CommandRemote.executeQuery(CommandRemote.java:176) ~[KnxMoorgenBridge.jar:?]
at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:111) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.jdbc.JdbcCompiledStatement.runQuery(JdbcCompiledStatement.java:63) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.stmt.SelectIterator.<init>(SelectIterator.java:57) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.stmt.StatementExecutor.buildIterator(StatementExecutor.java:247) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.BaseDaoImpl.createIterator(BaseDaoImpl.java:1098) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.BaseDaoImpl.iterator(BaseDaoImpl.java:608) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.seperateIteratorThrow(LazyForeignCollection.java:309) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.iteratorThrow(LazyForeignCollection.java:83) ~[KnxMoorgenBridge.jar:?]
at com.j256.ormlite.dao.LazyForeignCollection.closeableIterator(LazyForeignCollection.java:70) ~[KnxMoorgenBridge.jar:?]
--
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-***@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Loading...