[英]Spring Boot : Getting IllegalArgumentException in WLS
I am trying to deploy spring boot as war in WLS 12 C and I am getting the below error, I have skipped logging in pom.xml 我正在尝试在WLS 12 C中将spring boot部署为war,并且出现以下错误,我跳过了登录pom.xml的操作
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
and I have the below code in weblogic.xml 而且我在weblogic.xml中有以下代码
<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>org.slf4j.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
Please suggest is there any solution for the below Error 请提出以下错误的解决方案
java.lang.IllegalArgumentException: Object of class [null] must be an instance of interface javax.management.MBeanServer
I have tried the below example 我已经尝试了以下示例
https://github.com/purrox/Spring-example
The sample project spring-example
is using a very old version of spring-boot:1.0.0.RC4
. 示例项目
spring-example
使用的是很旧的spring-boot:1.0.0.RC4
。 If you are using the same version as the sample project I advise you to upgrade to the latest stable spring-boot version 1.5.3
如果您使用与示例项目相同的版本,我建议您升级到最新的稳定的spring-boot版本
1.5.3
Edit 编辑
To deploy a Spring Boot application to WebLogic you must ensure that your servlet initializer directly implements WebApplicationInitializer (even if you extend from a base class that already implements it).
要将Spring Boot应用程序部署到WebLogic,必须确保servlet初始化程序直接实现WebApplicationInitializer(即使您从已经实现它的基类进行扩展)。
A typical initializer for WebLogic would be something like this: WebLogic的典型初始化器如下所示:
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.web.WebApplicationInitializer;
@SpringBootApplication
public class MyApplication extends SpringBootServletInitializer implements WebApplicationInitializer {
}
Please refer to spring-boot documentation for Deploying a WAR to WebLogic 请参考spring-boot文档以将WAR部署到WebLogic
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.