Metaspace leaks when hot deploying applications with spring framework to JBoss EAP 7

Solution Verified - Updated -

Issue

  • Repeated hot deployment of Spring Boot war applications to JBoss EAP 7 throws java.lang.OutOfMemoryError: Metaspace:

    12:44:36,178 WARN  [org.jboss.modules.define] (ServerService Thread Pool -- 2) Failed to define class org.springframework.beans.factory.support.AbstractBeanDefinition in Module "deployment.app.war" from Service Module Loader: java.lang.OutOfMemoryError: Metaspace
    

Environment

  • Red Hat JBoss Enterprise Application Platform
    • 7.3
    • 7.4
  • OpenJDK
    • 11
    • 17
  • Spring Framework
  • Spring Boot

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