【问题标题】:deploying Spring boot in websphere在 websphere 中部署 Spring Boot
【发布时间】:2015-02-28 20:39:52
【问题描述】:

Websphere 8.5.5.2

尝试将 spring boot 应用程序部署到 websphere 服务器。我已经确保类加载器策略是最后一个父级。问题似乎是因为 websphere 可能需要一些额外的配置来识别没有任何 web.xml 的战争?没有把握。出现以下错误。

原因: javax.xml.bind.JAXBException: ClassCastException: attempting to cast jar:file:/usr/WebSphere850/AppServer/endorsed_apis/jaxb-api.jar!/javax/xml/bind/JAXBContext.class

wsjar:file:/usr/WebSphere850/AppServer/profiles/node01/installedApps/dchislwsapp020Cell01/My%20Application%20Service%20-%20Test%20Service.ear/test-plan-rest.war/WEB-INF/lib/jaxb-api-2.2.11.jar!/javax/xml/bind/JAXBContext.class。请确保您指定了正确的 ClassLoader。`

【问题讨论】:

  • WebSphere 已经提供 JAXB,请尝试从您的应用程序中删除 WEB-INF/lib/jaxb-api-2.2.11.jar
  • 但是父母最后应该照顾好,对吧?
  • 不一定,因为 JAXB 不是 Spring Boot 库,而是服务器用于其他功能的库,例如 JAXWS。因此,如果您使用第三方实现,可能需要禁用其他一些功能。

标签: spring-boot websphere-8


【解决方案1】:

你应该可以通过添加来做到这一点

DisableIBMJAXWSEngine: true

到您的应用程序的META-INF/MANIFEST.MF 以在应用程序级别禁用它。

要在服务器级别禁用它,请按照以下说明操作:http://www-01.ibm.com/support/knowledgecenter/SS7JFU_6.1.0/com.ibm.websphere.express.doc/info/exp/ae/twbs_thirdparty.html?cp=SS7JFU_6.1.0%2F1-7-9-4-1-14-0 在服务器级别禁用。

【讨论】:

    猜你喜欢
    • 2016-02-26
    • 2020-12-17
    • 2017-10-27
    • 1970-01-01
    • 1970-01-01
    • 2018-06-21
    • 1970-01-01
    • 2017-09-30
    • 2016-01-14
    相关资源
    最近更新 更多