The query looks ok to me.  I get the same error using the Mulgara webui
using an external instance of Mulgara (on 2.1.8 also) - so it looks like
it's a Mulgara issue rather than a Fedora one.

I'm forwarding your email to the Mulgara-general mailing list.

Regards
Steve

> -----Original Message-----
> From: Egbert Gramsbergen [mailto:[email protected]] 
> Sent: 17 May 2010 11:05
> To: [email protected]
> Subject: [Fedora-commons-users] Sparql CONSTRUCT query with 
> blank node fails
> 
> 
> The following query:
> 
> PREFIX dc:   <http://purl.org/dc/elements/1.1/>
> PREFIX dct:  <http://purl.org/dc/terms/>
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> CONSTRUCT {
>   ?x dct:creator [foaf:name ?z].
> }
> WHERE
> {
>   ?x dc:creator ?z.
> }
> 
> gives an error
> java.lang.IllegalArgumentException: Failed to constrain all 
> variables: $*0 not constrained in WHERE or GIVEN clauses
> at org.mulgara.query.Query.(Query.java:176)
> 
> Also, when I spell out the blank node:
> 
> PREFIX dc:   <http://purl.org/dc/elements/1.1/>
> PREFIX dct:  <http://purl.org/dc/terms/>
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> CONSTRUCT {
>   ?x dct:creator _:c.
>   _:c foaf:name ?z.
> }
> WHERE
> {
>   ?x dc:creator ?z.
> }
> 
> the same error
> java.lang.IllegalArgumentException: Failed to constrain all 
> variables: $_:c not constrained in WHERE or GIVEN clauses.
> 
> As far as I can see, this is all legal Sparql, 
> http://www.w3.org/TR/rdf-sparql-query/
> 
> Any suggestions?
> 
> 
> 
> 
> --------------------------------------------------------------
> ----------------
> 
> _______________________________________________
> Fedora-commons-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
> 


------------------------------------------------------------------------------

_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to