java - Spring boot 2.2.6 application with apache axis Issue
问题描述
My question is similar to this one (Spring boot application with apache axis) but I am running Spring Boot v2.2.6. When I execute the command
java -jar -Dspring.profiles.active=local myjar-0.0.1-SNAPSHOT.jar
I get the error
2021-06-01 00:41:53,152 myjar [http-nio-9090-exec-1] ERROR
org.apache.axis2.deployment.ModuleDeployer - deploy:94 - The addressing-1.6.3-classpath-
module.jar module, which is not valid, caused The /Users/xxxx/workspace/myjar/build/libs/myjar-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/addressing-1.6.3-classpath-
module.jar file cannot be found.
org.apache.axis2.AxisFault: The /Users/xxxx/workspace/.../build/libs/myjar-0.0.1-
SNAPSHOT.jar!/BOOT-INF/lib/addressing-1.6.3-classpath-module.jar file cannot be found.
I also have the relevant build.gradle snippet
api "org.apache.axis2:addressing:1.6.3:classpath-module"
api "org.apache.axis2:axis2:1.6.3"
api "org.apache.axis2:axis2-adb:1.6.3"
api "org.apache.axis2:axis2-transport-local:1.6.3"
api "org.apache.axis2:axis2-transport-http:1.6.3"
I confirmed that the file /Users/xxxx/workspace/myjar/build/libs/myjar-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/addressing-1.6.3-classpath-module.jar does exist. Can anyone help fix this issue?
解决方案
It looks like Axis cannot cope with one jar file being nested inside another. For situations like this, you can configure Spring Boot to automatically unpack the nested jar when you start your application:
bootJar {
requiresUnpack '**/addressing-*-classpath-module.jar'
}
推荐阅读
- android - 使用 Glide 加载 ImageView 但布局 xml 中仍有视觉参考
- javascript - React:输入类型号,maxLength 不起作用?
- c# - 如何将 MongoDB 架构迁移到 SQL Server 模型“EF-Core”?
- android - 使用 Kotlin 从 RecyclerView Adapter 调用 Activity 方法
- swift - 在 Watch 上无法按预期工作的页面的程序化 segues
- http-headers - 强制 Google Cloud 存储以 Content-Encoding 响应
- c# - 使用 JWT 令牌的 ASP.NET Core 网站到 WebApi 身份验证
- vb.net - VB.net 与网站交互(没有 WebBrowser)
- jenkins - 在 Cloud Foundry 中暂存 - .cignore
- javascript - 如何使用jQuery找到最近的表格行?