In the past two days IDEA has begun opening two browser windows when deploying an exploded WAR for JBoss. IDEA opens the first browser window while JBoss is still starting up and the browser window displays a 404 error. This has not happened before. The second browser window opens up at the appropriate time and displays the welcome page for my web application. The other configuration I use, for normal WAR deployment, continues to work fine (doesn't open two browser windows). I looked in my JBoss server run/debug configurations and they look fine. How to fix this problem?
I can't reproduce this.
Could you please provide:
1) your JBoss version
2) screenshot of the run configuration
3) complete text content of the Output tab of the run configuration tool window
4) what is the URL being opened at the first time? is it the same as shown in the run configuration and the one opened at the second time?
What happened was that I changed my project from EAR structure to WAR by making a few changes to my POMs after reviewing the Maven guide (http://maven.apache.org/guides/getting-started/index.html#How_do_I_build_other_types_of_projects). After the final step, the Maven guide said the following:
"You might like to generate your IDEA workspace again from the top level directory..."
Stupid move on my part to follow that instruction, because running it installed previous-generation Intellij project files. Next time I started Intellij it asked me if I wanted to import the files. I said yes. Again, stupid mistake. Intellij put a gazillion <orderEntry> in my iml project files, which messed up my run/debug configurations by attaching unneeded & duplicate dependencies to my modules. Thankfully, I had my .iml files in VCS, so I was able to revert to previous versions, and that solved the problem.
Took a while to figure it out but nice thing about it was I learned about the .iml files and the .idea/artifacts/xxx.xml files a little bit.