Search code examples
springspring-bootwebspherewas

Websphere 8.5.5.12 - Spring Boot not working


My spring boot applications working great on tomcat. But I need to deploy this in IBM Websphere 8.5.5.12 and there my troubles began.

I had referred to article and added the dependency 'spring-boot-starter-validation' to avoid the error:

Error activating Bean Validation integration Caused by: java.lang.NoClassDefFoundError: javax/el/ELManager

But if I keep it, I receive another error

Error 500: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: org.apache.el.ExpressionFactoryImpl incompatible with javax.el.ExpressionFactory

Please note that on WAS, I have already ensured local class loading to load first over parent. >

In the administrative console, click Applications > >Application Types > WebSphere enterprise applications > >application_name > Manage modules > webmodule_name. Select Classes loaded with local class loader first (parent >last) from the drop down list.


Solution

  • Issue resolved!!!

    After multiple attempts, I finally used and this fixed my issue:

    compile(group: 'javax.el', name: 'javax.el-api', version: '3.0.0')

    instead of below mentioned in article

    compile(group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: '2.2.1.RELEASE')

    End days for Websphere, I felt with the frustration of this issue!