[ 
https://issues.apache.org/jira/browse/RYA-17?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Puja Valiyil  reassigned RYA-17:
--------------------------------

    Assignee: Puja Valiyil 

> 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)

Reply via email to