Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message "Content is not allowed in Prolog" misleading #132

Open
saumier opened this issue Sep 8, 2020 · 2 comments
Open

Error message "Content is not allowed in Prolog" misleading #132

saumier opened this issue Sep 8, 2020 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@saumier
Copy link

saumier commented Sep 8, 2020

I received the error message "Content is not allowed in Prolog" while attempting to upload metadata to the Databus. See the screen shot. The error message appeared just after entering my WebID password. I initially expected problems with my pom.xml, but found none. After several hours, I decided to recreate my WebID and the upload. My initial WebID used a 303 approach to dereferencing, and worked when tested alone using curl, however it did not work with the databus-maven-plugin as expected. I recreated my WebID using a URI hash tag approach to dereferencing, and everything worked.

As a first step, I propose a better error message. The error message could relate to a problem with dereferencing the WebID.

Screen Shot 2020-09-03 at 5 33 21 PM

@JJ-Author
Copy link
Collaborator

JJ-Author commented Sep 8, 2020

Hey thanks for the report.
We had a similar issue yesterday. Our problem was that we did not specify a proper ttl file suffix which prevented Jena/RIOT from correctly guessing the RDF serialization format. Do you have the setup of the old WebId for testing because I am not entirely sure whether 303 was the problem Jena doc says:

org.apache.jena.rdf.model.Model public abstract Model read(String url)
Add the RDF statements from a document. Uses content negotiation to request appropriate mime types. If the content type is not found, it may guess from the URL.
See Model for a description of how to traverse a firewall.
See "Reading and Writing RDF in Apache Jena"  for more information about determining the syntax.

Tasks:

  • I totally agree the message from Jena is not very useful and should be catched and translated into a useful message
  • Detection of webid serialization format should be improved maybe use https://github.com/dice-group/rdfdetector
  • test webid below from saumier
  • make sure backend uses same strategy to verify the webid (that was the bug with the dnkg certificate having no ttl suffix leading to pass in mvn validate but not in server side because of SAN mismatch)

@JJ-Author JJ-Author added the enhancement New feature or request label Sep 8, 2020
@saumier
Copy link
Author

saumier commented Sep 9, 2020

Here is my old WebID you can test at https://graph.culturecreates.com/id/gregory-saumier-finch which does a "hand made" 303 style content negotiation returning either turtle, json-ld or html. The error may be at my end since I was experimenting with Amazon API Gateway and a Lambda function to do the dereferencing ;-)

@JJ-Author JJ-Author added the bug Something isn't working label Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants