How to Solve Deployment Error because of Previous uncleaned Deployment

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 :

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 :