【问题标题】:LinkedDataSailGraph - No parser factory available for RDF format JSON-LDLinkedDataSailGraph - 没有可用于 RDF 格式 JSON-LD 的解析器工厂
【发布时间】:2013-07-24 14:33:24
【问题描述】:

我们正在尝试将 LinkedDataSailGraph 与 Gremlin 一起使用,通过遍历和推理来做一些时髦的事情。不幸的是,仅实例化该类会导致此错误。有什么想法吗?

new LinkedDataSailGraph(new MemoryStoreSailGraph());

java.lang.RuntimeException:没有可用于 RDF 格式的解析器工厂 JSON-LD (mimeTypes=application/ld+json; ext=jsonld) 在 com.tinkerpop.blueprints.impls.sail.impls.LinkedDataSailGraph.createSail(LinkedDataSailGraph.java:22) 在 com.tinkerpop.blueprints.impls.sail.impls.LinkedDataSailGraph.(LinkedDataSailGraph.java:14) 在 org.isatools.bii.benchmarking.QueryBenchmark.testLoading(QueryBenchmark.java:71) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:601) 在 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) 在 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) 在 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) 在 org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) 在 org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) 在 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) 在 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) 在 org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) 在 org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) 在 org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) 在 org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) 在 org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) 在 org.junit.runners.ParentRunner.run(ParentRunner.java:300) 在 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) 在 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) 在 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) 在 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) 在 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) 在 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) 引起:org.openrdf.rio.UnsupportedRDFormatException:没有解析器 工厂可用于 RDF 格式 JSON-LD (mimeTypes=application/ld+json; ext=jsonld) 在 org.openrdf.rio.Rio.createParser(Rio.java:184) 在 net.fortytwo.linkeddata.rdfizers.VerbatimRdfizer.(VerbatimRdfizer.java:26) 在 net.fortytwo.linkeddata.LinkedDataCache.createDefault(LinkedDataCache.java:139) 在 net.fortytwo.linkeddata.sail.LinkedDataSail.(LinkedDataSail.java:50) 在 com.tinkerpop.blueprints.impls.sail.impls.LinkedDataSailGraph.createSail(LinkedDataSailGraph.java:20) ... 25 更多

【问题讨论】:

    标签: java tinkerpop


    【解决方案1】:

    我不知道为什么,但它希望有 JSON-LD 解析器:http://search.maven.org/#artifactdetails%7Ccom.github.jsonld-java%7Cjsonld-java%7C0.2%7Cjar

    【讨论】:

      【解决方案2】:

      您好,我遇到了同样的问题,我已经按照@wikier 的建议解决了。

      这里有 maven 的工作依赖:

      <!-- json-ld -->
      <dependency>
          <groupId>com.github.jsonld-java</groupId>
          <artifactId>jsonld-java</artifactId>
          <version>0.3</version>
      </dependency>
      <dependency>
          <groupId>com.github.jsonld-java</groupId>
          <artifactId>jsonld-java-sesame</artifactId>
          <version>0.3</version>
      </dependency>
      

      或者如果您需要它们用于其他系统(sbt 等),您可以在此处查看它们: http://mvnrepository.com/artifact/com.github.jsonld-java

      【讨论】:

        猜你喜欢
        • 2016-11-06
        • 1970-01-01
        • 1970-01-01
        • 2011-10-17
        • 1970-01-01
        • 2018-12-02
        • 1970-01-01
        • 2011-02-19
        • 1970-01-01
        相关资源
        最近更新 更多