2016-01-07 64 views
3

我正在嘗試構建Spring Boot控制檯應用程序。 到我使用的彈簧初始化v 1.3.1如何在Spring Boot中使用WebSphere Runtime庫作爲站點應用程序

它是簡單的「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-啓動獨立應用程序

目標: 我正在嘗試開發一個簡單的獨立Java應用程序,它將通過IIOP調用EJB服務。這個應用程序運行在外(作爲一個獨立的客戶端),並與websphere內的EJB應用程序交談。

+0

我仍然在尋找答案,但我發現一個臨時的解決辦法,那就是我降級的春天開機版本1.1.1從1.3.1開始 –

回答

2

默認情況下,jmx在spring-boot中啓用。

如果您沒有爲您的項目使用JMX。在application.properties中添加此行。這應該解決這個問題。

spring.jmx.enabled=false 
0

我不得不添加下面我application.properties春季啓動1.3.5.RELEASE

spring.jmx.enabled=false 
spring.jta.enabled=false 
相關問題