Results 1 to 4 of 4

Thread: STS - Locking Jars

  1. #1
    Join Date
    Jan 2012
    Posts
    12

    Default STS - Locking Jars

    Hello Techsters -

    I downloaded the latest STS (VERSION - 2.9.2.RELEASE) for windows 7 (64 bit).
    I have created a few spring projects. I am using ant to compile.

    1. I select the build.xml with appropriate entries to do the build and right-click -- Run As - Ant Build.
    2. Everything works fine, the build completes successfully and an appropriate war file is created as desired.
    3. However when I select the same build file again and do the build and right-click -- Run As - Ant Build, it is not able to execute the clean tasks. It keeps saying - "Unable to delete file (filename)".

    Apparently, if I go to the explorer and try to delete the file manually, it says "unable to delete the file as it is being used by Java (TM) platform SE binary".

    I tried to look around and I found specifying the -Dgreclipse.nonlocking=true in the STS.ini file, specifying that did not work. I am not sure if I am to follow the above solution or if there is something else that I am missing.

    Any guidance would be really helpful and appreciated.

    Regards.

  2. #2
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,640

    Default

    Hey!

    You can enable the use of non-locking classloaders in the preferences on the main Spring preference page.

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  3. #3
    Join Date
    Jan 2012
    Posts
    12

    Default

    Hello Martin -

    Thank you for showing the direction. Here are my observations and set up:

    1. A java project that has a master build.xml file. (Project JavaMaster)
    2. A java project containing utility classes (Project - JavaUtil). This has no spring dependency. It has dependencies on other libraries that I need for my project.
    3. A spring project containing spring dependencies on libraries like spring-core,spring-aop etc.

    Without the flag set (spring preferences: Use Non-Locking class loaders), when I run the build.xml, I get locking issues on 2.
    With the flag set, when I run build.xml, I get locking issue on 3. 2 compiles perfectly.

    Am I missing anything else fundamentally ? Please do let me know.

  4. #4
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,640

    Default

    Hey!

    Can you send me an example that reproduces this problem? This sounds like something is not working as expected, especially in the case where you have the non-locking classloaders enabled. And I am wondering why you get the locking problems on 2. in case of the disabled non-locking classloaders. Do you have an example set of projects for me?

    Cheers,
    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •