Hi Zehra, The error you report is coming from the Jena Query Parser, thus have you tried bypassing it such that the query is executed directly against the Virtuoso Query Parser, as it the case with the SPARL endpoint which works. See the following documentation on how to by pass the Jena Query parser:
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtJenaProvider#Bypass%20Jena/ARQ%20parser
Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc. // http://www.openlinksw.com/
Weblog -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter -- http://twitter.com/OpenLink
Google+ -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers
On 7 Jan 2013, at 14:18, Zehra Gül Çabuk <[email protected]> wrote:
> Hi again:)
>
> I've solved my problem as converting query like this :
>
> CONSTRUCT
> {
> ?mail <http://com.galaksiya.muse/event#will_send_to> ?user
> }
> WHERE
> {
> ?feedback <http://seagent.ege.edu.tr/feedback#time> ?time.
> ?feedback <http://seagent.ege.edu.tr/feedback#has_user> ?user.
> {
> SELECT (IRI(bif:concat(?user,?user)) AS ?mail) WHERE {?feedback
> <http://seagent.ege.edu.tr/feedback#has_user> ?user.}
> }
> }
>
> I've executed this query and returned results from GUI of the virtuoso sparql
> endpoint.
>
> Now I've a problem that this query could not be executed in java code using
> virtuoso-jena-provider.
>
> Virtuoso jena provider thrown an exception like this :
>
> com.hp.hpl.jena.query.QueryParseException: Encountered " "select" "SELECT ""
> at line 1, column 291.
> Was expecting one of:
> <IRIref> ...
> <PNAME_NS> ...
> <PNAME_LN> ...
> <BLANK_NODE_LABEL> ...
> <VAR1> ...
> <VAR2> ...
> "graph" ...
> "optional" ...
> "filter" ...
> "true" ...
> "false" ...
> <INTEGER> ...
> <DECIMAL> ...
> <DOUBLE> ...
> <INTEGER_POSITIVE> ...
> <DECIMAL_POSITIVE> ...
> <DOUBLE_POSITIVE> ...
> <INTEGER_NEGATIVE> ...
> <DECIMAL_NEGATIVE> ...
> <DOUBLE_NEGATIVE> ...
> <STRING_LITERAL1> ...
> <STRING_LITERAL2> ...
> <STRING_LITERAL_LONG1> ...
> <STRING_LITERAL_LONG2> ...
> "(" ...
> <NIL> ...
> "{" ...
> "}" ...
> "[" ...
> <ANON> ...
>
> Is there any special case in virtuoso-jena-provider about usage of the inner
> select clause? How can I solve my problem?
>
> Thanks in advance.
>
> 2013/1/7 Zehra Gül Çabuk <[email protected]>
> Hi all,
>
> I've a problem executing a construct query over Virtuoso. I've tried to
> execute a query that tries to create a statement whose subject is created in
> the query. I want to create an URI in the query so I've searched it and I've
> found that function iri(bif:concat("http://..",?var2)) is used for this
> purpose.
> http://answers.semanticweb.com/questions/12728/create-uri-in-a-sparql-construct-query
> http://tech.groups.yahoo.com/group/jena-dev/message/44039
>
> I've wrote a query like this :
>
> CONSTRUCT {
> ?mail <http://com.galaksiya.muse/event#will_send_to> ?user
> }
> WHERE {
> SELECT (IRI(bif:concat(http://seagent.ege.edu.tr/,?user)) AS ?mail)
> <http://com.galaksiya.muse/event#will_send_to> ?user.
> {
> ?feedback <http://seagent.ege.edu.tr/feedback#time> ?time.
> ?feedback <http://seagent.ege.edu.tr/feedback#has_user> ?user.
> }}
>
> But I've got an error like this :
>
> Virtuoso 37000 Error SP030: SPARQL compiler, line 3: syntax error at 'SELECT'
> before '('
>
> SPARQL query:
> define sql:big-data-const 0
> #output-format:text/html
> CONSTRUCT {?mail ?user} WHERE { SELECT
> (IRI(bif:concat(http://seagent.ege.edu.tr/,?user)) AS ?mail) ?user{?feedback
> ?time. ?feedback ?user.}}
>
> I've realized that my triples are lost in the formatted query (see :
> CONSTRUCT {?mail ?user}). Is there a problem with my query or a problem with
> my virtuoso configuration?
>
> Thanks in advance.
> Zehra Gül ÇABUK
>
>
>
> --
> Zehra Gül ÇABUK
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412_______________________________________________
> Virtuoso-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412
_______________________________________________ Virtuoso-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/virtuoso-users
