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 :
An odd situation occurred when the situation depicted as in the title of this article is happened. It is at the time of running or deploying a project using either IDE like Netbeans and then after that deploying the same or different project using a command line. The command line in the context of this article is the maven builder tool command line.
The command line executed is ‘mvn wildfly:deploy’ which is used to deploy an associated project where the command executed. The execution of this command to an already deployed application can trigger the following error message of a ‘duplicate resource’ :
This article focus on how to solve the problem related with the failure of executing Wildfly Java Application Server’s configuration. It is when the JDBC JNDI is specified later on it is used for the MySQL database to be connected. It is done by adding the datasource which can be referred from the article titled ‘How to Add Datasource in Wildfly Java Application Server via Command Line’ in this link . Based on the article given in that link, datasource added has a parameter –jndi-name as specified as follows :
Related to the article titled ‘How to Add Datasource in Wildfly Java Application Server via Command Line’ in this link which is written before, this article is specifically written with the relation of testing the datasource which has already been added and defined before. After successfully adding the datasource and also reloading the Wildfly Java Application Server, there is no way to know that the datasource configuration added is totally working successfully.
First of all, it must be tested. The mechanism for testing it can be done by directly used in the application deployed. In other words, the datasource added is directly connected through the application deployed. But there is actually a simple mechanisme for testing the already added datasource before it can be actually tested with the application deployed. It can be done by executing the following command as shown in the following pattern below :
This article is written to show how to add datasource in Wildfly Java Application Server. As far as it is, there are two ways which can be used in order to add datasource in Wildfly Java Application Server. The first one is using the web interface provided after the service of Wildfly Management Console is activated and the second one is by using the command executed via command line of the Wildfly Management Console Command Prompt line. In this article, the main focus is about how to add datasource in Wildfly Java Application Server by using a certain command pattern via command line. Precisely, the command line is in the Wildfly Management Console Command Prompt line where in that command prompt line, only the specific command related to manage Wildfly Java Application Server can be executed.
In this context, the command specified is indeed on how to add datasource in Wildfly Java Application Server. The datasource which is going to be added is a datasource for application deployed in Wildfly Java Application Server. It is a datasource where the application can connect to MySQL Database Server using the specified datasource configuration. Below is the command pattern for adding datasource which is a configurationi connection to MySQL Database Server from the application deployed :