如何在Spring Boot中使用WebSphere Runtime库作为应用程序

时间:2016-01-07 16:14:56

标签: spring-boot ejb websphere

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

它简单的'hello world'没有网络,没有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应用程序进行对话。

2 个答案:

答案 0 :(得分:2)

默认情况下,在spring-boot中启用jmx。

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

spring.jmx.enabled=false

答案 1 :(得分:0)

我必须将以下内容添加到我create的Spring引导mysqli_query

select