chenejac / VIVOTestMigrationJIRAClosed

0 stars 0 forks source link

VIVO-662: Non-deletable multiple author in "Manage Authors" #743

Closed chenejac closed 6 years ago

chenejac commented 10 years ago

Christian Hauschke (Migrated from VIVO-662) said:

When trying to "Manage Authors" for some publications, one author is showing up multiple times (screenshot).

I cannot remove one of them. If I do, the row in question disappears. As soon as I try to remove another one, it's there again.

The multiple authorship does not appear in the public front end.

Version: VIVO 1.6

chenejac commented 10 years ago

Jim Blake said:

Tim, Huda -- any thoughts on this?

chenejac commented 10 years ago

Huda Khan said:

I can take a quick look - it's possible that deletion (which is an ajax request) does not actually work and so the author is still there. I'll have to explore why the same author is showing up multiple times.

chenejac commented 10 years ago

tlw72 said:

I can't recreate this, and I'm able to delete authors without any problem. Could this be a data issue -- was the author and publication added to the system manual or ingested? Would be worth doing a SPARQL query to see what the results are or viewing the raw statements for the publication.

chenejac commented 10 years ago

Huda Khan said:

I am not seeing this problem if I add a publication/authors through the interface. Deleting authors removes them and each author shows up once.

chenejac commented 10 years ago

Christian Hauschke said:

Author and publication were entered manually.

I have to correct myself a bit. Actually I can remove the author, but it's not shown correctly in the "manage authors" page.

The number of author appearances seem to double with every reload of the "manage author site", for example:

vivo.example.de/editRequestDispatch?subjectUri=http%3A%2F%2Fvivo.bib.hs-hannover.de%2Findividual%2Fn1001&predicateUri=http%3A%2F%2Fvivoweb.org%2Fontology%2Fcore%23relatedBy&domainUri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FIAO_0000030&rangeUri=http%3A%2F%2Fvivoweb.org%2Fontology%2Fcore%23Authorship

F5 doubles the authors, see screenshot 2 and 3. I only reloaded the page.

chenejac commented 10 years ago

tlw72 said:

Hi, Christian. What web browser and version are you using? Thanks.

chenejac commented 10 years ago

Christian Hauschke said:

Firefox 26, but it's the same with Chrome 31.0.X and Opera 12.16.

Do you need more information? Maybe the output of the SPARQL-Query you mentioned a few comments earlier?

chenejac commented 10 years ago

tlw72 said:

What about trying this: do a SPARQL query to get the results first, before reloading the page. Then reload the page to get the duplicates. Finally, do another SPARQL query to get the results a second time. We want to find out if the duplicates are actually coming from the data model.

When I attempted to recreate the issue, I was using Firefox 26.

chenejac commented 10 years ago

Christian Hauschke said:

Tim, thanks a lot for your help with the SPARQL query!

  1. I attached the first output as multiple_authors_sparql.txt.
  2. I reloaded "Manage authors".
  3. Another SPARQL query: Author duplicates doubled
chenejac commented 10 years ago

tlw72 said:

Christian,

We're still not able to recreate the issue here, so we're hoping you have time to run through the following steps for us, which will give us a little more to go on.

Thanks, Tim

  1. Backup and then delete catalina.out and vivo.all.log from tomcat/logs. (This assumes that "vivo" is the webapp.name defined in the build.properties file.)

  2. Create a new publication in VIVO, add an author to the publication, and then take a screen shot of the manage authors page.

  3. Reload/refresh the manage authors page and take another screen shot.

  4. Open another tab in firefox, go to the site admin page and run the following SPARQL query. (As before, you'll need to add the resource URI for the new publication to the query. Save the results.

PREFIX vivo: http://vivoweb.org/ontology/core# PREFIX afn: http://jena.hpl.hp.com/ARQ/function# PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX foaf: http://xmlns.com/foaf/0.1/ SELECT ?authorshipURI (afn:localname(?authorshipURI) AS ?authorshipName) ?authorURI ?rank WHERE {

vivo:relatedBy ?authorshipURI . ?authorshipURI a vivo:Authorship . ?authorshipURI vivo:relates ?authorURI . ?authorURI a foaf:Agent . OPTIONAL { ?authorshipURI vivo:rank ?rank } } ORDER BY ?rank 5. Open another tab in Firefox and go to this url: vivo.example.de/admin/log4j.jsp. 6. On the log4j page, find the ReorderController, set the select element to DEBUG and then click the submit button at the bottom of the page. 7. Return to the new publication, add a second author and take another screen shot. 8. Reload/refresh the page and take one more screen shot. 9. Run the same SPARQL query as in step 4 and save the results. 10. Attach the screen shots, query results and the two log files to the Jira issue. One other question: what operating system are you running Firefox 26 on?
chenejac commented 10 years ago

Christian Hauschke said:

First finding: After step 3 I discovered that it doesn't happen with completely new data (new authors, new publication, new journal).

So I entered faked a publication with 2 new authors (edit1.png). F5 = nothing happens.

Then I added an author already in VIVO before doing step 1 (edit2.png). With adding him he appears two times.

Reload (F5): Only this author appears now four times, the new ones still only one time.

You can find the SPARQL output in attachment multiple_authors_sparql_3.txt.

  1. Open another tab in Firefox and go to this url: vivo.example.de/admin/log4j.jsp.

  2. On the log4j page, find the ReorderController, set the select element to DEBUG and then click the submit button at the bottom of the page.

Done.

  1. Return to the new publication, add a second author and take another screen shot.

See edit4.png. The author already existed in my VIVO, so he appears two times.

  1. Reload/refresh the page and take one more screen shot.

edit5.png

  1. Run the same SPARQL query as in step 4 and save the results.

multiple_authors_sparql_4.txt.

One other question: what operating system are you running Firefox 26 on?

Windows 7

The logfiles will follows soon.

chenejac commented 10 years ago

Christian Hauschke said:

Logfiles are attached. The exceptions like in line 119

Jan 09, 2014 4:07:03 PM org.apache.catalina.core.StandardWrapperValve invoke Schwerwiegend: Servlet.service() for servlet [SparqlQuery] in context with path [] threw exception com.hp.hpl.jena.query.QueryParseException: Lexical error at line 9, column 1. Encountered: "\u00a0" (160), after : ""

result from a copy&paste issue of the SPARQL request, so it can be ignored.

chenejac commented 10 years ago

tlw72 said:

Christian, thanks for going through the steps and providing all of this information. It's very helpful. I want to take a close look at the debugging statements in vivo.all.log, but I do have a quick question for you. As you indicated, the problem started when you added the author Tobias Koplin and this author was already in the data base. When Tobias Koplin was originally added to the data base was it manually or through a data ingest process?

chenejac commented 10 years ago

tlw72 said:

Christian,

We're closer to figuring out what the issue is and think that it has something to do with the data. We were able to create a bug that behaves the same way as what you're seeing, doubling an author each time the page is reloaded, but the underlying cause is different than your issue. We're working on a fix for this and there's a chance it will fix your issue as well. As soon as it's ready we'll get it to you so you can test it out.

In the meantime, there's another piece of information that you can send us that will help. Go to the profile page for the author Tobias Koplin, and then click the "Edit this individual" link in the Admin Panel. When the Individual Control Panel page appears, locate the "Raw Statements with This Resource as Subject" button and click that. After the statements get displayed, select those and then copy/paste them into a comment in Jira.

I'm guessing your VIVO instance is behind a firewall and not accessible, correct?

Thanks, Tim

chenejac commented 10 years ago

Christian Hauschke said:

When Tobias Koplin was originally added to the data base was it manually or through a data ingest process?

Every tiny bit of information was entered manually. No ingest at all.

I'm guessing your VIVO instance is behind a firewall and not accessible, correct?

Yes. I hope this will change soon.

Raw Statements with This Resource as Subject"


| pred | predLabel | obj | objLabel | graph |

| http://purl.obolibrary.org/obo/ARG_2000028 | "has contact info"@en-US | http://vivo.bib.hs-hannover.de/individual/n4134 | | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://purl.obolibrary.org/obo/RO_0000053 | "bearer of"@en-US | http://vivo.bib.hs-hannover.de/individual/n1623 | "Speaker"^^http://www.w3.org/2001/XMLSchema#string | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://purl.obolibrary.org/obo/RO_0000053 | "bearer of"@en-US | http://vivo.bib.hs-hannover.de/individual/n2056 | "Speaker"^^http://www.w3.org/2001/XMLSchema#string | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://purl.obolibrary.org/obo/RO_0000053 | "bearer of"@en-US | http://vivo.bib.hs-hannover.de/individual/n3592 | "Speaker"^^http://www.w3.org/2001/XMLSchema#string | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://purl.obolibrary.org/obo/RO_0000053 | "bearer of"@en-US | http://vivo.bib.hs-hannover.de/individual/n418 | "Speaker"^^http://www.w3.org/2001/XMLSchema#string | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://purl.obolibrary.org/obo/RO_0000053 | "bearer of"@en-US | http://vivo.bib.hs-hannover.de/individual/n6088 | "Speaker"^^http://www.w3.org/2001/XMLSchema#string | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://vitro.mannlib.cornell.edu/ns/vitro/0.7#modTime | | "2013-12-11T16:37:39"^^http://www.w3.org/2001/XMLSchema#dateTime | | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://vivoweb.org/ontology/core#relatedBy | "related by"@en-US | http://vivo.bib.hs-hannover.de/individual/n1968 | | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://vivoweb.org/ontology/core#relatedBy | "related by"@en-US | http://vivo.bib.hs-hannover.de/individual/n1996 | | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://vivoweb.org/ontology/core#relatedBy | "related by"@en-US | http://vivo.bib.hs-hannover.de/individual/n4131 | | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://vivoweb.org/ontology/core#relatedBy | "related by"@en-US | http://vivo.bib.hs-hannover.de/individual/n6490 | | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://vivoweb.org/ontology/core#relatedBy | "related by"@en-US | http://vivo.bib.hs-hannover.de/individual/n691 | | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://vivoweb.org/ontology/core#relatedBy | "related by"@en-US | http://vivo.bib.hs-hannover.de/individual/n7937 | "Wissenschaftlicher Mitarbeiter"^^http://www.w3.org/2001/XMLSchema#string | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://vivo.bib.hs-hannover.de/ontology/hshOntologie#hshLocal | "hshLocal"@de-DE | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://xmlns.com/foaf/0.1/Person | "Person"@en-US | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://www.w3.org/2000/01/rdf-schema#label | | "Koplin, Tobias"^^http://www.w3.org/2001/XMLSchema#string | | http://vitro.mannlib.cornell.edu/default/vitro-kb-2 | | http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType | | http://vivo.bib.hs-hannover.de/ontology/hshOntologie#hshLocal | "hshLocal"@de-DE | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf | | http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType | | http://xmlns.com/foaf/0.1/Person | "Person"@en-US | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://purl.obolibrary.org/obo/BFO_0000001 | "Entity" | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://purl.obolibrary.org/obo/BFO_0000002 | "Continuant" | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://purl.obolibrary.org/obo/BFO_0000004 | "Independent Continuant"@en-US | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://www.w3.org/2002/07/owl#Thing | | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://xmlns.com/foaf/0.1/Agent | "Agent"@en-US | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf | | http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType | | http://vivo.bib.hs-hannover.de/ontology/hshOntologie#hshLocal | "hshLocal"@de-DE | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf-rebuild | | http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType | | http://xmlns.com/foaf/0.1/Person | "Person"@en-US | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf-rebuild | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://purl.obolibrary.org/obo/BFO_0000001 | "Entity" | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf-rebuild | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://purl.obolibrary.org/obo/BFO_0000002 | "Continuant" | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf-rebuild | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://purl.obolibrary.org/obo/BFO_0000004 | "Independent Continuant"@en-US | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf-rebuild | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://www.w3.org/2002/07/owl#Thing | | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf-rebuild | | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | | http://xmlns.com/foaf/0.1/Agent | "Agent"@en-US | http://vitro.mannlib.cornell.edu/default/vitro-kb-inf-rebuild |

chenejac commented 10 years ago

tlw72 said:

Christian, any chance you could send us a dump of your data base? I would understand if you have proprietary or sensitive data that you can't share, but if that is not the case, we would take your data base and run a VIVO instance against it.

If you cannot send the data base, would it be possible to send the raw RDF statements for Hilbert Meyer, just as you sent the statements for Tobias Koplin. Since Meyer was not being duplicated, comparing his statements to Koplin's could be very helpful.

Sorry about all these requests....

chenejac commented 10 years ago

Christian Hauschke said:

Tim, I just sent you a complete RDF export via mail. I hope that's what you wanted.

chenejac commented 10 years ago

tlw72 said:

Christian,

We were finally able to recreate the issue. It has to do with the inference rebuild graph (vitro-kb-inf-rebuild) not being deleted following a recompute of the inferences. This situation could happen if, for example, tomcat was stopped while the inferences were being recomputed. Here are the steps you need to follow to fix the issue.

  1. Clear the statements from the vitro-kb-inf-rebuild graph. Go to the Site Admin page and click the Ingest Tools link under Advanced Data Tools. Next, click the Manage Jena Models link and then locate the vitro-kb-inf-rebuild. (The full URI is http://vitro.mannlib.cornell.edu/default/vitro-kb-inf-rebuild.) And finally, click the "clear statements" button.

  2. Delete the extra vivo:rank properties from the vivo:Authorship classes. The Authorship class is what relates a publication to an author, and the Authorship class also has a "rank" property that allows you to specify the order in which authors appear on a publication. (There should only be one rank on an authorship.) Because of the inference rebuild problem, every time you reloaded the page, a new rank was added to the Authorship. If you don't delete the extra ranks at the Authorship level, you'll continue to see authors listed multiple times on the Manage Authors page.

To delete the rank property, go to the profile page for the publication and then click the "Edit this individual" link in the Admin Panel. At the bottom of the page you'll see a list of the subject-predicate-object statements for the publication. Statements that link a publication to an Authorship will have "related by" as the predicate. To get to the Authorship, click the local name (for example, "n12345") that appears in the object column. You can confirm that the object you clicked is an Authorship by checking the "class" listing that appears when the page loads. Now click the "Display This Individual (public)" button. When the profile page for the Authorship displays, click the "Other" tab and locate the rank property. If there is more than one rank displayed, delete all but one of them.

Besides these two steps, we've also made two code changes that will prevent the duplicates from happening even if the inference rebuild graph issue happens again. I'm assuming that you got the 1.6 code from either the release files on SourceForge or the release tags on GitHub. So you want to get the following two files from GitHub

From the Vitro project (either the develop or maint-rel-1.6 branches):

webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/QueryUtils.java

From the VIVO project (either the develop or maint-rel-1.6 branches):

src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAuthorsToInformationResourceGenerator.java

Please let me know if you have any problems with the instructions above.

Tim

chenejac commented 10 years ago

Christian Hauschke said:

I followed your instructions and have done a bit of testing now. Seems like the issue is solved. Thanks for your help!

chenejac commented 10 years ago

tlw72 said:

Issue was resolved and tested by the reporter.