Announcement Announcement Module
Collapse
No announcement yet.
STS - Locking Jars Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Hey!

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

    HTH,
    Martin

    Comment


    • #3
      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.

      Comment


      • #4
        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

        Comment

        Working...
        X