rperez
rperez

Reputation: 8520

PermGen error due to leak in JAXBClassLoader

I am running a large Java 7 application (built by Maven) which started to crash multiple times due to PermGen error. After profiling it (jProfiler) I noticed the ClassLoader section holds increasing number on ClassLoader of type: org.eclipse.persistence.internal.jaxb. JaxbClassLoader until the process is choke. I am not using EclipseLink directly but this class for sure is in the classpath due to some other transitive dependencies. 1) can anyone explain this behavior of increasing number of class loders? 2) how can I approach this problem, any idea how to use Maven to find all modules that their transitive dependencies, add this class to classpath.

Thanks, Ronen

Upvotes: 0

Views: 777

Answers (1)

artbristol
artbristol

Reputation: 32427

Use the dependency plugin (per this answer https://stackoverflow.com/a/6110881/116509) to see what requires it.

But that won't solve your problem, because you probably can't remove it from the classpath. I'd try googling JAXB memory leak instead (e.g. see this answer https://stackoverflow.com/a/3285931/116509)

You can also try running your application on the Java 8 JVM which abolished PermGen (but see digitaljoel's comment, below), though fixing the leak would be better.

Upvotes: 1

Related Questions