How to stop tomcat deleting existing WAR contents when a new version of WAR is to be deployed - tomcat7

How to stop tomcat from deleting existing WAR contents when a new version of WAR is to be deployed in hot deployment?

Related

Control order of WAR file deployment in JBoss EAP 7.2.0

I have developed two Spring Boot applications, one is Cloud Config Server and the other is a Spring Boot application that fetches property from Config Server. I have deployed the two applications as WAR files in JBoss EAP. I am deploying the WAR files in sequence, deploying the Config Server before the other application. Problem is happening after I restart the server, the second war file is getting deployed before the war file for Config Server.
I Jboss EAP 7.2.0, how will I ensure that the WAR file for Config Server is always deployed before the WAR file of the other application?
You can control the startup order of deployment by using jboss-all.xml deployment descriptor to declare dependencies between the deployments.
Example:
If you want foo.ear is deployed before bar.ear then you can create an bar.ear/META-INF/jboss-all.xml file like this:
<jboss xmlns="urn:jboss:1.0">
<jboss-deployment-dependencies xmlns="urn:jboss:deployment-dependencies:1.0">
<dependency name="foo.ear" />
</jboss-deployment-dependencies>
</jboss>
[1] https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.1/html/configuration_guide/deploying_applications#control_order_deployments
[2] https://access.redhat.com/solutions/88763

Jelastic - deploy from maven generates both WAR and EAR files and fails

I am using Jelastic and I have an environment with a WildFly 10.1 node and a Maven 3.5.0 node. When I click "build and deploy" on the project in the Maven node my application should build and deploy a EAR file.
However, after the first time I do that, the deploy fails, and when I check the WildFly admin console there is a EAR and a WAR file. I have no idea where this WAR is coming from, and I can't find such file in the "target" folder either.
Checking the WildFly log, I see a "org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.app.myapp-dev is already registered"
If I remove the war from the admin console, disable the EAR and re-enable it, the application works.
I don't know exactly how Jelastic works with maven, but I believe there is no problem with my pom.xml files.
Thanks in advance!
edit: here's the pom.xml for the project root, and the pom.xml for the inner EAR module.
Automatic build and deploy functionality in Jelastic is designed to build all the targets specified in pom.xml and deploy all the built artifacts to the app server.
If multiple targets are specified in root pom.xml of the project, all of them will be built and deployed to the app server, not only the .ear target.
Please try to deploy the subproject with the inner EAR module with the appropriate pom.xml as root project file to build and deploy only the *.ear file.

Eclipse Mars + Wildfly 9 + deployment not working

I have a Java Spring application, configured in Eclipse Mars and I am running Wildfly 9 from within Eclipse. I am using the wildfly-maven-plugin to deploy to server.
These are the steps I follow:
Start the server from Eclipse and do maven build which also deploys the application to server. I can see whole lot of logs on server of "successful deployment"and I can access my application in browser. It creates a folder under "/standalone/data/content" but no war or exploded WAR under "standalone/deployments"
If I change some code and save it in Eclipse, (I have checked Automatically publish check box and build on save), the server logs says:
Replaced deployment "myApp.war" with deployment "myApp.war"
Content removed from location "standalone\data\content..."
And I see the prev folder created during step 1 is removed and myApp.war is added to deployment folder. But now I can not access my application in browser.
auto-deploy-exploded="true"
That is in the section of standalone.xml.

Tomcat deployment issues

I deployed my war file in tomcat server but it is not showing on the webapps folder. I get this error
Java.lang.IllegalStateException:ContainerBase.addChild: start:org.apache.catalina.LifecycleException.

How do I deploy ejb jar in TomEE

M exploring openejb 4 beta with TomEE, could anyone explain how I deploy ejb jar on TomEE? I'm using it for testing purposes. Also, is it possible to configure tomee in eclipse and debug through ejbs??
Thanks in advance.
There are several scenarios for using EJB through the TOMEE(included OpenEJB), if you have an EAR file (consists of JARs and WAR) for deployment you need first active the APP folder in installed(means copied) TOMEE folder then you just drop your EAR file into APP folder and TOMEE unpack it and will be deployed properly.

Resources