当我尝试在weblogic中部署内置于EAR的spring boot时,出现以下异常。
pom文件:
<groupId>com.xyz.someComp</groupId>
<artifactId>someAPI</artifactId>
<version>0.0.3-SNAPSHOT</version>
<packaging>war</packaging>
<name>My Rest API </name>
<description>My API for testing </description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.5.4</version>
</dependency>
<dependency>
<groupId>com.github.database-rider</groupId>
<artifactId>rider-core</artifactId>
<version>1.2.10</version>
</dependency>
<dependency>
<groupId>com.github.database-rider</groupId>
<artifactId>rider-junit5</artifactId>
<version>1.2.10</version>
</dependency>
<dependency>
<groupId>com.github.springtestdbunit</groupId>
<artifactId>spring-test-dbunit</artifactId>
<version>1.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
例外:
<12/06/2019 3:50:24 PM AEST> <Error> <Munger> <BEA-2156200> <Unable to load
descriptor weblogic.utils.classloaders.GenericClassLoader@6e4b9e8e finder:
weblogic.utils.classloaders.CodeGenClassFinder@764267fe annotation: /WEB-
INF/lib/tomcat-embed-websocket-8.5.31.jar!/META-INF/web-fragment.xml of
module com.coles.merch-PromoAPI-0.0.3-SNAPSHOT.war. The error is
weblogic.descriptor.DescriptorException: Unmarshaller failed
正在寻找许多答案,以便: here,但这并不能解决我的问题。
这是我要部署的非常基本的香草弹簧托服务。 因此,不确定为什么会遇到此错误,并想知道为什么我需要tomcat jar,因为我不需要使用spring boot附带的嵌入式服务器。
答案 0 :(得分:0)
在您的情况下,我将尝试在Spring Boot应用程序级别禁用Tomcat。