Im working in 2 separate webapplications a back and front app. The funny thing is when I run the back-end I don't have any issues. But in the front-end I get the following error:
I have the following error in Netbeans
NetBeans: Deploying on Apache Tomcat or TomEE
profile mode: false
debug mode: false
force redeploy: true
Undeploying ...
undeploy?path=/
OK - Undeployed application at context path /
In-place deployment at D:\WebDevel\WebStore\WebFrontE\target\Web-1.0-SNAPSHOT
Deployment is in progress...
deploy?config=file%3A%2FC%3A%2FUsers%7E1%2FAppData%2FLocal%2FTemp%2Fcontext7815575477480252472.xml&path=/
FAIL - Deployed application at context path / but context failed to start
Both are running on the same Tomcat. my colleague has the same code and it works fine :-s
Context Path
(or) Context Root
must be unique for each application deployed on the server.
So you can't deploy two applications with same context root to the same server. It seems for both of your applications the context path is /
.
Check server.xml
to see what context path both of them have. If they are not unique, then change them to solve the problem.
But if you want the same context root for both applications, then you need to deploy them in two different servers.
For more information: Tomcat Context paths configuration
While trying to deploy a spring boot web app from jenkins to an external VM I was getting the same error as below. After I look into tomcat log I found it was for java version error. I didnt install proper java version which my spring boot application supports. I installed openjdk 8 and removed java7 from vm and it was resolved.
The actual cause behind the below error can be many . so check your tomcat /logs/catalina.out directory for exact error. at Jenkins build log it doesn't give actual error.
FAIL - Deployed application at context path [/webapp] but context
https://www.youtube.com/watch?v=1jsKGhXmm4c
I may be a little late but would say that this could be because of the change in the factory name in Tomcat 8. So follow the below steps:
1) First, see if you are using Tomcat 8 or higher.
2) If yes, and tomcat is not able to deploy your application. Run the application in Debug mode and see stack trace in Tomcat window (at bottom. Not same as Tomcat.log). Scroll down the window and see if you can find an Exception like this:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory
3) If you see something like above, Open your META-INF/context.xml and replace or add the factory attribute in the resource tag with: factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
4) Restart tomcat and redeploy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With