Spring Roo
  1. Spring Roo
  2. ROO-3241

multiple spring context files being loaded because value of contextConfigLocation after running web mvc setup

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.2.2.RELEASE
    • Fix Version/s: None
    • Component/s: WEB MVC
    • Environment:
      1.3.0.BUILD-SNAPSHOT [rev 9433f85]

      Windows 7, STS 2.9.2.RELEASE, Websphere 7.0.0.19

      Description

      https://jira.springsource.org/browse/SEC-2034

      When the "web mvc setup" command is run, the web.xml is setup with the following path to the spring context files...

      <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath*:META-INF/spring/applicationContext*.xml</param-value>
      </context-param>

      The first asterisk is the culprit for the spring config files (-spring.xml specifically) being picked up multiple times when running on Websphere 7.0.0.19 (The app deploys fine on Tomcat however). After I remove that asterisk, then the application loads fine

      <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:META-INF/spring/applicationContext*.xml</param-value>
      </context-param>

      Is there a reason for the first asterisk? If not, please remove. Thanks!

        Activity

        Hide
        Isaac Johnson added a comment -

        After reading more about the classpath*, this should be fine. The problem is two security config files are being pushed upon deployment, and the classpath* is causing both to be loaded. Need to determine why this is happening though...

        \WEB-INF\classes\META-INF\spring\applicationContext-security.xml
        \META-INF\spring\applicationContext-security.xml

        Show
        Isaac Johnson added a comment - After reading more about the classpath*, this should be fine. The problem is two security config files are being pushed upon deployment, and the classpath* is causing both to be loaded. Need to determine why this is happening though... \WEB-INF\classes\META-INF\spring\applicationContext-security.xml \META-INF\spring\applicationContext-security.xml
        Hide
        Isaac Johnson added a comment -

        I have confirmed the vote sample script does not produce a \META-INF\spring\ folder. Our project was initially started back with Spring Roo 1.1 i believe, and has been upgraded since, so it is likely that over time some config changed on our end.

        You can close this ticket.

        Show
        Isaac Johnson added a comment - I have confirmed the vote sample script does not produce a \META-INF\spring\ folder. Our project was initially started back with Spring Roo 1.1 i believe, and has been upgraded since, so it is likely that over time some config changed on our end. You can close this ticket.
        Hide
        Andrew Swan added a comment -

        Closing as requested.

        Show
        Andrew Swan added a comment - Closing as requested.

          People

          • Assignee:
            Unassigned
            Reporter:
            Isaac Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.25h
              0.25h
              Remaining:
              Remaining Estimate - 0.25h
              0.25h
              Logged:
              Time Spent - Not Specified
              Not Specified