For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 2 replies, 2 voices, and was last updated 18 years, 6 months ago by
Manfred Roos.
-
AuthorPosts
-
Manfred RoosMemberUsing Eclipse 3.2.1 with MyEclipse 5.1.0 on Windows.
Hello,
I am having a problem.
Deployment failure on Tomcat5. Unable to delete file: C:\tomcat\webapps\pi\WEB-INF\lib\struts.jar …”
I tried to narrow down the error:
1. It is possible to delete the file (in my case it was “struts.jar”) in the package explorer of MyEclipse. then the first “clean project” will remove the warning sign at the projectname in the package explorer. But this will only last till the next source code change.2. It is not possible to delete the file within the normal windows file explorer. As soon as you try this you get the message “Cannot delete struts: It is used by another person or program”. Responsible for this lock is MyEclipse
I dare to say that because as soon as you leave MyEclipse the file is deletable again.Hope that this annoying “feature” in MyEclipse is fixed soon. I do not like to start ignoring warning signs because they are not justified. This soon gets you into trouble.
Manfred
February 14, 2007 at 10:43 am #266119
Scott AndersonParticipantManfed,
Can you try this to help us narrow down the issue:
1) Shutdown MyEclipse and Tomcat
2) Delete your deployment under Tomcat
3) Start MyEclipse and deploy your application
4) Start Tomcat
5) Use your application a bit, particularly the portions that load StrutsFrom that state, can you describe what do you do, specifically, that causes this error to be displayed? With a set of reproducable steps we can figure out where the lock is coming from and what can be done about it. Thanks in advance for the help.
February 15, 2007 at 12:42 am #266142
Manfred RoosMemberStarting point:
MyEclipse 5.1.0 with “Struts Capabilities” enabled.
Working with struts you have typical files like “ApplicationResources.properties” and “struts.jar”.Hello,
o.k., let us try to narrow down the error situation a bit further.
1. Within my MyEclipse package explorer I have five small projects.
All of them show an error sign at the project name (not just a warning as I had written in a comment before)
In the View “Problems” the application gives you the message “The project was not build due to “Resource already exists …”
According to those messages the file “Application Resources.properties” is the cause of the trouble.
(In an other case it was “struts.jar” which was named).
–> As four different, small projects show this error, I derive from it that it does not depend on the source code itself,
it is not an error caused by any speciality in the source code.2. If you clean up the project by pressing the menue option “Project/CleanUp-All” all project error signs vanish.
So far, so good. But after the end of the process, they pop up again and according error messages can be seen.
A rerun of the “Project/CleanUp-All” process does not change anything.3. Playing around with one of the applications I could find a workaround.
One has to move the file “ApplicatonResources.properties” from the default position within
/src/defaultlibrary/ApplicationResources.properties to /src/ApplicationResources.properties
(don’t forget to alter your config-file “struts-config.xml” accordingly if you want to be able to access your labels in your app).
With this move, MyEclipse seems to treat it differently, the build process seems to follow other rules and like magic, the error signs are gone.
–> Thats a workaround for the file “ApplicationResources”.
I do not like the idea to use this workaround for the file “struts.jar” which caused the error message in an other case.4. Further remarks: I used an Tomcat Server. But this error does not depend on the choice of your server.
It shows up whether you have a server or not. Whether you have deployed your application or not.
It seems to be an error during the build process when the files are written to their final destination.5. Finally:
I did what you asked for
Can you try this to help us narrow down the issue:
1) Shutdown MyEclipse and Tomcat
2) Delete your deployment under Tomcat
3) Start MyEclipse and deploy your application
4) Start Tomcat
5) Use your application a bit, particularly the portions that load StrutsAfter deleting the deployment under Tomcat and just to make sure, after restarting the computer:
1) Starting MyEclipse
2) Right click on the project name in the package explorer
3) Choose “Project/Cleanup” (–> Project is build again)Here we are again “The project war not build due to “Resource already … and so on /ApplicationResources.properties. Fix the problem, ..”
A look in the Tomcat-directory shows that the deployment in the webapps directory is still gone.But you are on the wrong track looking at the deployment under Tomcat.
It is not a matter of deployment to the final directory. It is a matter of generating the files within your workspace.
If you delete the file “ApplicationResources.properties” in the workspace WEB-INF/classes/yourpath/ApplicationResources.properties
then pressing “Project/cleanup” works if you run it the first time. It shows the error if you start it again.It is not just a lock which vanishes after “leaving MyEclipse and starting it again”.
It is a permanent “feature”. As long as the file ApplicationResources.properties in the workspace/classes/yourpath exists, it is not possible to build the project!Hope I could help
Manfred -
AuthorPosts