| Quote: |
| 1. Yes, both classes for some beans and also bean definition files declared in the .springBeans file are contained in this jar file. Note however, that this same project (I did not change the .springBeans file nor the bean definition files) was used with ME 6.0.1, and the problem did not occur with that version. |
| Support-Brian wrote: | ||
Clear. I ask because the Spring tooling has changed significantly since 6.0.1, we now integrate Spring IDE 2.0.4 and I'm wondering if any of the new Spring features are causing this. I'd like to clarify your replication scenario: ProjectA: Library project with Spring + Hibernate ProjectB: MyEclipse Web project |
| Support-Brian wrote: |
|
Ant process attempts to delete files from ProjectB/web/WEB-INF/lib and fails. If the above did not fail, the Ant process would compile a JAR from ProjectA and place it in ProjectB/web/WEB-INF/lib along with a source JAR. |
| Support-Brian wrote: |
|
No attempt is made to delete any files from ProjectA. |
| Support-Brian wrote: |
|
Is this description correct? Is ProjectB just a MyEclipse Web project or does it have any additional capabilities? Thanks for helping us track this down. |
| Code: |
| <buildCommand>
<name>com.genuitec.eclipse.springframework.springbuilder</name> <arguments> </arguments> </buildCommand> |
| Code: |
| <nature>com.genuitec.eclipse.springframework.springnature</nature> |
| Support-Brian wrote: |
| Robert,
I was able to replicate a JAR locking situation if the AOP model referenced a class in the JAR file and only when the AOP builder was turned on. When this builder is on, other non referenced JARs on the classpath may be momentarily locked as well. Can you confirm that the AOP builder is off for your projects? Please go to Window > Preferences > MyEclipse > Spring > Project Builders and turn the AOP Reference Model Builder off. Additionally go, to Project properties > MyEclipse > Spring and ensure that it is using the workspace settings, or in case you customized the settings, go to the Project Builders page and make sure the builder is off. Once you restart eclipse, the locking problem should not occur, even after cleaning and building your projects several times. You can confirm that the AOP builder is off by observing the Spring AOP Event Trace view, which should remain empty. If you still experience issues, could you send us scaled down version of Project B which exhibits this issue? I would like to get this fixed before GA, which is due in around a weeks time. Thanks! |
| Quote: |
| Practically you don't even need the ProjectA, only project B, as the held lock can be observed simply with a file delete attempt. |
| Support-Brian wrote: |
| Robert,
Thanks for the sample project, I was able to reproduce the problem immediately and it was not AOP / Validation related as you pointed out earlier. I noticed you used an import element which was referencing a beans config file in the JAR. If you go to Project Properties > MyEclipse > Spring > Beans, on the Config Files tab, turn "enable support for <import/> element" on. Restart eclipse to make any lock which may already exist on the JAR is released. You should now have no problems replacing / deleting the JAR in question, even after several builds. You may also want to remove the the config set you have since enabling <import/> support should take care of your cross config bean references. |
| Support-Brian wrote: |
|
I also noticed that the <buildCommand> section in your .project file corresponding to the Spring builder was quite odd (perhaps an export problem). You should replace that with the <buildCommand> section mentioned earlier in this thread. Hope this helps, please let us know how it goes. |
| Support-Brian wrote: |
| Robert,
I should have noticed that error myself, thanks. Spring IDE does support importing using "classpath:", but not when the resource is in a JAR |
| Support-Brian wrote: |
| if you try that for a resource in your source folder, it should work fine; so one possible solution would be to modify your projectA build script to move the applicationContext.xml file into the source folder directly, but not sure if that is acceptable for your use.
|
| Support-Brian wrote: |
|
I also noticed that if you use "classpath*:applicationContext.xml" instead of "classpath:applicationContext.xml", the error marker goes away and the JAR is not locked; unfortunately, you still need to use config sets for any config files you import from JARs and the existence of the resource is not validated. Is this an acceptable workaround for now? This is a core fix that may not be possible at this time. |
| Support-Brian wrote: |
|
As for the buildCommand section, I cannot think of anything in MyEclipse which would leave your project in such a state - but I will give related code a once over, just to be sure. |
| robvarga wrote: | ||
It would possibly be acceptable, however I have to check what is the semantical difference between classpath and classpath*. If I remember well, it means that multiple occurences of the same resource file name included in differerent jars in the classpath are all loaded. That would be acceptable as my naming convention is that the bean config file name is unique in the system, so in effect classpath and classpath* is semantically the same for me. |
| robvarga wrote: | ||||
Ehh... seems I should try to upgrade Spring in this project... Spring 1.1 does not support classpath*:. :-( Best regards, Robert |