When I deploy my WAR generated with Ant on my local system (copy/paste under /webapps), everything works fine.
The thing is, when I deploy the WAR on a remote server for test purposes, I got this error message:
There was an error thrown by Tomcat during deployment: "Error invoking method check". This however may not mean that you application failed to deploy. Please check the status in the application list
But the application is not deployed at all.
I have to use Probe (lambaprobe.org) to manage and deploy applications on Tomcat on the remote server I'm talking. And I don't have access to the filesystem, only probe.
Any idea would be much appreciated!
Thanks
I often encountered this problem and after checking the log this was caused by an OutOfMemoryError with tomcat
Impossible to check the log... We managed to restart tomcat and it works now.
Weird.
Thank you anyway!
Check the log files of tomcat; they contain the full error message.
If you can't access them easily, write a small webapp which allows you to browse and/or download the logs and deploy that.
Related
I study web application with Spring. My development environment is
SpringToolSuite (ver 3.9.6),
Tomcat (8.5)
JDK (1.8)
I write source like in the textbook and run that code, but error message has been shown:
The full message is this.
**java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.**
The source works properly, but after a few seconds, the following error message comes out.
If you know solution, I hope you let me know.
This is because of application servers like tomcat caching your old application.
Try to restart it.
Right button in your Tomcat in Servers, then 'Clean', and try to running again.
As other users replied, the tomcat is caching the old application
One of the most important non-functional requirements of any project is the build process in my opinion and that's where I kinda get stuck in my java project, which has just one external dependency, a jdbc compatible database. All the tutorials about spring and deployment out there; I've read them all, but they either say:
run it with gradle bootRun applications.properties (yes works but on a webserver I'm not going to have any properties-files, but JNDI resource for example) or
build a deployable war file with JNDI resources (yes it works on the webserver, but not in my embedded webserver or I'm doing it wrong, but I cannot find any doc about how an embedded tomcat loads a context.xml from outside the jar file).
Now I tried to use the same setup as my server and installed tomcat7 and the #Asyc #Scheduled services run, but no servlets, like a simple /status page should return "OK" just for checking. catalina.out does not show any errors. My /manager from tomcat7-admin says deployment ok, and when I click start: "FAIL - Application at context path /xyz-0.1.0 could not be started
FAIL - Encountered exception org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/xyz-0.1.0]]"
And now I want to make a cut here and throw every "bootstrap" stuff away and start from zero.
So my question is, am I wrong when I say, that the big deal of my deployment is a jdbc JNDI resource provided from the web container, which is called 'jdbc/xyz' and everyone who wants to deploy my war needs that JNDI. That means so matter if you're using wildfly, jboss, tomcat, glassfish or any embedded server: your server impl has to provide that web container and jndi resource to make it run. And I don't want to configure any tomcat, glassfish or whatever implementation in my war.
Is that wrong?
It would be great, if you could help me. I'm playing around with that many weeks now :( and if A works B does not and vice versa. Would it be easier to use JEE?
Thank you.
i have this error while launching tomcat
log from catalina.out
Unable to load specified config location file:/ .... startup failed:
Is there a way to make my java code cath this error and stop my tomcat ?
Tomcat will start up no matter what happens with the applications you expected to deploy. There is no feature to cause Tomcat to fail to start if your application fails to start properly.
You certainly do not what that feature - at least other Tomcat users do not want it. A ServletContainer can host multiple web applications, and I would not use a container that would stop simply because a deployment failed.
If a deployment fails, that perticular application is not started but others continue to run. It is up to you to fix the configuration problem and redeploy or manually stop the tomcat.
I had written a custom ejb component with schedular attached to it. In the scheduled ejb method, I am calling the RabbitMQ methods to dequeue the messages. The whole thing works with in eclipse while debugging the individual java file. but the same while build and deployed on the Wildfly server, throws the "Caused by: java.lang.NoClassDefFoundError: com/rabbitmq/client/ConnectionFactory. Seems like a classpath issue but even adding the dependent jars in the manifest file doesn't help. I am blocked with this issue. Could anyone help me on this?
"
I converted the project to dynamic web project and added the Rabbit mq client libraries to the web-inf\lib folder. Now when I tried to deploy to the Wildfly server, its detecting the external assemblies and I am able to create the connection factory. Not sure its the right way to solve the issue.
I have a webapp built using spring framework. I'm trying to deploy this to Tomcat6 using Eclipse. Everytime i make a change to jsp file, I had to clean the build, publish it & then start the server. I believe, we don't have to do all these steps for JSP changes. If i just publish the files, when the server is running, i get the below exceptions
SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/springframework/web/context/ContextCleanupListener
SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.util.Log4jConfigListener
java.lang.NoClassDefFoundError: org/springframework/util/Log4jConfigurer
And the war file is not getting deployed in server.
If I make a change to JSP file & then click restart in eclipse, it sometimes publish the files & then start the server. But in some cases, it restarts the server & then publishes the files (in which case i got the above mentioned exceptions & the war file was not getting deployed).
Ideal way that it works is, Stop the server, publish the contents & then start the server. I hate to do this every time i make a simple jsp change. Is there any alternate one click process to do this?
There's something wrong with the way you setup your project or server in Eclipse. I'd recommend following the instructions here. Also, you may want to download STS (Eclipse already bundled with Spring support) and use that instead of the vanilla eclipse.
Make sure that spring is deployed together with your application. Either set the correct export options in eclipse or copy the spring libraries to /WEB-INF/lib.
MyEclipse works fine here. You could also check JRebel as well. They advertise no redeployments. ;)
you can use exploded war and incremental hot-deploy.
this should work http://www.youtube.com/watch?v=OMtcjgTyP-g
folow at 2:30