HughP / simal

Automatically exported from code.google.com/p/simal
0 stars 0 forks source link

Trap more blank references in submitted RDF #400

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I generated this RDF through the (modified) doapcreator. (I don't think the 
modification is relevant unless the RDF it produces is somehow defective - the 
saving is still taking place through the REST interface). It appeared to save 
ok, but it doesn't show up in the list of projects. Accessing the project by 
URL shows the very short message "Internal error. Return to home page."

The RDF and logs attached.

To give as much context as possible, I started with a clean database. I added a 
couple of records using the doapcreator (including the Redbox record which 
caused the previously reported problem - this time, no problem for some 
reason). This record is very similar or identical to one I had previously added 
successfully.

Original issue reported on code.google.com by Stevage on 3 Mar 2011 at 6:56

Attachments:

GoogleCodeExporter commented 9 years ago
Looking at the rdf you feed in, all of these fields are empty:
- name
- shortname
- shortdesc
- description
Related to that, the project that is generated by the doapcreator to identify 
the project is also empty:
  <Project rdf:about="http://registry.oss-watch.ac.uk//">

This is bad practice because if you do this multiple times you effectively tell 
Simal these projects are all the same project.

There should be more checks server-side to make sure submissions like these are 
not accepted.

Because the description is empty, once you request the page in Simal, it tries 
to work with the empty description, which leads to the error. I found this by 
going through the stack trace in the log file.

The original cause:

(59) Caused by: java.lang.NullPointerException
...
(65) at  
uk.ac.osswatch.simal.model.jena.DoapResource.setDescription(DoapResource.java:12
9)

Original comment by sander.v...@gmail.com on 3 Mar 2011 at 10:04

GoogleCodeExporter commented 9 years ago
I'd point out that this is the exact same error I debugged for you in an 
earlier issue.

I agree with Sander that we should try and catch these on the Simal side, but 
the problem is firmly in your RDF. 

Changing the issue summary to reflect the nature of this issue, Also lowering 
the priority and scheduling for a 0.3 release as this is user error and whilst 
we should be trapping it such stability is only really needed when we are out 
of alpha.

Original comment by ross.gardler on 3 Mar 2011 at 10:21

GoogleCodeExporter commented 9 years ago
Thanks, and sorry for reporting a similar issue twice - I was thrown by the 
different manifestation (no stack trace, just the "internal error"). The 
projects all having the same URL was presumably caused by the same bug in my 
code that lead to those other fields being blank.

(I'm still trying to find the balance in reporting these bugs between reporting 
everything, and reporting only things that I have investigated, and that I need 
support on. I'm not really used to such immediate attention. On another project 
I work on, bugs are sometimes reported simply as a way for developers to not 
forget to investigate them later - it doesn't mean that there's an immediate 
problem.)

Original comment by Stevage on 7 Mar 2011 at 3:58