Hi,
I keep getting the following error when updating a graph through the Jena API
ERROR 2017-06-25 14:21:56,617 [XNIO-1 task-5] com.complexible.tx.api.impl.DefaultTransaction:computePrepareResult(496): There was a fatal failure during preparation of 89a90ede-9275-4397-8a40-57092f104ce9
com.complexible.tx.api.ResourceTransactionException:
at com.complexible.stardog.spatial.db.GeospatialConnectableConnection$GeoTransaction.prepare(GeospatialConnectableConnection.java:275) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.tx.api.BaseResourceTransaction.prepare(BaseResourceTransaction.java:187) ~[stardog-5.0.jar:?]
at com.complexible.tx.api.impl.DefaultTransaction.computePrepareResult(DefaultTransaction.java:480) ~[stardog-5.0.jar:?]
at com.complexible.tx.api.impl.DefaultTransaction.runPreparePhase(DefaultTransaction.java:446) ~[stardog-5.0.jar:?]
at com.complexible.tx.api.impl.DefaultTransaction.commit(DefaultTransaction.java:333) ~[stardog-5.0.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl.commit(ConnectableIndexRWConnectionImpl.java:533) ~[stardog-5.0.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.commit(DatabaseConnectionImpl.java:447) ~[stardog-5.0.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:282) ~[stardog-5.0.jar:?]
at com.complexible.stardog.db.DatabaseImpl$MonitoredDbConnection.commit(DatabaseImpl.java:1664) ~[stardog-5.0.jar:?]
at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.commit(DatabaseImpl.java:1433) ~[stardog-5.0.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:282) ~[stardog-5.0.jar:?]
at com.complexible.stardog.StardogKernel$KernelDbConnection.commit(StardogKernel.java:3106) ~[stardog-5.0.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:282) ~[stardog-5.0.jar:?]
at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.commit(StardogKernel.java:3374) ~[stardog-5.0.jar:?]
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeCommit(ProtocolUtils.java:557) ~[stardog-protocols-http-server-5.0.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.commit(TransactionService.java:127) ~[stardog-protocols-http-server-5.0.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$91(ExtractRoutes.java:186) ~[stardog-protocols-http-server-5.0.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) ~[shiro-core-1.2.3.jar:1.2.3]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) ~[shiro-core-1.2.3.jar:1.2.3]
at com.stardog.http.server.undertow.ErrorHandling.lambda$safeDispatch$46(ErrorHandling.java:70) ~[stardog-protocols-http-server-5.0.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: com.complexible.stardog.spatial.GeoException: com.complexible.stardog.spatial.GeoException: java.lang.RuntimeException: org.apache.lucene.store.LockObtainFailedException: Lock held by this virtual machine: /home/stardog/test/spatial/write.lock
at com.complexible.stardog.spatial.io.StatementSourceGeospatialSource.parse(StatementSourceGeospatialSource.java:146) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectable.reindex(GeospatialConnectable.java:157) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectableConnection.reindex(GeospatialConnectableConnection.java:170) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectableConnection$GeoTransaction.prepare(GeospatialConnectableConnection.java:267) ~[stardog-spatial-core-5.0.jar:?]
... 22 more
Caused by: com.complexible.stardog.spatial.GeoException: java.lang.RuntimeException: org.apache.lucene.store.LockObtainFailedException: Lock held by this virtual machine: /home/stardog/test/spatial/write.lock
at com.complexible.stardog.spatial.impl.LuceneGeospatialIndexConnection.add(LuceneGeospatialIndexConnection.java:380) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectable.lambda$reindex$1(GeospatialConnectable.java:159) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.io.StatementSourceGeospatialSource.parse(StatementSourceGeospatialSource.java:137) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectable.reindex(GeospatialConnectable.java:157) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectableConnection.reindex(GeospatialConnectableConnection.java:170) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectableConnection$GeoTransaction.prepare(GeospatialConnectableConnection.java:267) ~[stardog-spatial-core-5.0.jar:?]
... 22 more
Caused by: java.lang.RuntimeException: org.apache.lucene.store.LockObtainFailedException: Lock held by this virtual machine: /home/stardog/test/spatial/write.lock
at com.complexible.stardog.spatial.impl.LuceneGeospatialIndexConnection.acquireIndexWriter(LuceneGeospatialIndexConnection.java:501) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.impl.LuceneGeospatialIndexConnection.add(LuceneGeospatialIndexConnection.java:376) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectable.lambda$reindex$1(GeospatialConnectable.java:159) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.io.StatementSourceGeospatialSource.parse(StatementSourceGeospatialSource.java:137) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectable.reindex(GeospatialConnectable.java:157) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectableConnection.reindex(GeospatialConnectableConnection.java:170) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectableConnection$GeoTransaction.prepare(GeospatialConnectableConnection.java:267) ~[stardog-spatial-core-5.0.jar:?]
... 22 more
Caused by: org.apache.lucene.store.LockObtainFailedException: Lock held by this virtual machine: /home/stardog/test/spatial/write.lock
at org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:127) ~[lucene-core-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:38:09]
at org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41) ~[lucene-core-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:38:09]
at org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45) ~[lucene-core-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:38:09]
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:775) ~[lucene-core-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:38:09]
at com.complexible.stardog.search.waldo.IndexWriterManager.getWriter(IndexWriterManager.java:79) ~[stardog-search-waldo-5.0.jar:?]
at com.complexible.stardog.search.waldo.IndexWriterManager.acquire(IndexWriterManager.java:43) ~[stardog-search-waldo-5.0.jar:?]
at com.complexible.stardog.spatial.impl.LuceneGeospatialIndexConnection.acquireIndexWriter(LuceneGeospatialIndexConnection.java:497) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.impl.LuceneGeospatialIndexConnection.add(LuceneGeospatialIndexConnection.java:376) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectable.lambda$reindex$1(GeospatialConnectable.java:159) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.io.StatementSourceGeospatialSource.parse(StatementSourceGeospatialSource.java:137) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectable.reindex(GeospatialConnectable.java:157) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectableConnection.reindex(GeospatialConnectableConnection.java:170) ~[stardog-spatial-core-5.0.jar:?]
at com.complexible.stardog.spatial.db.GeospatialConnectableConnection$GeoTransaction.prepare(GeospatialConnectableConnection.java:267) ~[stardog-spatial-core-5.0.jar:?]
... 22 more
Graphs which contained WKT POINT geometries are not inserted into the database, the spatial index is on
We are running Stardog 5.
Bart