Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use WebSphere Runtime libraries inside Spring Boot as stand along app

I am trying to build a Spring Boot console app. to get started I am using the spring initializer v 1.3.1

it's simple 'hello world' with no Web, no JPA, no anything Now I edited the pom.xml and added a dependency to jar file called 'com.ibm.ws.ejb.thinclient_8.5.0.jar '

all of a sudden I get the following errors upon build

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

How can I include Websphere 8 run time libraries into Spring-Boot stand-alone app

Goal: I am trying to develop a simple stand alone java app, that will invoke EJB services via IIOP. This app runs out-side (as a stand alone client) and talks to EJB app inside websphere.

like image 307
vamsi-vegi Avatar asked Jan 01 '26 02:01

vamsi-vegi


1 Answers

By default, jmx is enabled in spring-boot.

If you are not using JMX for your project. Add this line in the application.properties. That should solve this problem.

spring.jmx.enabled=false
like image 163
Sireesh Yarlagadda Avatar answered Jan 04 '26 02:01

Sireesh Yarlagadda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!