You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rya.apache.org by "Puja Valiyil (JIRA)" <ji...@apache.org> on 2015/12/17 03:36:46 UTC

[jira] [Commented] (RYA-17) Mongo DAO layer can't handle wildcard deletes

    [ https://issues.apache.org/jira/browse/RYA-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15061352#comment-15061352 ] 

Puja Valiyil  commented on RYA-17:
----------------------------------

Hey Christian, I'm starting to take a look at this.  I'm going to try to recreate it but if you could attach a sparql query or the exact call on the sail interface you're trying to make, that would make things easier.

> Mongo DAO layer can't handle wildcard deletes
> ---------------------------------------------
>
>                 Key: RYA-17
>                 URL: https://issues.apache.org/jira/browse/RYA-17
>             Project: Rya
>          Issue Type: Bug
>          Components: dao
>    Affects Versions: 3.2.10
>            Reporter: Christian Rasmussen
>            Assignee: Puja Valiyil 
>
> When requesting a delete using wildcards for either Predicate, Object or Context we fail with a null pointer exception.
> [DEBUG] 2015-12-15 00:05:06,341 [repositories/rya] subj="<http://tempuri.org>"
> [DEBUG] 2015-12-15 00:05:06,348 [repositories/rya] ProtocolExceptionResolver.resolveException() called
> [ERROR] 2015-12-15 00:05:06,352 [repositories/rya] Error while handling request
> java.lang.NullPointerException: null
> 	at mvm.rya.mongodb.dao.SimpleMongoDBStorageStrategy.serialize(SimpleMongoDBStorageStrategy.java:104)
> 	at mvm.rya.mongodb.MongoDBRyaDAO.delete(MongoDBRyaDAO.java:110)
> 	at mvm.rya.mongodb.MongoDBRyaDAO.delete(MongoDBRyaDAO.java:1)
> 	at mvm.rya.rdftriplestore.RdfCloudTripleStoreConnection.removeStatementsInternal(RdfCloudTripleStoreConnection.java:513)
> 	at org.openrdf.sail.helpers.SailConnectionBase.removeStatements(SailConnectionBase.java:495)
> 	at org.openrdf.repository.sail.SailRepositoryConnection.removeWithoutCommit(SailRepositoryConnection.java:296)
> For this example,  the only thing I specified in my delete request is the 'subj="<http://tempuri.org>”’ 
> Dumping out the RYAStatement content here:
> RyaStatement{subject=RyaType{dataType=http://www.w3.org/2001/XMLSchema#anyURI, data='http://tempuri.org'}, predicate=null, object=null, context=null, qualifier=null, columnVisibility=null, value=null, timestamp=1450155906348}
> This then fails in the SimpleMongoDBStorageStrategy.serialize() because we are trying to concatenate a bunch of fields to create the id (type String) 
>                 String id = statement.getSubject().getData() + " " +
>                                 statement.getPredicate().getData() + " " +
>                                 statement.getObject().getData() + " " +
>                                 context;
> As an aside. We do not allow subject wildcard. This appears to be deliberate and due to performance issues. However that seems like a feature that should support as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)