我使用start.spring.io创建了一个应用程序(spring boot 1.5.6)并尝试将其部署到Weblogic 12.1.3.0.0。
管理控制台中的消息:
Error Unable to access the selected application.
Error java.io.IOException
Error weblogic.utils.compiler.ToolFailureException
日志中的消息:
<23.08.2017 13:40:26 GMT+03:00> <Error> <J2EE> <BEA-160228> <AppMerge failed to merge your application. If you are running AppMerge on the command-line, merge again with the -verbose option for more details. See the error message(s) below.
>
这些链接没有帮助:
https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/howto-traditional-deployment.html
Deploy Spring Boot app in Weblogic
更新:
问题是依赖 JAX-RS。没有它,应用程序部署成功。不确定如何使其与此依赖项一起工作
更新x2:
删除了 Jax-rs,现在:
java.lang.NoSuchMethodError:org.springframework.core.annotation.AnnotationAwareOrderComparator.sort(Ljava/util/List;)V
Resolved by this
最佳答案
我们的团队开始使用 Spring Boot 2.0.0,我们也遇到了这个问题。
经过一番调查,我们发现AppMerge工具在部署之前会扫描所有类。
根本原因:
- 如果是 WebLogic 12.1.3.*,则会失败,因为 Multi-Release JAR Files .
- AppMerge 工具无法处理 JDK 9 文件。
解决方案:
- 使用Log4j 2.8.2
在pom.xml中:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
...
<properties>
...
<log4j2.version>2.8.2</log4j2.version>
...
</properties>
...
</project>
关于java - 将 Spring Boot 部署到 weblogic 12,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45837586/