Hi again, After a short talk with a workmate, I understand what's was my problem. The exceptions are RunTimeException and haven't to appear in method signature.
Maybe just add to the comments of UpdateProcessRemoteForm.execute "May throw HTTPException and ARQException" may help someone who received this error to understand the why. Sorry again for the disturbance. VAÏSSE-LESTEVEN Arthur. ________________________________ De : Arthur Vaïsse-Lesteven <[email protected]> À : "[email protected]" <[email protected]> Envoyé le : Lundi 2 septembre 2013 9h47 Objet : Re: SPARQL autentication and HTTP 403 error code Hi, >I don't understand what the issue is. If you get a 403, then the server >is rejecting the update. HttpException indicates such a problem. It is >often useful to distinguish authentication and HTTP issues from, say, >parse errors. I was just expecting that the execute signature of the method include "execute() throws HTTPException {" but I just noticed that the signature doesn't include "throws ARQException". This must be a code design choice of Jena. Sorry for the disturbance. VAÏSSE-LESTEVEN Arthur ________________________________ De : Andy Seaborne <[email protected]> À : [email protected] Envoyé le : Vendredi 30 août 2013 17h48 Objet : Re: SPARQL autentication and HTTP 403 error code Arthur, I don't understand what the issue is. If you get a 403, then the server is rejecting the update. HttpException indicates such a problem. It is often useful to distinguish authentication and HTTP issues from, say, parse errors. Andy On 30/08/13 15:16, Arthur Vaïsse-Lesteven wrote: > Hi, > > It seem that an error occurs when a proxy/server send a 403 HTTP status code > in response to a SPARQL query. > > Stack trace begins by : > > org.apache.jena.atlas.web.HttpException: 403 - Forbidden > at org.apache.jena.riot.web.HttpOp.exec(HttpOp.java:961) > at org.apache.jena.riot.web.HttpOp.execHttpPostForm(HttpOp.java:711) > at com.hp.hpl.jena.sparql.modify.UpdateProcessRemoteForm.execute(UpdateProcessRemoteForm.java:88) > ... > > The code call done before this error is : > > [...] > > UpdateRequest update = UpdateFactory.create(query); > UpdateProcessRemoteForm updateExecution = >(UpdateProcessRemoteForm) UpdateExecutionFactory.createRemoteForm(update, >update_endpoint_ip); > updateExecution.setAuthentication(user_id, >user_pwd.toCharArray()); > updateExecution.execute(); > [...] > A possible fix may be the throw of a new ARQ exception in case of HTTPError > reception. > > VAÏSSE-LESTEVEN Arthur. >
