[ https://issues.apache.org/jira/browse/MARMOTTA-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakob Frank resolved MARMOTTA-208. ---------------------------------- Resolution: Cannot Reproduce Assignee: Jakob Frank (was: Thomas Kurz) confirmed sebastians suggestion: this was fixed some time ago... > Meta Put Webservice Deleting Tuples Incorrectly > ----------------------------------------------- > > Key: MARMOTTA-208 > URL: https://issues.apache.org/jira/browse/MARMOTTA-208 > Project: Marmotta > Issue Type: Bug > Components: Platform > Affects Versions: 3.0-incubating > Environment: Windows, JDK 6, H2 database > Reporter: Jonathan Koppenhofer > Assignee: Jakob Frank > Fix For: 3.1-incubating > > > If you use the Meta Put webservice to update your metadata, tuples that did > not change between the existing metadata and the new metadata are removed, > leaving on the tuples that changed as active for the subject. > To Reproduce: > 1.) Use the Meta webservice to put some RDF metadata... For example... > <rdf:RDF > xmlns:context="http://localhost:8080/LMF/context/" > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:local="http://localhost:8080/LMF/resource/" > xmlns:dc="http://purl.org/dc/elements/1.1/"> > <rdf:Description rdf:about="http://localhost:8080/LMF/resource/test:4"> > <dc:title > rdf:datatype="http://www.w3.org/2001/XMLSchema#string">TESTING me with Linked > Data</dc:title> > <dc:description > rdf:datatype="http://www.w3.org/2001/XMLSchema#string">this is a test of > me</dc:description> > </rdf:Description> > </rdf:RDF> > 2.) This should create 2 new tuples for the particular subject. > 3.) Now use the exact same RDF document, and do it again... You will notice > that all tuples for the subject are removed. > 4.) Now change either the dc.title or dc.decsription values, and put the meta > again. You will now notice the tuple exists for the changed value, but still > does not exist for the value that was not changed. > In looking at the MetaWebService.java in the putMeta method, I notice it > remove() for all tuples, and then right after add() for the new tuples all > within the same transaction. It would seem the remove and the add being in > the same transaction is causing the issue if you are removing a tuple you are > simultaneously trying to add. > I made the change to... > 1.) Remove tuples > 2.) commit > 3.) begin a new transaction > 4.) add > 4.) commit > ... and it seemed to give me the expected behavior. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira