0
我想獲得所有的實例標籤(在maven項目中)沒有langage標籤。sparql STR錯誤
我的查詢是:
Select STR(?abstract)
Where {
?s <http://dbpedia.org/ontology/abstract> ?abstract.
}
我收到以下錯誤:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project LOD2Walks: An exception occured while executing the Java class. Encountered " "str" "STR "" at line 1, column 9.
[ERROR] Was expecting one of:
[ERROR] <VAR1> ...
[ERROR] <VAR2> ...
[ERROR] "distinct" ...
[ERROR] "reduced" ...
[ERROR] "(" ...
[ERROR] "*" ...
PS:如果我不我的查詢中寫的海峽,我沒有得到任何錯誤 如果我加入SELECT STR (?摘要)AS?標籤)...我得到以下例外:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project LOD2Walks: An exception occured while executing the Java class. null: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project LOD2Walks: An exception occured while executing the Java class. null
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. null
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:339)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
有人可以請幫助通過確定我的錯誤在哪裏?
謝謝您提前
儘管Virtuoso接受它,但我不確定這是否是有效的SPARQL 1.1語法。您可以按照[SELECT expressions]的SPARQL 1.1建議(https://www.w3.org/TR/2013/REC-sparql11-查詢20130321 /#selectExpressions)。 – chrisis
chrisis是正確的,它只是接受查詢的寬鬆的Virtuoso解析器 - 標準需要分配給新變量的表達式。 – AKSW
即'SELECT(STR(?abstract)as?abstract_string)...' – user205512