gpt4 book ai didi

java - Weblogic 12c 上的 Spring 应用程序部署失败

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:48:58 24 4
gpt4 key购买 nike

我的 Spring 应用程序在 Weblogic 11g 上部署得很好。但是,当我尝试在 Weblogic 12c 上部署时,我不断收到 ClassNotFoundException 的一个接一个。

首先,我得到了 java.lang.ClassNotFoundException: com.querydsl.core.types.Expression,我通过添加缺少的依赖项解决了这个问题。然后我得到熟悉的异常,但这次缺少的类来自包 com.mysema.querydsl。引入此依赖项后,我得到以下异常:java.lang.ClassNotFoundException: org.apache.abdera.writer.Writer

为什么应用程序在迁移到 Weblogic 12c 后完全崩溃(因为 Spring 不应该与容器耦合)?

这里是项目迁移前的所有依赖:

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring.version>4.3.2.RELEASE</spring.version>
<spring-data-jpa.version>1.10.2.RELEASE</spring-data-jpa.version>
<spring-security.version>4.1.3.RELEASE</spring-security.version>
<cxf.version>3.1.7</cxf.version>
<jackson.version>1.9.13</jackson.version>
<esapi.version>2.1.0.1</esapi.version>
<hibernate-entitymanager.version>5.1.1.Final</hibernate-entitymanager.version>
<hibernate-commons-annotations.version>5.0.1.Final</hibernate-commons-annotations.version>
<spring-boot-starter-jdbc.version>1.5.2.RELEASE</spring-boot-starter-jdbc.version>
<slf4j.version>1.7.21</slf4j.version>
<log4j.version>1.2.17</log4j.version>
<log.directory>logs</log.directory>
</properties>

<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>3.0-alpha-1</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>

<!-- Security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-acl</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-ldap</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>2.2.0</version>
</dependency>


<!-- DB -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>${spring-data-jpa.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate-entitymanager.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>${hibernate-commons-annotations.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- DB end -->

<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<!-- Oracle JDBC -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.1.0</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
</dependencies>

最佳答案

这在以后的版本中由 spring data jpa 修复了

https://jira.spring.io/browse/DATAJPA-1175

使用v1.10.12或以上版本

关于java - Weblogic 12c 上的 Spring 应用程序部署失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47033881/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com