Getting NoClassDefFoundError and ClassPathXmlApplicationContext from a Spring application in JBoss EAP 7

Solution Verified - Updated -

Issue

When migrating an Spring application from JBoss EAP 5 to 7 I need to add the spring-context-5.2.12.RELEASE.jar library, although when trying to make a deploy of the artifact throws me the following error:

...
Caused by: java.lang.NoClassDefFoundError: Failed to link org/springframework/context/support/ClassPathXmlApplicationContext (Module "deployment.example.ear" from Service Module Loader): Failed to link org/springframework/context/support/AbstractXmlApplicationContext (Module "deployment.example.ear" from Service Module Loader): Failed to link org/springframework/context/support/AbstractRefreshableConfigApplicationContext (Module "deployment.example.ear" from Service Module Loader): org/springframework/beans/factory/BeanNameAware
...

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content