Wildfly 21 standalone.xml is overwritten when a war file is deployed - wildfly

I just upgrade to Wildfly 21 from Wildfly 14 and stopping and starting the server works fine. However, whenever I deploy or re-deploy a war file, my modified standalone.xml is overwritten to the default version. Stopping and restarting the server doesn't rewrite my standalone.xml file. I can't find any mention of this via google. Help!

Related

How to avoid deployment at each reboot JBoss EAP 7.2 server?

Every time I start jboss EAP 7.2.0 server (standalone), my ear file present in the "standalone\deployments" folder is deployed. Is it possible to avoid deployment at each reboot of the server?
Have a look at the documentation
So earfilename.ear.skipdeploy should do the trick.
Also if you undeploy the application a earfilename.ear.undeployed file is created. As long as this file exists the application won't be deployed.

Deliver WildFly with default deployment

WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final):
I am searching for a possibility to trigger the deployment of my Java EE application (packed as EAR file), without starting the WildFly server or using the deployment-scanner.
Is it possible to add the ear file to a configuration file, so that the server start the deployment of my application at the first time the server starts?
The server has to be started to deploy anything. You can use offline CLI to deploy the content. This wouldn't actually process the deployment until the server has been restarted.

Spring Petclinic (2013 version) doesn't work in JBoss AS 7

I'm trying to run the Spring Petclinic example on JBoss AS 7.1.1. I've imported the maven project from https://github.com/SpringSource/spring-petclinic/ to Eclipse Juno and successfully deployed it, but http://localhost:8080/petclinic/ gives me HTTP Status 404 error.
The only problem I can see from the log is
JBAS011006: Not installing optional component
org.springframework.web.context.request.async.StandardServletAsyncWebRequest
due to exception:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS011054: Could not find default constructor for class
org.springframework.web.context.request.async.StandardServletAsyncWebRequest
but according to Spring3.2 and jboss as 7 it's normal behavior.
I've found some advices about modifying the Petclinic sample for JBoss, but all of them are for the old version of the sample, not the updated 2013 version (http://blog.springsource.org/2013/03/21/spring-petclinic-is-on-github/).
The sample works fine with Tomcat 7.0.39.
Update:
The problem only occurs when I run the sample from Eclipse using JBoss. As Andrzej said, building the app with standalone maven and deploying the resulting war works fine.
The problem is JBoss/JBoss Tools use incorrect war name and context root when deploying from Eclipse.
In pom.xml the war name is specified as <warName>petclinic</warName>, but JBoss uses "spring-petclinic" instead. Tomcat, Glassfish, and Weblogic don't have this problem and work correctly with deployment from Eclipse.
The workaround is either to use http://localhost:8080/spring-petclinic/ instead of http://localhost:8080/petclinic/ or configure the context root via WEB-INF/jboss-web.xml:
<jboss-web>
<context-root>petclinic</context-root>
</jboss-web>
The Spring Petclinic (2013 version) works well with Jboss AS7. Tried it with two Jboss versions. What you need is to build app with maven and deploy it to standalone/deployments folder.
Problem is running it from Eclipse Juno.

Tomcat won't undeploy ROOT.war

I deployed using the REST API of Tomcat Manager (/manager/text) my application. The war is ROOT.war. When I try to undeploy it using /manager/text/undeploy?path=/ Tomcat fails to undeploy with response:
FAIL - Unable to delete [C:\Program Files\apache-tomcat-7.0.27\webapps\ROOT]. The continued presence of this file may cause problems.
But if I try to use the Tomcat Manager GUI it can undeploy the war
Does someone know how can I solve this problem?
Thanks
Have you tried deleting the ROOT deployed directory manually?
The war's are simply exploded to directories under the webapps folder.

Undeployment fails for GWT application in tomcat 7

I am using the cargo-maven2-plugin:1.2.0 to do redeployments of my GWT 2.4.0 based web application to Apache Tomcat 7.0.25 1.6.0_30-b12 Sun Microsystems Inc. Windows Server 2008 R2 6.1 amd64).
The initial deployment works fine. I immediately try to undeploy the application using the tomcat manager when I receive the following error message:
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Unable to delete [C:\apache-tomcat7\webapps\mywebapp]. The continued presence of this file may cause problems.
From tomcat the war file and most of the unzipped web application files have been successfully removed. But it fails to delete two libraries from mywebapp\WEB-INF\lib:
gwt-user-2.4.0
servlet-api-2.3
When I now wait half a minute and trigger the undeploy again, it works.
Did anybody experience the same or a similar behavior?
I already tried to debug using PSI Probe for Tomcat but that didn't really give me any insights. What could I try next?
Both files shouldn't be deployed in the first palce. First gwt-user-2.4.0 is the complete gwt jar file. For deployment only the server specific version needs to be deployed: gwt-servlet-2.4.0.jar. The servlet-api-2.3 is already available in the tomcat lib directory. So you should set both files to provided and if you not yet have the gwt-servlet jar file, add that file to you dependencies.