Hot Deployment Exhausts the PermGen or Metaspace when the Application Includes Database Drivers

Solution Verified - Updated -

Issue

  • We're bundling our database driver in our application's WEB-INF/lib directory. After a couple hot deployments of this application, JBoss throws an "OutOfMemoryError: PermGen space".
  • The heap dump shows classloaders are building up. The leaked classloaders trace back to the driver classes stored in the writeDrivers Vector of the java.sql.DriverManager system class.

Environment

  • JBoss Enterprise Application Platform (EAP)

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