Recompiling while debugging causes web application restart

I am debugging and deploying a Spring enabled Web Application on Weblogic 12 in IntelliJ 8.

I know that the version mismatch is really ridiculous and I should be upgrading to at the very least IntelliJ 9, where the very same application works just fine. However, due to circumstances out of my control, I am stuck with trying to get this working with IntelliJ8.

All I'm looking for, is some help to eliminate the possibility that I'm doing something wrong, and that this is not a problem because of the huge mismatch in IntelliJ and Weblogic versions.

So, I am deploying my application in debug mode and it works fine. I make some code changes in my Java classes and hit Ctrl+F9 to recompile. I get the little Green popup saying that x number of classes have been reloaded.

Now, when I access my application via the browser, I see messages on the console that indicate that my Spring application context is shutting down and the web application restarts. It doesn't come up cleanly after the restart either. I've tried not accessing my application after the recompile and have waited for about 1 minute, and the restart doesn't seem to occur. It seems to occur only after I attempt to make a connection after the recompile.

As I said, this works just great with IntelliJ9.

Any hints on what I should possibly look at to fix this issue would be much appreciated.

Comment actions Permalink

If I remember correctly, there was option 'Reload web application after compilation' in File | Settings | Compiler. If it is set to 'Always' try to
change it to 'Never' or 'Ask'.

Nikolay Chashnikov
Software Developer
JetBrains, Inc
"Develop with pleasure!"

Comment actions Permalink

It was already set to "Never". I tried setting it to "Ask" and I got a popup upon recompilation asking to deploy facets, to which I said No.

This was followed by the usual prompt for reloading compiled classes, to which I said "Yes", of course.

The problem still occurs.

Comment actions Permalink

I tried to isolate my problem. I created a simple web app with a Spring application context with 1 bean class in it and a non-bean class in it.

When I modify any of these classes, recompile and reload the changed classes in IntelliJ 8, the Spring application context restarts.

If I have a Spring application context, but no beans defined in it and I perform the same test as above, the Spring application context does not restart.

Normally, I would've concluded that this was a Spring problem and moved to their forums, however, I still don't get why this would work in IntelliJ 9 and not in 8.

Any thoughts?


Please sign in to leave a comment.