【问题标题】:Spring boot 2.2.6 application with apache axis IssueSpring boot 2.2.6 应用程序与 apache 轴问题
【发布时间】:2021-08-19 10:06:37
【问题描述】:

我的问题与这个 (Spring boot application with apache axis) 类似,但我正在运行 Spring Boot v2.2.6。当我执行命令时

java -jar -Dspring.profiles.active=local myjar-0.0.1-SNAPSHOT.jar

我得到了错误

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.
    

我也有相关的build.gradle sn-p

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"

我确认文件 /Users/xxxx/workspace/myjar/build/libs/myjar-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/addressing-1.6.3-classpath-module.jar 确实存在。谁能帮忙解决这个问题?

【问题讨论】:

    标签: java spring spring-boot axis2


    【解决方案1】:

    看起来 Axis 无法处理嵌套在另一个 jar 文件中的问题。对于此类情况,您可以在启动应用程序时configure Spring Boot to automatically unpack the nested jar:

    bootJar {
        requiresUnpack '**/addressing-*-classpath-module.jar'
    }
    

    【讨论】:

    • 谢谢。做到了!
    猜你喜欢
    • 2015-03-28
    • 1970-01-01
    • 2021-01-07
    • 2019-07-25
    • 1970-01-01
    • 2022-11-01
    • 2020-10-19
    • 2020-01-09
    • 2020-08-28
    相关资源
    最近更新 更多