无法在 Jboss-eap-6.4 中部署 Spring Boot 应用程序
Posted
技术标签:
【中文标题】无法在 Jboss-eap-6.4 中部署 Spring Boot 应用程序【英文标题】:Unable to deploy Springboot app in Jboss-eap-6.4 【发布时间】:2020-02-12 18:32:10 【问题描述】:我在 Jboss 服务器中部署我的 springboot 应用程序时遇到以下问题,
在 Jboss 服务器中部署 springboot 应用所做的更改
我在主课中扩展了SpringBootServletInitializer
从我的 pom.xml 中排除 spring-boot-starter-tomcat
版本详情
Spring boot 版本 2.1.8.RELEASE
JBoss 服务器版本 6.4
错误日志
08:09:21,934 ERROR [org.jboss.web] (ServerService Thread Pool -- 53) JBAS018202: Error calling onStartup for servlet container initializer: org.springframework.web.SpringServletContainerInitializer: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.validation.beanvalidation.LocalValidatorFactoryBean]: Factory method 'defaultValidator' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/el/ELManager
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627) [spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456) [spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) [spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) [spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) [spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) [spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) [spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
我已经在 jboss 服务器 (\modules\system\layers\base\javax\el\api\main) 验证了 javax.el-api 依赖项
【问题讨论】:
【参考方案1】:似乎JBoss server 6.4
不支持springBoot 2.1.8 RELEASE
。当我将springboot版本降级到1.5.22 RELEASE
时,我可以部署war文件。
【讨论】:
以上是关于无法在 Jboss-eap-6.4 中部署 Spring Boot 应用程序的主要内容,如果未能解决你的问题,请参考以下文章
Jboss eap 6.4 https 配置监听端口 8443 失败
找不到 hibernate 4.3 的 jboss-as-jpa jar
Pygame错误:self.spritedict [spr] = surface_blit(spr.image,spr.rect)