When trying to install the SPARQL module (last version 3.4.5 ) I get this error
Laminas\Router\Exception\RuntimeException
Route with name "sparql" not found
Details:
Laminas\Router\Exception\RuntimeException: Route with name "sparql" not found in /var/www/omeka/omeka-s/vendor/laminas/laminas-router/src/Http/TreeRouteStack.php:364
Stack trace:
#0 /var/www/omeka/omeka-s/vendor/laminas/laminas-mvc/src/Controller/Plugin/Url.php(96): Laminas\Router\Http\TreeRouteStack->assemble()
#1 /var/www/omeka/omeka-s/modules/Sparql/Module.php(111): Laminas\Mvc\Controller\Plugin\Url->fromRoute()
#2 /var/www/omeka/omeka-s/modules/Common/TraitModule.php(113): Sparql\Module->postInstall()
#3 /var/www/omeka/omeka-s/application/src/Module/Manager.php(225): Sparql\Module->install()
#4 /var/www/omeka/omeka-s/application/src/Controller/Admin/ModuleController.php(117): Omeka\Module\Manager->install()
#5 /var/www/omeka/omeka-s/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Omeka\Controller\Admin\ModuleController->installAction()
#6 /var/www/omeka/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch()
#7 /var/www/omeka/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#8 /var/www/omeka/omeka-s/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#9 /var/www/omeka/omeka-s/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch()
#10 /var/www/omeka/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#11 /var/www/omeka/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#12 /var/www/omeka/omeka-s/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#13 /var/www/omeka/omeka-s/index.php(21): Laminas\Mvc\Application->run()
#14 {main}
Previoulsy I have done this configuration as indicated on the module page
a2enmod headers
systemctl restart apache2
Then, you have to add the following rules, adapted to your needs, to the file .htaccess at the root of Omeka S or in the main config of the server:
# CORS access for some files.
<IfModule mod_headers.c>
Header setIfEmpty Access-Control-Allow-Origin "*"
Header setIfEmpty Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header setIfEmpty Access-Control-Allow-Methods "GET, POST"
</IfModule>
The issue is not related to apache or to cors. The module creates a single route to the sparql engine and it is /sparql and in fact the issue was just the message of successful install that is broken… This is fixed in 3.4.6.
Hi, I installed the version 3.4.6 from the source but like peter_b all my queries return error messages like Incomplete or invalid Group Graph pattern. Could not handle ...
The internal sparql parser use protocol 1.0, not 1.1, and there are many functions and sparql structures that are not available. To use full sparql 1.1, you need an external tool. See arc2/doc/SPARQL-support.md at master · semsol/arc2 · GitHub for more info.
Furthermore, the indexation should be run manually for now and you should check the box under “Index in sparql engine” and click on the button Process in the config form of the module regularly.
Well of course I have read carefully the documentation of your module concerning the protocol and I have indexed my data.
My question is more about providing basic examples of queries that one could run to check if everything is Ok and also that could be used as a starter to build their own.
By the way, I have another question: when I use the query form, the response from the server comes as a file named sparql.srx which I have to download. Is it what’s expected or could the response be simply shown as text below the form?
I published a new release and updated the readme with some examples.
For sparql.srx, this is the standard format (SPARQL Query Results XML Format Namespace) used by default by all sparql servers. If you want another one, check the configuration.
Check the configuration of other sparql servers to see if they support another output format. For the module, the endpoint output is only in xml, else you can create a page with a spaql block to get html.
Ok, thank you Daniel. By the way, I’ll be attending a conference in Geneva next week where they organize workshops about SPARQL, Omeka and IIIF (see https://libreabc.ch/)
Hi everyone!
I’m very happy to see life in this thread.
Thank you @Daniel_KM for your work and the information you provide here.
And thank you very much for the query-examples in the README.md - very helpful!
@boregar : Sorry I can’t be at your workshop.
I do believe that more knowledge (and existing tools) for dealing with SPARQL, RDF and IIIF is really a good thing for all long-term handling of digital collections of any kind.
Big thanks to Omeka and it’s team for providing a stable annotation-and-publication environment that is “getting us there”. It’s great to see RDF and IIIF so well in action, and working “out of the box” fully interoperable with other implementations.