JBAS015852:无法对类module-info.class-Spring boot+Jboss 7.1.1进行索引



我正试图在Jboss 7.1.1上部署一个简单的Spring引导应用程序。我已经进行了相应的设置,但错误不断出现:"JBAS015852:无法为类模块信息编制索引。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>

最新更新