Why To Pick Projects Name Carefully In Netbeans

By | April 12, 2007

I recently had a problem that baffled me. As you may have noticed in my previous posts I work with Netbeans for my job, and have had some problems and help from the community in the past :). This time I had the following problem.

I had several web projects that were all in the same root package name. Every time I deployed one project another would undeploy, using Tomcat not JBoss. For the live of me I couldn’t figure out why deploying a web project would cause this problem. But it sure is annoying.

To try to solve it I first deleted my Tomcat, thinking that this might have been causing it. Of course I had to copy the Tomcat folder of one of my colleges to get everything to work again. Starting to deploy my projects again with all the hope it might have been solved. Shocker to see my hopes shattered when I had the same problem again.

Second step was de-installing Netbeans completely and reinstalling, if that doesn’t do it then I don’t know what will. After all this and setting up some of the libraries again I started to deploy again. No luck. I still couldn’t get multiple web projects deployd.
The solution
After some thinking and a lot of testing I found out that it had to do with the names of my projects. Though I still don’t know why! I’ll try and demonstrate the problem. I had a project in the package a.a so I named the project ‘a.a’. Another project was in the package ‘a.b’ so I named the project accordingly.

When I deployed ‘a.a’ I had no problems, after all I didn’t deploy ‘a.b’ yet. But as soon as I deployed the project ‘a.b’ my other deployed project ‘a.a’ was un-deployed.

Apparently Netbeans can’t handle multiple projects that have similar project names. For some reason it undeploys them. So be sure to keep track of that when you encounter the same problem I did. Just for the record I used Netbeans 5.5 and Java 6.

Leave a Reply