У меня есть совершенно новое загрузочное приложение Spring, и я хотел развернуть его в моем существующем контейнере Jboss, чтобы продвинуть его для тестирования QA.
Я гуглил и дал несколько рекомендаций, как я упоминал в stackoverflow и других сайтах.
Обновлен класс основного приложения
@ SpringBootApplication
@Configuration
@ComponentScan
@EnableAutoConfiguration
открытый класс InventoryReportApplication расширяет SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(InventoryReportApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(InventoryReportApplication.class, args);
}
}
Обновлен pom.xml
org.springframework.boot
весна-загрузка-стартер-веб
org.springframework.boot
весна-загрузка-стартер-кот
javax.servlet
javax.servlet-апи
3.1.0
предоставлена
Удалены
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
- добавлено
server.servlet.path = / *
в application.properties
- Добавлено веб-приложение / WEB-INF / jboss-web.xml
<jboss-web>
<context-root>/inventory-report</context-root>
</jboss-web>
Но когда я собираю приложение, WAR-файл успешно упакован, но при его развертывании в jboss выдается следующее сообщение об ошибке.
Unexpected HTTP response: 500 Request { "operation" => "add", "address" => [ ("server-group" => "main-server-group"), ("deployment" => "inventory-report") ], "runtime-name" => "inventory-report.war", "enabled" => true }
Response Internal Server Error {
"outcome" => "failed",
"result" => undefined,
"failure-description" => {
"WFLYDC0074: Operation failed or was rolled back on all servers. Server failures:" => {
"server-group" => {
"main-server-group" => {
"host" => {
"mms-rules-master" => {
"mmsrules1" => {
"WFLYCTL0080: Failed services" => {
"jboss.undertow.deployment.default-server.default-host./inventory-report" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./inventory-report: java.lang.RuntimeException: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class Caused by: java.lang.RuntimeException: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class Caused by: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class Caused by: java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class"
}
}
}
}
}
}
}
},
"rolled-back" => true, "server-groups" => {"main-server-group" => {"host" => {"mms-rules-master" => {"mmsrules1" => {"response" => { "outcome" => "failed", "failure-description" => {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./inventory-report" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./inventory-report: java.lang.RuntimeException: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class Caused by: java.lang.RuntimeException: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class Caused by: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class Caused by: java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module \"deployment.inventory-report.war:main\" from Service Module Loader): Cannot inherit from final class"}}, "rolled-back" => true }}}}}}
}
Мой jboss 7.0.9
Может кто-нибудь помочь найти то, что мне не хватает?