首页 > 解决方案 > 执行 JAR 时出现 JENA 错误 TurtleParseException

问题描述

我做了一个程序,用Jena 库解析海龟文件。这些是我使用的依赖项:

        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-iri</artifactId>
            <version>3.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-core</artifactId>
            <version>3.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-arq</artifactId>
            <version>3.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-tdb</artifactId>
            <version>3.10.0</version>
        </dependency>

所以解析在我的java程序上运行良好但是当我创建我的jar并尝试运行它时,我有这些错误:

ERROR JenaService:146 - org.apache.jena.n3.turtle.TurtleParseException: Line 28015, column 79: org.apache.jena.iri.impl.IRIImplException:
<http://www.reussir.fr,> Code: 28/NOT_DNS_NAME in HOST: The host component did not meet the restrictions on DNS names.

有任何想法吗 ?


编辑

来自我的 IDE 的屏幕截图

通过使用 IDE 运行我的程序,我收到了无效 IRI 问题的警告,但仍然给我生成的 jar 错误。

标签: javaparsingjenaexecutable-jar

解决方案


<http://www.reussir.fr,>

URI 中不允许使用逗号的地方有逗号。

最好找到并修复数据问题,因为如果不修复它可能会导致以后出现其他问题。


推荐阅读