Results 1 to 8 of 8

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

  1. #1
    Join Date
    Jul 2010
    Location
    Austria
    Posts
    13

    Default 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>
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2010
    Posts
    12

    Default

    I had the same problem.

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

  3. #3
    Join Date
    Jul 2010
    Location
    Austria
    Posts
    13

    Default

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

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  5. #5
    Join Date
    Jul 2010
    Location
    Austria
    Posts
    13

    Default

    Thank you for the clarification!

  6. #6
    Join Date
    Jul 2010
    Location
    Austria
    Posts
    13

    Default

    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!
    Attached Images Attached Images
    Attached Files Attached Files

  7. #7
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    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
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  8. #8
    Join Date
    Jul 2010
    Location
    Austria
    Posts
    13

    Default

    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 at 09:09 AM.

Tags for this Thread

Posting Permissions

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