After migrating production database (data can not be shared) from Stardog 6 to Stardog 7 -- using backup/restore functionality -- the database throws an exception to a simple select * where {?s ?p ?o} limit 5
query executed via Stardog Studio:
ERROR 2019-11-04 13:59:47,739 [stardog-user-8] com.stardog.http.server.undertow.ErrorHandling:writeError(138): Unexpected error on the server
com.complexible.stardog.StardogException: java.lang.String cannot be cast to java.lang.Boolean
at com.complexible.stardog.StardogKernel.getConnection(StardogKernel.java:1126) ~[stardog-7.0.2.jar:?]
at com.complexible.stardog.protocols.http.server.KernelHttpService$ConnectionOptions.connect(KernelHttpService.java:117) ~[stardog-protocols-http-server-7.0.2.jar:?]
at com.complexible.stardog.protocols.http.server.KernelHttpService.openConnection(KernelHttpService.java:68) ~[stardog-protocols-http-server-7.0.2.jar:?]
at com.complexible.stardog.protocols.http.server.SPARQLProtocol.executeQuery(SPARQLProtocol.java:111) ~[stardog-protocols-http-server-7.0.2.jar:?]
at com.complexible.stardog.protocols.http.server.SPARQLProtocol.post(SPARQLProtocol.java:92) ~[stardog-protocols-http-server-7.0.2.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.0.2.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
at com.complexible.stardog.StardogKernel.getConnection(StardogKernel.java:1060) ~[stardog-7.0.2.jar:?]
... 10 more
ERROR 2019-11-04 13:59:55,308 [stardog-user-1] com.stardog.http.server.undertow.ErrorHandling:writeError(138): Unexpected error on the server
com.complexible.stardog.StardogException: java.lang.String cannot be cast to java.lang.Boolean
at com.complexible.stardog.StardogKernel.getConnection(StardogKernel.java:1126) ~[stardog-7.0.2.jar:?]
at com.complexible.stardog.protocols.http.server.KernelHttpService$ConnectionOptions.connect(KernelHttpService.java:117) ~[stardog-protocols-http-server-7.0.2.jar:?]
at com.complexible.stardog.protocols.http.server.KernelHttpService.openConnection(KernelHttpService.java:68) ~[stardog-protocols-http-server-7.0.2.jar:?]
at com.complexible.stardog.protocols.http.server.SPARQLProtocol.executeQuery(SPARQLProtocol.java:111) ~[stardog-protocols-http-server-7.0.2.jar:?]
at com.complexible.stardog.protocols.http.server.SPARQLProtocol.post(SPARQLProtocol.java:92) ~[stardog-protocols-http-server-7.0.2.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.0.2.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
at com.complexible.stardog.StardogKernel.getConnection(StardogKernel.java:1060) ~[stardog-7.0.2.jar:?]
... 10 more
I have executed stardog-admin db offline stardog && stardog-admin db repair stardog
, which took about 2h and yielded no results (still the same exception).
I have executed stardog-admin db optimize stardog
as well to see if this helps, but the query still fails with the same exception.
In addition to that restore process on stardog 7 was painfully slow:
# 8 cores, ssd drive
# STARDOG_SERVER_JAVA_ARGS=-Xms8g -Xmx8g -XX:MaxDirectMemorySize=16g
Node XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX: Successfully restored database 'stardog' from Backup(/backups/20XX-XX-XX) in 02:27:57.736.
The size of the directories after the backup restoration:
bash-5.0# du -d 1 -h
4.0K ./tmp_sst_data
16.0K ./system
4.0K ./.spilling
5.3G ./data
466.5M ./stardog
29.2G .
What can be attempted to fix the database?