Announcement Announcement Module
Collapse
No announcement yet.
found error/workaround on test Failed to load ApplicationContext error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • found error/workaround on test Failed to load ApplicationContext error

    I get a Failed to load ApplicationContext when I run a test from within the SpringSource IDE.

    If I run the test from command prompt I do not get any errors. mvn test

    Then when I run the junit test again through the IDE it runs.

    So running mvn test from a command prompt loads the application context which is then in the path for subsequent testing anyone else seen this error.

  • #2
    This is the first time I hear of such an issue. Can you replicate this consistently with a given script or project?

    It would be good to have details so we can follow up on this. Maybe, you just need to do a project refresh or clean so all dependencies are recognized? Did you do a 'perform eclipse' from Roo shell or 'mvn eclipse:eclipse' from command line?

    Comment


    • #3
      Yes the problem is recreatable, but I think it may be linked to another bug I raised about roo hanging when I try to create a entity. As soon as I deleted those entitys the junits run, but I will need to test further around this.

      Will keep you posted on if was a project set up problem or an obsure IDE problem

      Comment


      • #4
        Solution?

        Did you ever figure this out? I still have it but did not use ROO. My issues, I think, is due to JavaConfig/SPring 3.0 as my project worked before I migrated to them
        Would love to hear some solutions

        Comment


        • #5
          Hi sorry never did figure what the problem was, but I am in the habit of doing a clean maven build every morning before I start anything else.

          So have not come across the problem again.

          Tomorrow will run a test before I do the build see what happens, see if I still have the problem.

          Also with spring I find the real problem is halfway down the stack trace.

          Comment


          • #6
            Sounds like Eclipse didn't compile the project, thus the target/classes would have been empty and that's the location where the app context XML would have been retrieved by Spring at startup time. Running the tests externally (ie via mvn command line) would have compiled and added those classes and XML file to target/classes. It's just a guess, but seems plausible. Try a Project > Clean next time and ensure Project > Build Automatically is on.

            Comment


            • #7
              Thanks will test for that on the next ro project.

              Comment

              Working...
              X