- This topic has 12 replies, 2 voices, and was last updated 17 years, 8 months ago by Samer Kanjo.
-
AuthorPosts
-
Samer KanjoParticipantSince I have upgraded to Eclipse 3.2.2 and MyEclipse 5.1.1 (running Java 5) I have been experiencing a most annoying problem. When deploying WARs or EARs to Tomcat 5 or JBoss 4 MyEclipse will occasionally create a folder named .myeclipse in the project root folder and deploy the application there rather than to the specified application server.
It took a while to figure out what was going on, and I only discovered the source of the problem using ClearCase when it wanted to add a bunch of new files to source control. The other symptom is MyEclipse complaining that it cannot deploy or re-deploy and application due to underlying changes and that I will need to manually re-deploy.
The workaround is to simply delete the .myeclipse folder when this happens. However, I do not know why this is starting to happen. Any ideas?
Riyad KallaMemberThe .myeclipse folder is a temporary build folder, it’s like not *deploying* to that directory, just using it as a scratch folder for building during coding sessions.
Are you actually encountering deployment issues where you will go say “Deploy” and no folder in Tomcat or JBoss will be created? Or was it just the clear case behavior that made you think something screwy was going on?
If you are running out of process scripts like Ant or XDoclet, without refreshing your project, redeploying will fail with messages like that. Also if you are using a packaged deployment, and not an exploded deployment, you will also get a message like that because MyEclipse will only hot-sync changes with an exploded deployment.
Samer KanjoParticipantThe problem occurs when I deploy. I currently do not use any other means to deploy the application.
A typical scenario would be making an exploded deployment of my web application to Tomcat to try out a new feature. This would involve: make a change, deploy, test, find a problem, make a change, deploy, test, etc. Sometime during this cycle the deploy would fail and I would find a .myeclipse folder in my project, which was previously not there. The deployment will fail until I manually delete the .myeclipse folder. It makes no difference if I manually delete the application from Tomcat. Deployment will only work again if I delete the .myeclipse folder.
Perhaps the .myeclipse folder is not alwasy being automatically deleted?
Riyad KallaMemberOh I see… actually when you use an exploded deployment, there is no need to keep opening the deployment tool and hitting redeploy. MyEclipse will keep your project syncronized to it’s deplyment location automatically (try it out, create a new JSP, then without doing anything go check the Tomcat dir, you should see the JSP there).
Also if you are using the redeploy feature over and over again, the deployment failure is expected because it’s running up against the locked server resources. And a redeploy is technically an “undeploy” then a “deploy”, so the undeploy step is failing. But most of the time it’s harmless.
See if working with the exploded deployments as I mentioned helps mitigate any issues you were having.
Samer KanjoParticipantFor a single web application I would normally agree that there is no need to re-deploy but I have 3 web applications to deploy at once, 2 of the web applications use Spring’s HTTP Invoker to create remote services and the third is your typical web application with JSPs and the like. I also have about 5 other Java projects that these 3 projects are dependent on. If I make a change in one of the 2 remote service project or one of the 5 library projects then I need to re-deploy the web applications or the changes will not be included. If I simply make changes to a web application’s presentation layer then I usually do not need to re-deploy.
I am trying to build a set of services that can be re-used by a set of web applications. One service is for authentication and authorization. Being that I am primarily developing HR based applications, I have a service for employee related information. I am also creating a common framework for the HR domain so that I don’t need to re-write the same code in all applications over and over again.
I also wrote my services in such a way that they can be deployed as POJOs or as remote services using HTTP Invoker, Hessian/Burlap, RMI, etc. Or can be exposed as heavyweight Web Services or lightweight REST services. Since all of these projects are being developed at once, as they are first versions of all, this is necessary. In the future I would not be developing all of these at once. For now my environment is probably more complicated then the typical developer’s.
Riyad KallaMemberskanjo,
We just added the feature when using “Redeploy” to touch the web.xml file of the deployed app which causes a reload in most web applications which is why you are relying on to realize your changes… you could use the Tomcat App Manager and just hit the reload button next to the web context of your choice, or touch the web.xml file yourself.Or of using redeploy doesn’t provide any functionality problems for you, there is certainly no harm in continuing to use it either.
Samer KanjoParticipantDoes re-deploy include dependent projects or just the project whose web.xml you touched?
Riyad KallaMemberRedeploy is a full undeploy then a full deploy, so it includes all the dependencies and other functions you’d get from the initial deploy.
Samer KanjoParticipantYou mentioned that you just added this feature. Do you mean in an upcoming release?
Riyad KallaMemberSorry, I’ll clarify. We just added the feature in 5.1 to have the “Redeploy” function, touch the web.xml file. The rest of the functionality (Redeploy == undeploy + deploy) is still the same as it has been.
We did make it more resilient in 5.1 though to not stop when it hit a locked resource though and to try and do a depth-first deployment so the descriptors are one of the last things deployed. This helps some app servers that reload very quickly, to not try and reload an app *as* it’s deploying from MyEclipse (Weblogic and I believe Websphere used to do this)
Samer KanjoParticipantI can confirm that the feature of re-deployment works but only for a single web application deployment. If I am deploying 3 applications at once then I need to re-deploy each one. I would be nice if I can re-deploy everything that is currently deployed at once or least allow multiple selections in the list of deployed applications so I can re-deploy several applications at one time.
However, I would like to get back to my original problem, which is starting to get rather annoying with its consistency. The .myeclipse folder continues to remain behind after deploying an application. This behavior did not occur until after upgrading as I indicated. What can be done about this? Isn’t MyEclipse supposed to be cleaning this folder up after using it?
Riyad KallaMemberHowever, I would like to get back to my original problem, which is starting to get rather annoying with its consistency. The .myeclipse folder continues to remain behind after deploying an application. This behavior did not occur until after upgrading as I indicated. What can be done about this? Isn’t MyEclipse supposed to be cleaning this folder up after using it?
It’s a scrap/build folder… it should be cleaning it up, but there should be no harm in it leaving some resources around in there. Is this impeding development or you are just annoyed by it being there and not being clean?
Samer KanjoParticipantThe annoying part of the problem is ClearCase attempting to check-in the folder and its contents becasue it thinks tis a new resource. I have added the folder to the Ignore Resources list under Team preferences. Hopefully that will stop ClearCase from trying to check the folder in.
-
AuthorPosts