gpt4 book ai didi

spring-boot - JBAS015852 : Could not index class module-info. 类 - Spring Boot + Jboss 7.1.1

转载 作者:行者123 更新时间:2023-12-04 14:14:35 29 4
gpt4 key购买 nike

我正在尝试在 Jboss 7.1.1 上部署一个简单的 Spring 启动应用程序。
我已经进行了相应的设置,但是不断出现错误:
“JBAS015852:无法索引类 module-info.class”

我做了以下设置:

@SpringBootApplication
public class DemoApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(DemoApplication.class);
}

public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}

@RestController
class Hellocontroller {
@RequestMapping("/hello")
@GetMapping
String hello() {
return "Hola";
}
}

并在 pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>

但我有以下结果
16:12:16,317 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015852: Could not index class org/hibernate/validator/spi/scripting/AbstractCachingScriptEvaluatorFactory.class at /C:/Users/User/Downloads/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final/standalone/deployments/demo.war/WEB-INF/lib/hibernate-validator-6.0.19.Final.jar: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 71
at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:606) [jandex-1.0.3.Final.jar:1.0.3.Final]
at org.jboss.jandex.Indexer.index(Indexer.java:640) [jandex-1.0.3.Final.jar:1.0.3.Final]
at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:77) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]

我需要你的支持,谢谢。

最佳答案

问题是由于依赖冲突,我可以使用以下 jboss-deployment-structure.xml 排除它

    <?xml version='1.0' encoding='UTF-8'?>
<jboss-deployment-structure
xmlns="urn:jboss:deployment-structure:1.1">
<deployment>
<exclusions>
<module name="com.fasterxml.jackson.core.jackson-annotations" />
<module name="com.fasterxml.jackson.core.jackson-core" />
<module name="com.fasterxml.jackson.core.jackson-databind" />
<module
name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" />
<module name="org.jboss.resteasy.resteasy-jackson2-provider" />
<module name="org.slf4j" />
</exclusions>
</deployment>
</jboss-deployment-structure>

关于spring-boot - JBAS015852 : Could not index class module-info. 类 - Spring Boot + Jboss 7.1.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61718922/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com