当前位置: 首页 > 知识库问答 >
问题:

quarkus 2.1.1。最终类NotFoundException:io。内蒂。util。同时发生的FastThreadLocal

申查猛
2023-03-14

我正在开发一个基于quarkus 2.1.1的comandline应用程序。最终的当我运行mvnw测试时,我得到ClassNotFoundException:io。内蒂。util。同时发生的FastThreadLocal和quarkus不会启动。

[INFO] --- quarkus-maven-plugin:2.1.1.Final:generate-code (default) @ sqlcobol ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ sqlcobol ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ sqlcobol ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- quarkus-maven-plugin:2.1.1.Final:generate-code-tests (default) @ sqlcobol ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ sqlcobol ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ sqlcobol ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ sqlcobol ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running 

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
Caused by: java.lang.RuntimeException: Failed to start quarkus
Caused by: java.lang.NoClassDefFoundError: io/netty/util/concurrent/FastThreadLocal
Caused by: java.lang.ClassNotFoundException: io.netty.util.concurrent.FastThreadLocal

pom。xml依赖项包括:

  <properties>
    <compiler-plugin.version>3.8.1</compiler-plugin.version>
    <maven.compiler.parameters>true</maven.compiler.parameters>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
    <quarkus.platform.version>2.1.1.Final</quarkus.platform.version>
<!--  <quarkus-plugin.version>1.13.7.Final</quarkus-plugin.version> -->
    <surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>${quarkus.platform.artifact-id}</artifactId>
        <version>${quarkus.platform.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-arc</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-config-yaml</artifactId>
    </dependency> 
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-flyway</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jdbc-oracle</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-agroal</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-picocli</artifactId>
    </dependency>
    <dependency>
      <groupId>org.tmatesoft.svnkit</groupId>
      <artifactId>svnkit</artifactId>
      <version>1.10.3</version>
    </dependency>
    <dependency>
      <groupId>io.github.uwol</groupId>
      <artifactId>proleap-cobol-parser</artifactId>
      <version>4.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml</artifactId>
      <version>5.0.0</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.12.1</version>  
    </dependency>
    
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit5</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jdbc-h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-test-h2</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

看起来它需要额外的依赖项。我将非常感谢您的帮助。

共有1个答案

秋向阳
2023-03-14

作为临时解决办法

<dependency>
   <groupId>io.quarkus</groupId>
   <artifactId>quarkus-resteasy</artifactId>
</dependency>

给你的pom。xml

 类似资料:
  • 我在嵌入式环境中使用 C,其中虚拟函数的运行时确实很重要。我读过关于可以内联虚拟函数的罕见情况,例如:内联虚函数真的是无意义的吗?接受的答案指出,只有在运行时已知确切的类时,例如在处理本地、全局或静态对象(不是指针或对基类型的引用)时,才有可能进行内联。我理解这背后的逻辑,但我想知道在以下情况下是否也可以内联: 从我的观点来看,编译器应该在编译时知道的最终类型,因为它是一个最终类。在这种情况下,是

  • 在Eclipse(luna)安装中,我很难让Glassfish服务器真正启动并保持运行。 我有Glassfish在Netbean工作正常。 我已经在Eclipse中创建了服务器,我可以启动它,但是进度条到达大约69%,然后停止,最终给我一个错误: 无法按时启动服务器。JAVAutil。同时发生的超时异常 奇怪的是,当我等待错误出现时,我可以转到localhost:8080,服务器正在运行,我也可以

  • 以前有人遇到过这种例外吗?我曾尝试使用Spring和RabbitMQ部署一个应用程序,但是没有办法解释这个异常,谢谢~

  • 根据netty文件,默认Reactor。内蒂。ioWorkerCount计数是最大值(4,核心数),这在本地环境中似乎是正确的。我有一台6核笔记本电脑,Reactorhttp io线程数为6。 但在kuberenetes中部署docker image时,我们发现reactor http epoll(linux)线程数为36。我们的CPU配置是:请求4,限制6。 ROCKY在Spring WebFl

  • 到目前为止,我认为有效的final和final或多或少是等价的,如果在实际行为中不完全相同,JLS会将它们视为相似的。然后我发现了这个人为的场景: 显然,JLS在这两者之间产生了重要的区别,我不知道为什么。 我阅读其他线程,如 最终和有效最终之间的差异 有效的最终变量vs最终变量 变量“有效最终”是什么意思 但他们并没有详细说明。毕竟,在更广泛的层面上,它们似乎几乎相当。但深入研究,他们显然有所不

  • 任何人,请帮我缩短。在Jboss上部署我的war文件时,它显示以下错误。我坚持要找出原因。 [o.s.c.annotation.ConfigurationClassUtils]:找不到用于反省工厂方法的类文件:java.util.concurrent.ThreadPoolExecator。Discard策略java.io.FileNotFoundExc0019:类路径资源[java/util/co