NLPchina/elasticsearch-sql

NoSuchFileException: /IMPL-JARS/x-content/x-content-impl-8.5.3.jar

LiuBinCoder opened this issue · 3 comments

我在IDEA中能正常运行,但打包部署到Centos8上后就提示:
NoSuchFileException: /IMPL-JARS/x-content/x-content-impl-8.5.3.jar

2023-02-02T18:02:12.991+08:00 ERROR 3807 --- [0.0-7777-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed: java.lang.ExceptionInInitializerError] with root cause

java.nio.file.NoSuchFileException: /IMPL-JARS/x-content/x-content-impl-8.5.3.jar
	at jdk.zipfs/jdk.nio.zipfs.ZipPath.readAttributes(ZipPath.java:775) ~[jdk.zipfs:na]
	at jdk.zipfs/jdk.nio.zipfs.ZipPath.readAttributes(ZipPath.java:783) ~[jdk.zipfs:na]
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.readAttributes(ZipFileSystemProvider.java:276) ~[jdk.zipfs:na]

我的POM.XML配置:

        <dependency>
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch</artifactId>
            <version>8.5.3</version>
        </dependency>

        <dependency>
            <groupId>co.elastic.clients</groupId>
            <artifactId>elasticsearch-java</artifactId>
            <version>8.5.3</version>
        </dependency>

        <dependency>
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch-x-content</artifactId>
            <version>8.5.3</version>
        </dependency>

        <dependency>
            <groupId>org.nlpcn</groupId>
            <artifactId>elasticsearch-sql</artifactId>
            <version>8.5.3</version>
        </dependency>

jdk用的哪个版本?

我也存在这个问题,我是把项目编译(编译的8.11.3版本,jdk17)后上传本地仓库,然后有个springboot项目引入作为sql转dsl功能,用idea运行是没问题的,打包后通过java命令启动就不行了,请问有解决办法吗

java -version检查下