Announcement Announcement Module
No announcement yet.
STS not reading file changes Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS not reading file changes

    I apologize in advance if this is vague, but I'm hoping this is a known issue. It's driving me nuts.

    I'm running JUnit tests from SpringSource STS and usually everything goes fine. However, when I need to change a file (i.e. an application context) and re-run a test I hit problems. The problem is that SpringSource STS will not pick up my new coding change. The file has been saved. I've cleaned the app through Project->Clean. I've performed a clean/install on the app using a Maven run command. I've used a command line Maven clean/install. I've closed the app and come back in. Nothing seems to work. Spring will use the application context that doesn't exist.

    I know it is not a problem with the code because running the test from the command line using:
    mvn -Dtest=<class> test
    works perfectly fine. But when I run that same JUnit test through the IDE, Spring will tell me that I am getting an error. When I look at the stack trace, I'm getting that error because of a bean configuration that no longer exists.

    I'm the only one using SpringSource STS in my company and I want to recommend it to others for all of the features it provides out of the box. However, this bug alone is enough to make me want to switch to another IDE.

    Anyone have a similar experience?

  • #2
    I have never seen this problem before, but maybe we can find a reason why this is happening. Some questions:

    1. Do you have any third party plugins installed? specifically infinitest, which keeps the process running after tests have been completed.
    2. Any errors in the error log? Window -> Show view -> Other -> Error log
    3. This one sounds silly, but it could happen. Are you sure that the files on the disk are in the same location as the ones in your workspac?
    4. Try starting with a new workspace. That is, delete the .metadata folder of your current workspace, re-start STS and import all your projects again. (you can export and then import all your preferences if you want to keep them).


    • #3

      Are you doing everything from within STS? Or is there any other application involved that changes files?
      In that case (that includes running Maven stuff on the command line in between), you might need to press "refresh" in Eclipse/STS in order to get the latest versions of those files into your workspace.

      If that is not the case, it would be awesome if you would file an issue in our issue tracker at:

      If you would be able to include a sample project and some steps to reproduce the problem that would be even more awesome!!!