How to Solve Deployment Error because of Previous uncleaned Deployment

Posted on

This is an article where the main point is to show how to solve error message caused by a previous uncleaned deployment. It is actually happened upon erasing a previous deployment which in this context, it is a MySQL JDBC Driver Connector. It has been removed from the web-based Wildfly Administration Console. But suddenly, upon starting the Wildfly Java Application Server’s service, the following error occurred :

16:24:38,646 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "mysql")]) - failure description: "WFLYSRV0137: No deployment content with hash edba0011304daa1b2648eb4848a44536acbbebf6 is available in the deployment content repository for deployment 'mysql'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuration file and restart."

Although, it has been cleaned from the deployment using the removal process from the web-based Wildfly Java Application Server’s Administration Console, it still causing error as shown above. Below is the actual error.log file from the Wildfly Java Application Server :

JAVA_OPTS already set in environment; overriding default settings with values: -Xms128m -Xmx512m -server -Dhttp.nonProxyHosts=localhost,127.0.0.1,hostname -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.management.http.port=9990 -Djboss.http.port=8080
=========================================================================

JBoss Bootstrap Environment

JBOSS_HOME: /opt/wildfly-12.0.0.Final

JAVA: /opt/jdk1.8.0_171/bin/java

JAVA_OPTS: -Xms128m -Xmx512m -server -Dhttp.nonProxyHosts=localhost,127.0.0.1,hostname -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.management.http.port=9990 -Djboss.http.port=8080

=========================================================================

16:30:13,758 INFO [org.jboss.modules] (main) JBoss Modules version 1.7.0.Final
16:30:14,152 INFO [org.jboss.msc] (main) JBoss MSC version 1.3.2.Final
16:30:14,166 INFO [org.jboss.threads] (main) JBoss Threads version 2.3.1.Final
16:30:14,314 INFO [org.jboss.as] (MSC service thread 1-3) WFLYSRV0049: WildFly Full 12.0.0.Final (WildFly Core 4.0.0.Final) starting
16:30:16,251 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
16:30:16,290 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 30) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
16:30:16,293 INFO [org.wildfly.security] (ServerService Thread Pool -- 20) ELY00001: WildFly Elytron version 1.2.2.Final
16:30:16,392 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "mysql")]) - failure description: "WFLYSRV0137: No deployment content with hash edba0011304daa1b2648eb4848a44536acbbebf6 is available in the deployment content repository for deployment 'mysql'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuration file and restart."
16:30:16,398 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
16:30:16,419 INFO [org.jboss.as] (MSC service thread 1-3) WFLYSRV0050: WildFly Full 12.0.0.Final (WildFly Core 4.0.0.Final) stopped in 11ms

It is said that the main problem is the deployment which hasĀ  the hash of edba0011304daa1b2648eb4848a44536acbbebf6 does not exist although it is being declared in the Wildfly Java Application Server’s configuration.

So, in order to solve the problem as shown in the above error message, the solution taken is by just cleaning up WildFly cache/work data just to make sure that there’s no old copy of the JARs from previous deployments hanging in there so that it will actually prevent from a potential collide with the new deployment. The steps taken is enlisted below :

1. Remove all the contents of \wildfly-location\standalone\data (expect of custom data folders like folder containing uploaded files, of course)

2. Trash all contents of \wildfly-location\standalone\deployments

3. Trash all contents of \wildfly-location\standalone\tmp

4. The last one is to check the content of the file named ‘standalone-full.xml’. Sometime, the reference of the previous deployment still declared in the file named ‘standalone-full.xml’ although it has been removed from the other configuration file named ‘standalone.xml’. Below is part of the actual content of ‘standalone-full.xml where the deployment definition is still exist :

<deployments>
<deployment name="mysql" runtime-name="mysql-connector-java-8.0.11.jar">
<content sha1="edba0011304daa1b2648eb4848a44536acbbebf6"/>
</deployment>
</deployments>

Just erase the above deployment declaration or deployment definition. Don’t forget to shutdown the Wildfly Java Application Server’s service and then start or turn it on again.

Leave a Reply