JBoss fails with java.lang.NoClassDefFounderror when using ReadyNow

Problem:

When attempting to start the JBoss Application, the following java.lang.NoClassDefFoundError exception ocurs (zing-jdk1.8.0-19.03.0.0-4-x86):

2021-07-21 16:46:11,565 2585 ERROR [org.jboss.mx.loading.LoadMgr3] (RNWorkerThread1:) Not resheduling failed loading task, loadTask=org.jboss.mx.loading.ClassLoadingTask@35904080{classname: org.jboss.jms.client.delegate.ClientSessionDelegate, requestingThread: Thread[RNWorkerThread1,5,system], requestingClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@6c224e12{ url=null ,addedOrder=2}, loadedClass: nullnull, loadOrder: 2147483647, loadException: java.lang.NoClassDefFoundError: org/jboss/aop/Advised, threadTaskCount: 0, state: 1, #CCE: 1}
java.lang.NoClassDefFoundError: org/jboss/aop/Advised
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:679)
at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:659)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:193)
at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:520)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.aop.Advised
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:514)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 18 more
2021-07-21 16:46:11,566 2586 ERROR [org.jboss.mx.loading.LoadMgr3] (RNWorkerThread2:) Not resheduling failed loading task, loadTask=org.jboss.mx.loading.ClassLoadingTask@31f96005{classname: org.jboss.jms.server.endpoint.advised.SessionAdvised, requestingThread: Thread[RNWorkerThread2,5,system], requestingClassLoader: org.jboss.mx.loading.UnifiedClassLoader3@6c224e12{ url=null ,addedOrder=2}, loadedClass: nullnull, loadOrder: 2147483647, loadException: java.lang.NoClassDefFoundError: org/jboss/aop/Advised, threadTaskCount: 0, state: 1, #CCE: 1}

 

Cause:

This is an issue if ReadyNow is enabled.  The class loading algorithm appears to be the root cause.

 

Solution:

This issue can be resolved by turning off the following two parameters:

-XX:-ProfileLoadRelatedClasses

-XX:-ProfilePreloadClasses

and restarting the application.

 

A description of the above two parameters follows:

Flag Default value Description
ProfilePreloadClasses TRUE Preloads classes from the standard ClassLoaders before running main
ProfileLoadRelatedClasses TRUE Enables/disables loading related classes found in the profile file

 

Add Comment

Comments

0 comments

Article is closed for comments.

Was this article helpful?
0 out of 0 found this helpful