Hi Pat,

Never believe what computers tell you! They lie!

Despite being a 403, the bug is not really to do with authentication. It is a bug in the dispatch code specific to way you have the DatasetAccessor setup.

You are using the dataset directly for the GSP operations. The other way is to use the GSP service (usually /data for read-write and /get for read-only).

This fix that should work for 2.3.0:

"http://server:3030/mydataset";
==>
"http://server:3030/mydataset/data";

or /get

The dispatch path is slightly different between service dispatch and dataset dispatch.

2.3.1 development now has a fix (see JENA-1024) where your setp will work and tests to cover the setup.

        Andy

On 08/09/15 23:44, Patrick Hoeffel wrote:
Andy,

Here is the code that is producing the error. It doesn't seem to matter whether 
I provide an Authenticator or not.

         HttpAuthenticator authenticator = new SimpleAuthenticator("admin", 
"pw".toCharArray());
         accessor = 
DatasetAccessorFactory.createHTTP("http://server:3030/mydataset";, 
authenticator);
         if (accessor == null) {
             log.error("Failed to obtain a Dataset through the HTTP accessor at: 
" + props.getProperty(Configuration.PERSISTENCE_PROVIDER_LOCATION));
             return;
         }

         Model model = accessor.getModel(JenaCommon.GRAPH_NAME_SYSTEM);   <== 
THIS IS WHERE THE EXCEPTION OCCURS


Here is the exception:

MultiException stack 1 of 2
org.apache.jena.atlas.web.HttpException: 403 - Forbidden: SPARQL Graph Store 
Protocol : Read operation : GET
        at org.apache.jena.riot.web.HttpOp.exec(HttpOp.java:1107)
        at org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:378)
        at org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:347)
        at 
org.apache.jena.web.DatasetGraphAccessorHTTP.doGet(DatasetGraphAccessorHTTP.java:132)
        at 
org.apache.jena.web.DatasetGraphAccessorHTTP.httpGet(DatasetGraphAccessorHTTP.java:126)
        at org.apache.jena.web.DatasetAdapter.getModel(DatasetAdapter.java:47)
                 ....

MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: create on 
com.issinc.knowtify.service.SolrService
        at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:395)
        at 
org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
        at 
org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:161)
        at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2270)
        at 
org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:687)
        at 
org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:652)
        at 
org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:169)
        at 
org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:185)
        at 
org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:74)
        at 
org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
                 ....

For what it's worth, I am now having success running my GET queries from 
Postman. In fact, I can't seem to get Postman to fail no matter what I try!

If you have any thoughts or insights at all, I would be most grateful to hear 
them!

Best Regards,

Pat Hoeffel


-----Original Message-----
From: Andy Seaborne [mailto:[email protected]]
Sent: Tuesday, September 08, 2015 11:02 AM
To: [email protected]
Subject: Re: Error 403: Forbidden: SPARQL Graph Store Protocol : Read operation 
: GET

On 08/09/15 17:40, Patrick Hoeffel wrote:
I'm using Fuseki 2.3 (Fuseki - version 2.3.0 (Build date: 2015-07-25T17:11:28+0000)). I 
can run Fuseki, connect to my TDB store, read and write data, no problem. When I try to 
connect using Postman or my J2EE service application (via Tomcat), I receive the error: 
"Error 403: Forbidden: SPARQL Graph Store Protocol : Read operation : GET".

What am I missing regarding how to connect?

Hi Patrick,

There a few details that would help, though look at the code I see a potential 
bug.

Which endpoint are you sending the request to?
   It's a GET -- but what's the URL?

How did the dataset get created in the first place?

        Andy


Thanks,

Patrick Hoeffel
Software Engineer
Intelligent Software Solutions (www.issinc.com<http://www.issinc.com>)
(719) 452-7371 (direct)





Reply via email to