When I run Tomcat under IntelliJ, somehow I get old classes, at least in part.

Answered

I know this happens because I can delete diagnostic log messages in my code and there will still be there when I run the app under the local Tomcat. (I hope this has not been happening on the actual remote app!) I can also rename classes that will appear in a stack trace and moving methods to other files and classes and the stack trace will still reflect my older version.

I've tried deleting the caches and restarting, rebuilding the app, rebuilding the artifacts. I've tried even deleting some class files.

So I figured out how to set up Jetty and ran it on a local Jetty. That was successful and I got the new class versions instead of the old.

I went back to Tomcat and tried "Clear contents", deleting my deployments and other things and it didn't work.

So finally I deleted the Tomcat server and downloaded a Tomcat Server from the internet and configured it in IntelliJ. That worked, but surely that is.not the intended way to do things after every program change! I'm on Mac, by the way, and on Ultimate 2021.1.

1
3 comments

It could be that there were multiple copies of the same apps installed in your Tomcat instance and the vanilla Tomcat installation has fixed it. If you can share the broken Tomcat installation and a sample app, we'll be able to investigate it further to see if it's something that can be fixed in IntelliJ IDEA.

0

I also had to delete tomcat manually two times now. After googling about it, I found this. Pretty sure this is a bug.

0

Vincent Gross please file an issue with a sample project and steps to reproduce it. Thank you.

0

Please sign in to leave a comment.