【问题标题】:How to use WebSphere Runtime libraries inside Spring Boot as stand along app如何在 Spring Boot 中使用 WebSphere Runtime 库作为支持应用程序
【发布时间】:2016-01-07 16:14:56
【问题描述】:

我正在尝试构建一个 Spring Boot 控制台应用程序。 开始我正在使用 spring 初始化程序 v 1.3.1

这是简单的“hello world”,没有 Web,没有 JPA,什么都没有 现在我编辑了 pom.xml 并向名为的 jar 文件添加了一个依赖项 'com.ibm.ws.ejb.thinclient_8.5.0.jar'

在构建时突然出现以下错误

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.management.MBeanServer]: Factory method 'mbeanServer' threw exception; nested exception is org.springframework.jmx.MBeanServerNotFoundException: Could not access WebSphere's AdminServiceFactory.getMBeanFactory/getMBeanServer method; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
... 37 common frames omitted

如何将 Websphere 8 运行时库包含到 Spring-Boot 独立应用程序中

目标: 我正在尝试开发一个简单的独立 java 应用程序,它将通过 IIOP 调用 EJB 服务。此应用程序在外部运行(作为独立客户端)并与 websphere 内的 EJB 应用程序通信。

【问题讨论】:

  • 我仍在寻找答案,但我找到了临时解决方法,即我将 Spring Boot 版本从 1.3.1 降级到 1.1.1

标签: spring-boot ejb websphere


【解决方案1】:

spring-boot默认开启jmx。

如果您的项目没有使用 JMX。在 application.properties 中添加这一行。这应该可以解决这个问题。

spring.jmx.enabled=false

【讨论】:

    【解决方案2】:

    我必须将以下内容添加到我的 application.properties 以用于 Spring boot 1.3.5.RELEASE

    spring.jmx.enabled=false
    spring.jta.enabled=false
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-22
      • 1970-01-01
      • 2015-03-05
      相关资源
      最近更新 更多