Hi Philippe,

The issue is Windows.

There is a bug in the JDK on a NTFS filesystem whereby memory mapped files are not deleted until the JVM exits. The JDK issue is "won't fix".

https://github.com/apache/jena/issues/2092#issuecomment-1810362743

WSL has linux filesystem semantics - no issue.

For you example below, you could PUT the new triples into the dtabase which will clear out the old data.

    Andy

On 20/06/2024 13:51, Philippe Genoud wrote:
I have an issue with Fuseki 5.0.0 running on Windows (10 or 11) when I try to remove a existing dataset using the Web UI.

Here are the operations I'm performing

1) Create en new DataSet named Test1

2) Remove the DataSet

3) In the interface everything seems going fine, no message

But in fact the file (folder Test1 containing the dataset data) is not destroyed on my hard disk and I get a Exception message on the console saying that The process cannot access the file because this file is in use by another process

Here the trace on the console

 >fuseki-server.bat
14:24:31 INFO  Server          :: Apache Jena Fuseki 5.0.0
14:24:31 INFO  Config          :: FUSEKI_HOME=P:\DevTools\SemWeb\Fuseki\apache-jena-fuseki-5.0.0\. 14:24:31 INFO  Config          :: FUSEKI_BASE=P:\DevTools\SemWeb\Fuseki\apache-jena-fuseki-5.0.0\run 14:24:31 INFO  Config          :: Shiro file: file://P:\DevTools\SemWeb\Fuseki\apache-jena-fuseki-5.0.0\run\shiro.ini 14:24:32 INFO  Server          :: Configuration file: P:\DevTools\SemWeb\Fuseki\apache-jena-fuseki-5.0.0\run\config.ttl
14:24:32 INFO  Server          ::   Memory: 1,2 GiB
14:24:32 INFO  Server          ::   Java:   17.0.5
14:24:32 INFO  Server          ::   OS:     Windows 10 10.0 amd64
14:24:32 INFO  Server          ::   PID:    22624
14:24:32 INFO  Server          :: Started 2024/06/20 14:24:32 CEST on port 3030
14:25:14 INFO  Admin           :: [3] Create database : name = /test1
14:25:43 INFO  Admin           :: [5] DELETE dataset=/test1
14:25:43 ERROR Admin           :: [5] Error while deleting database files P:\DevTools\SemWeb\Fuseki\apache-jena-fuseki-5.0.0\run\databases\test1: java.nio.file.FileSystemException: P:\DevTools\SemWeb\Fuseki\apache-jena-fuseki-5.0.0\run\databases\test1\Data-0001\GOSP.bpt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus org.apache.jena.atlas.RuntimeIOException: java.nio.file.FileSystemException: P:\DevTools\SemWeb\Fuseki\apache-jena-fuseki-5.0.0\run\databases\test1\Data-0001\GOSP.bpt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus         at org.apache.jena.atlas.io.IOX.exception(IOX.java:55) ~[fuseki-server.jar:5.0.0]         at org.apache.jena.atlas.io.IO.deleteAll(IO.java:601) ~[fuseki-server.jar:5.0.0]         at org.apache.jena.fuseki.mgt.ActionDatasets.execDeleteItem(ActionDatasets.java:422) ~[fuseki-server.jar:5.0.0]         at org.apache.jena.fuseki.ctl.ActionContainerItem.performDelete(ActionContainerItem.java:99) ~[fuseki-server.jar:5.0.0]         at org.apache.jena.fuseki.ctl.ActionContainerItem.execute(ActionContainerItem.java:45) ~[fuseki-server.jar:5.0.0]         at org.apache.jena.fuseki.ctl.ActionCtl.executeLifecycle(ActionCtl.java:50) ~[fuseki-server.jar:5.0.0]         at org.apache.jena.fuseki.ctl.ActionCtl.process(ActionCtl.java:40) ~[fuseki-server.jar:5.0.0]         at org.apache.jena.fuseki.servlets.ActionExecLib.execActionSub(ActionExecLib.java:127) ~[fuseki-server.jar:5.0.0]

I've tried also with Java 21.0.3 (Oracle JDK) and I got the same message. But when launching fuseki from wsl, everything works fine.

The problem is that if a create a Dataset, put some triples in it, then if a remove it and I create a new dataset with the same name, all the triples stored in the previous deleted one are in the new one.

Is it a known bug ? Is there a workaround ?

Thanks for your help

Philippe


--
Philippe Genoud
Universite Grenoble Alpes
-------------------------------------------------------
STEAMER group
Laboratoire d'Informatique de Grenoble (LIG)
Bâtiment IMAG
700 avenue Centrale
Domaine Universitaire - 38401 St Martin d'Hères
-------------------------------------------------------
adresse postale
LIG - Bâtiment IMAG - CS 40700 - 38058 GRENOBLE CEDEX 9
-------------------------------------------------------
Tel: tel: (+33) (0)4 57 42 15 01

Reply via email to