I using dockerized version of Blazegraph (https://hub.docker.com/r/nawer/blazegraph) and I am trying to import a large file to Blazegraph. It gave me a warning "File too large, enter the path to file" with an example (/path/to/Thesaurus.owl). So I described the path as follows in the update part.
/home/erwarth/Downloads/Thesaurus.OWL/Thesaurus.owl
However when I submit the data I am receiving the following error
Caused by: java.io.FileNotFoundException: /home/erwarth/Downloads/Thesaurus.OWL/Thesaurus.owl (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at java.io.FileInputStream.(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at com.bigdata.rdf.sail.webapp.InsertServlet$InsertWithURLsTask.call(InsertServlet.java:561)
at com.bigdata.rdf.sail.webapp.InsertServlet$InsertWithURLsTask.call(InsertServlet.java:417)
at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
Does anybody have an idea?
The error message you're seeing, java.io.FileNotFoundException: /home/erwarth/Downloads/Thesaurus.OWL/Thesaurus.owl (No such file or directory), indicates that Blazegraph, running within the Docker container, is unable to locate the file at the given path.
This is likely due to Docker's architecture, where each Docker container maintains its own separate file system. Therefore, a file path like /home/erwarth/Downloads/Thesaurus.OWL/Thesaurus.owl within a Docker container doesn't refer to the host system's file system (where the file actually is), but instead to the Docker container's own file system.
To solve this issue, you'll need to bind mount the host directory (where your file is located) into the Docker container during its initialization. The following is an example of how you can achieve this:
docker run -d -v /home/erwarth/Downloads/Thesaurus.OWL:/data -p 9999:9999 nawer/blazegraphThe -v /home/erwarth/Downloads/Thesaurus.OWL:/data portion of this command tells Docker to bind mount the /home/erwarth/Downloads/Thesaurus.OWL directory from your host machine into a directory named /data within the Docker container.
After executing the above command, when you try to upload the file in Blazegraph, you should use the following path:
/data/Thesaurus.owlThe file should be accessible to Blazegraph now, as /data/Thesaurus.owl is a valid path within the Docker container.
Please replace /home/erwarth/Downloads/Thesaurus.OWL with the correct path to the directory on your host machine where your OWL file is located.