You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jena.apache.org by GitBox <gi...@apache.org> on 2022/06/23 08:33:26 UTC

[GitHub] [jena] afs opened a new issue, #1399: SERVICE fails in empty context.

afs opened a new issue, #1399:
URL: https://github.com/apache/jena/issues/1399

   ### Version
   
   4.6.0-SNAPSHOT
   
   ### What happened?
   
   Executing a query involving `SERVICE` with an empty context does not work because there is no default service execution.
   
   @Aklakan - for your improvements in this area, could you please ensure that it executes when the context does not have a setting for `ARQConstants.registryServiceExecutors`.
   
   
   ### Which environment is running?
   
   - [ ] macOS
   - [ ] Windows
   - [X] Linux
   - [ ] other
   
   ### Relevant output and stacktrace
   
   ```shell
   public static void main(String...args) {
           FusekiLogging.setLogging();
           FusekiServer server = FusekiServer.create()
                   .port(0)
                   .add("/ds",  DatasetGraphFactory.empty())
                   .start();
           String SERVICE = "http://localhost:"+server.getPort()+"/ds";
           Node expected = NodeFactory.createLiteral("28181", XSDDatatype.XSDinteger);
           String queryString = "SELECT * { SERVICE <"+SERVICE+"> { VALUES ?x { 28181 } } }";
           // Empty context
           Context cxt = new Context();
           //Context cxt = ARQ.getContext().copy();
           RowSet rs = QueryExec.dataset(DatasetGraphFactory.empty())
                   .query(queryString)
                   .context(cxt)
                   .select()
                   .materialize();
           assertTrue(rs.hasNext());
           Node n = rs.next().get("x");
           assertEquals(expected, n);
       }
   ```
   
   
   ### Are you interested in making a pull request?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] Aklakan commented on issue #1399: SERVICE fails in empty context.

Posted by GitBox <gi...@apache.org>.
Aklakan commented on issue #1399:
URL: https://github.com/apache/jena/issues/1399#issuecomment-1164272831

   So the rules should be like follows - right?
   
   - empty context &rarr; default behavior i.e. http service request should work
   - context with present but empty service executor registry &rarr; error because no registered executor
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] afs commented on issue #1399: SERVICE fails in empty context.

Posted by GitBox <gi...@apache.org>.
afs commented on issue #1399:
URL: https://github.com/apache/jena/issues/1399#issuecomment-1165835667

   If you add "This fixes #1399" to the description, magic happens and this issue is automatically closed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] afs commented on issue #1399: SERVICE fails in empty context.

Posted by GitBox <gi...@apache.org>.
afs commented on issue #1399:
URL: https://github.com/apache/jena/issues/1399#issuecomment-1164314008

   Yes.
   
   "Empty context" here means no entry for `ARQConstants.registryServiceExecutors`. The rest of the context is not important.
   
   This is motivated by the work elsewhere dealing with the context for query execution (other registries).
   
   1. There is already a separate flag to turn SERVICE off completely. 
   2. "No entry" should give some default SPARQL execution as expected behaviour.
   
   What happens if there is an empty service executor registry is less important. Your suggestion makes sense to me because it is a configuration error by the application.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] Aklakan commented on issue #1399: SERVICE fails in empty context.

Posted by GitBox <gi...@apache.org>.
Aklakan commented on issue #1399:
URL: https://github.com/apache/jena/issues/1399#issuecomment-1164633108

   I added a fix resolution within #1388 - will test tomorrow.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] afs closed issue #1399: SERVICE fails in empty context.

Posted by GitBox <gi...@apache.org>.
afs closed issue #1399: SERVICE fails in empty context.
URL: https://github.com/apache/jena/issues/1399


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org