Giter Club home page Giter Club logo

Comments (6)

afs avatar afs commented on June 25, 2024

Hi @tgreenwood -- There is nothing I can see in the code history that suggests a change except a fix around digest auth but that was a bug fix. Dependencies may have been updated.

A mock up of your description seems to work (5.1.0 development codebase).

What does stop working cover? Is there anything in the server log file?

    public static void main2488() {
        FusekiLogging.setLogging();
        SPARQL_QueryDataset custom = new SPARQL_QueryDataset() {
            @Override
            protected void validateRequest(HttpAction action) {
                System.err.println("EXT::validateRequest");
                super.validateRequest(action);
            }
            @Override
            protected void executeWithParameter(HttpAction action) {
                System.err.println("EXT::executeWithParameter");
                super.executeWithParameter(action);
            }
            @Override
            protected void executeBody(HttpAction action) {
                System.err.println("EXT::executeBody");
                super.executeBody(action);
            }
        };

        DatasetGraph dsg = DatasetGraphFactory.createTxnMem();

        var operationRegistry = OperationRegistry.createStd();
        operationRegistry.register(
                        Operation.Query,
                        WebContent.contentTypeSPARQLQuery,
                        custom /*<custom SPARQL_QueryDataset>*/);
        FusekiServer server = FusekiServer.create(operationRegistry)
                        .verbose(true)
                        //.securityHandler(<custom handler>)
                        .add("/api/rdf", dsg /*<custom DatasetGraphFilteredView>*/, false)
                        .port(0)
                        .start();
        try {
            try ( QueryExec qExec =
                    QueryExecHTTP.service("http://localhost:"+server.getPort()+"/api/rdf")
                    .query("ASK{}")
                    //.urlGetLimit(0)
                    .build();
                    ) {
                qExec.ask();
            }
        } finally { server.stop() ; }
    }

from jena.

tgreenwood avatar tgreenwood commented on June 25, 2024

Hi @afs ,
many thanks for quick reply. My bad, I shared not full config, I missed also .addFilter() method adding custom endpoints which, as turned out, was the root cause of the problem.

It is still strange to me as it works just fine if I add a pretty simple filter which just pass the request. But with the production used filters it does not work. In the production code we pass the a group of endpoints implemented via javaspark framework, and the issue emerges in exception handling. I added there a logic to skip the endpoint for SPARQL query and it works just fine. The thing I am still confused about is that we did't change the version of JavaSpark, the issue is reproduced only when I upgrade Jena version. I guess that something has changed in Jetty, like filters priority or something like that. Any ideas?

Off-topic (let me know if I should raise a separate question for that): we are using DatasetGraphMonitor in our app having a lot of logic to perform post-actions within transaction. It's being removed, what should be used instead?

from jena.

afs avatar afs commented on June 25, 2024

Off-topic (let me know if I should raise a separate question for that)

Yes please. We can close this issue if it's addressed.

from jena.

afs avatar afs commented on June 25, 2024

I guess that something has changed in Jetty, like filters priority or something like that. Any ideas?

Sorry - no. Jetty was updated 10.0.9 to 10.010 from Jena 4.50 to Jena 4.6.0 - that's unlikely to have an effect.

from jena.

tgreenwood avatar tgreenwood commented on June 25, 2024

Hm, then I am confused. But many-many thanks anyway, the question can be closed

from jena.

afs avatar afs commented on June 25, 2024

If you find a reason, do let us know. I'm curious as to what changed.

from jena.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.