Announcement Announcement Module
Collapse
No announcement yet.
STS 2.5.0.M3: Can't run expenses (Unable to locate Spring NamespaceHandler) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS 2.5.0.M3: Can't run expenses (Unable to locate Spring NamespaceHandler)

    Hi!

    I've created a new Roo project, executed the expenses.roo script, enabled GWT and when I try to run the application as a webapp it fails with the error below.

    I've searched the forums, but nothing I found solved the problem:
    • I switched the dataprovider
    • I did a "perform eclipse"
    • I checked my pom.xml
    Any clues?
    The complete log is attached!

    Here's the error:
    Code:
    2010-09-09 01:41:23,712 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx]
    Offending resource: file [D:\springsource\workspace-sts\expenses_test\src\main\resources\META-INF\spring\applicationContext.xml]
    Dependency in my pom.xml:
    Code:
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.version}</version>
            </dependency>

  • #2
    I had the same problem.

    but I just disabled maven and then enable it back from eclipse..
    and that fixed it.

    Comment


    • #3
      Thanks for the good pointer! I didn't have to disable / enable maven as it was sufficient to do a "Maven -> Update Project Configuration".

      Comment


      • #4
        Using the Maven > Update Project Configuration menu option is a common requirement when using Roo 1.1.0.M3-generated projects with STS 2.5.0.M3. It has been fixed since STS 2.5.0.M3 was released, so won't be necessary once 2.5.0.M4 is released. Thanks for your patience in the meantime with this step. Fortunately it's only needed when the pom.xml is changed.

        Comment


        • #5
          Thank you for the clarification!

          Comment


          • #6
            Hi Ben!

            Thought I'd let you know that the problem existed in RC1 and still exists in the release version. Maybe I'm doing something wrong.

            Another weird behaviour: While updating the project configuration a lot of errors pop up for a moment, then disappear. After I start the application, in development mode, I get 500+ java errors in the aspects and 50 completely empty Validation Message errors. The app runs smoothly though.

            I've attached screenshots and a file with all the java errors.

            Congratulations on the RELEASE version none the less! Really good stuff!

            Comment


            • #7
              This looks like the JDT weaving for Roo ITDs is not enabled. Check Preferences > JDT Weaving > Enable (you will need to restart STS, also run 'reindex now').

              If you still see the namespace problem you can use Preferences > Spring > Beans Support > Namespaces > Load NamespaceHandlers and XSDs from projects classpath.

              Also, note that STS 2.5 GA is now out. This ships with Roo 1.1 GA. We recommend you using this release.

              HTH,
              Stefan

              Comment


              • #8
                Hi Stefan!

                JDT weaving is enabled and I'm already using the GA version of STS, with a fresh workspace.

                If I clean the project the weaving errors are gone, but the empty validation errors reappear (If I delete them, the app runs without a problem). A restart of STS didn't help. Any idea how I could pinpoint their origin?

                Edit: Something strange happend after I restarted STS and reopend the roo shell:
                Code:
                    ____  ____  ____  
                   / __ \/ __ \/ __ \ 
                  / /_/ / / / / / / / 
                 / _, _/ /_/ / /_/ /  
                /_/ |_|\____/\____/    1.1.0.RELEASE [rev 793f2b0]
                
                
                Welcome to Spring Roo. For assistance press CTRL+SPACE or type "hint" then hit ENTER.
                roo> Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Employee_Roo_Entity.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Report_Roo_ToString.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Report_Roo_Entity.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Employee_Roo_JavaBean.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Employee_Roo_Configurable.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Expense_Roo_ToString.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Report_Roo_JavaBean.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Employee_Roo_ToString.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Expense_Roo_Entity.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Expense_Roo_JavaBean.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Report_Roo_Configurable.aj
                Deleted SRC_MAIN_WEBAPP\WEB-INF\classes\at\mvision\expenses\server\domain\Expense_Roo_Configurable.aj
                Last edited by ChristianM; Oct 31st, 2010, 10:09 AM.

                Comment

                Working...
                X