简体   繁体   English

Spring Boot:在WLS中获取IllegalArgumentException

[英]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.

相关问题 Spring 启动 WebMvcTest,这里是什么导致 IllegalArgumentException? - Spring Boot WebMvcTest, what is causing IllegalArgumentException here? Spring Boot 应用程序中的“IllegalArgumentException:不是托管类型” - "IllegalArgumentException: Not a managed type" in Spring Boot application 春季-AWS(无春季启动):java.lang.IllegalArgumentException:不是托管类型 - Spring - AWS (no spring boot): java.lang.IllegalArgumentException: Not a managed type Spring AOP:尝试用于记录日志,但得到IllegalArgumentException - Spring AOP: Trying to use for logging but getting IllegalArgumentException 在Spring Boot中获取异常 - Getting exception in spring boot spring boot:java.lang.IllegalArgumentException:object不是声明类的实例 - spring boot : java.lang.IllegalArgumentException: object is not an instance of declaring class Spring 启动 java.lang.IllegalArgumentException: URL 必须以 'jdbc' 开头 - Spring Boot java.lang.IllegalArgumentException: URL must start with 'jdbc' java.lang.IllegalArgumentException:在Spring Boot应用程序中不是托管类型 - java.lang.IllegalArgumentException: Not a managed type in spring boot app Spring boot:java.lang.IllegalArgumentException:驱动程序类名称需要jdbcUrl - Spring boot: java.lang.IllegalArgumentException: jdbcUrl is required with driverClassName java.lang.IllegalArgumentException:不是托管类型 - Spring Boot 中的多个数据库 - java.lang.IllegalArgumentException: Not a managed type - Multiple Databases in Spring Boot
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM