Upgrading to EAP 6.0.1 causes "ClassNotFoundException" / "NoClassDefFoundError" and "Failed to load application components!" while accessing Admin Console
Environment
- JBoss Enterprise Application Platform (EAP)
- 6.0.1
- Using RPM version of EAP 6 and yum update from EAP 6.0.0 to EAP 6.0.1
Issue
While upgrading EAP 6.0.0 installation to EAP 6.0.1 using yum update
command and after restarting EAP 6 service when we try to access the Admin Console then receives the following message: Failed to load application components!
and the console does not function after that.
And I'm getting the following ClassNotFoundException
or NoClassDefFoundError
on org.jboss.el.cache.FactoryFinderCache
in server.log:
Caused by: java.lang.ClassNotFoundException: org.jboss.el.cache.FactoryFinderCache from [Module "org.jboss.as.web:main" from local module loader @851052d (roots: /usr/share/jbossas/modules)]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server.jar:7.1.3.Final-redhat-4]:
...
or
Caused by: java.lang.NoClassDefFoundError: org/jboss/el/cache/FactoryFinderCache
at org.jboss.as.web.deployment.ELExpressionFactoryProcessor.deploy(ELExpressionFactoryProcessor.java:106)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server.jar:7.1.3.Final-redhat-4]
... 5 more
Resolution
-
Please follow the below steps to workaround this issue.
-
Make sure that
JBoss EAP
is not running,stop JBoss EAP
if it is running as below:$ service jbossas stop
or
$ service jbossas-domain stop
-
Run the below command which will remove all old index files therefore forcing a new indexing at the next JBoss EAP start:
$ find /usr/share/jbossas/modules/ -type f -name *.jar.index -exec rm -vf {} \;
or
$ find /usr/share/jbossas/modules -name '*.jar.index' -delete
-
-
If you are wondering what are those files
*.jar.index
meant for, then please go through the article What is the use of '.index' files in EAP 6 modules directory? which talks about it.
Root Cause
-
Some classes were added to EAP 6.0.1 which were not in EAP 6.0.0 and the module index files from the EAP 6.0.0 remained and JBoss did not see that they needed to be rebuilt.
-
There are opened BZ/JIRA for this issue.
- Bug 901325 – (JBPAPP6-1793) rpms: after a yum update from 6.0.0 to 6.0.1 a reindex of the jar files is needed
https://bugzilla.redhat.com/show_bug.cgi?id=901325
https://issues.jboss.org/browse/JBPAPP6-1793 - Bug 901320 - (JBPAPP6-1788) RPM upgrade might not work:
https://bugzilla.redhat.com/show_bug.cgi?id=901320
https://issues.jboss.org/browse/JBPAPP6-1788 - [#MODULES-105] Package indexes older than the jar should be ignored - JBoss Issue Tracker
https://issues.jboss.org/browse/MODULES-105
- Bug 901325 – (JBPAPP6-1793) rpms: after a yum update from 6.0.0 to 6.0.1 a reindex of the jar files is needed
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments