Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.9.1.RELEASE
    • Fix Version/s: 3.0.0.M1
    • Component/s: None
    • Labels:
      None

      Description

      I haven't tried to reproduce this yet. But a user tried to use spring MVC template to get started with a spring project in STS and reported it not working for him.

      See http://forum.springsource.org/showthread.php?125586-STS-build-paths-and-java-class-libraries&p=409929#post409929

      Error he got:

      java.lang.ClassNotFoundException: org.apache.catalina.filters.SetCharacterEncodingFi lter
      at org.aspectj.weaver.bcel.ExtensibleURLClassLoader.f indClass(ExtensibleURLClassLoader.java:54)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:2 48)
      at org.apache.catalina.core.DefaultInstanceManager.lo adClass(DefaultInstanceManager.java:405)
      at org.apache.catalina.core.DefaultInstanceManager.lo adClassMaybePrivileged(DefaultInstanceManager.java :397)
      at org.apache.catalina.core.DefaultInstanceManager.ne wInstance(DefaultInstanceManager.java:118)
      at org.apache.catalina.core.ApplicationFilterConfig.g etFilter(ApplicationFilterConfig.java:252)
      at org.apache.catalina.core.ApplicationFilterConfig.s etFilterDef(ApplicationFilterConfig.java:372)
      at org.apache.catalina.core.ApplicationFilterConfig.< init>(ApplicationFilterConfig.java:98)
      at org.apache.catalina.core.StandardContext.filterSta rt(StandardContext.java:4562)
      at org.apache.catalina.core.StandardContext$2.call(St andardContext.java:5240)
      at org.apache.catalina.core.StandardContext$2.call(St andardContext.java:5235)
      at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)

        Activity

        Hide
        kdvolder Kris De Volder added a comment -

        I quikcly tried the MVC sample in 3.0.0.M1. This was in a brand new installation, with brand new workspace.
        The sample seemed to work ok for me with the automatically configured tc Server v2.6.

        Show
        kdvolder Kris De Volder added a comment - I quikcly tried the MVC sample in 3.0.0.M1. This was in a brand new installation, with brand new workspace. The sample seemed to work ok for me with the automatically configured tc Server v2.6.
        Hide
        kdvolder Kris De Volder added a comment -

        Clarification, what worked for me is "run as >> Run on Server" via clicking on the root of the project.
        This opened up the URL: http://localhost:8080/myMVC/

        I also found a 'view' file "home.jsp" and tried "Run as >> Run On Server".

        While I did not get the errors the user mentions. This seemed to not work and it opened:
        http://localhost:8080/myMVC/WEB-INF/views/home.jsp

        Which results in a 404 error.

        The template app seems to work ok, but the "Run on Server" functionality isn't mapping resources like 'home.jsp' onto a URL that can actually access the view.

        Show
        kdvolder Kris De Volder added a comment - Clarification, what worked for me is "run as >> Run on Server" via clicking on the root of the project. This opened up the URL: http://localhost:8080/myMVC/ I also found a 'view' file "home.jsp" and tried "Run as >> Run On Server". While I did not get the errors the user mentions. This seemed to not work and it opened: http://localhost:8080/myMVC/WEB-INF/views/home.jsp Which results in a 404 error. The template app seems to work ok, but the "Run on Server" functionality isn't mapping resources like 'home.jsp' onto a URL that can actually access the view.
        Hide
        kaitlinsherwood Kaitlin Duck Sherwood added a comment -

        I have seen a problem with the template occasionally/rarely. Doing a clean and rebuild fixes it for me.

        I believe that the problem is a race condition outside of the scope of STS. See STS-2502.

        Show
        kaitlinsherwood Kaitlin Duck Sherwood added a comment - I have seen a problem with the template occasionally/rarely. Doing a clean and rebuild fixes it for me. I believe that the problem is a race condition outside of the scope of STS. See STS-2502 .
        Hide
        kaitlinsherwood Kaitlin Duck Sherwood added a comment -

        This is a duplicate of STS-2502.

        Show
        kaitlinsherwood Kaitlin Duck Sherwood added a comment - This is a duplicate of STS-2502 .
        Hide
        kdvolder Kris De Volder added a comment -

        I think it could be useful to investiage different usage scenarios. There are multiple ways to deploy an app.
        E.g. 'drag and drop' as in STS-2502. Also via 'Run As >> Run On Server'. While similar, the fact that Drag and Drop works doesn't necessarily guarantee that different ways of calling "Run As >> Run On Server" works as well.

        I.e. what I noticed is that "run on server" when clicking on the root of the sample project works as exepected, but trying to do the same for a specific 'view' file (in the sample in question that was 'home.jsp' the Run as command will deploy the app correctly, but it will not map the run as request to a correct URL on the server that actually is able to access that particular view.

        That doesn't correspond, I think, to the problem the user was experiencing, but it is a problem that I have found.

        I'm ok with labeling this bug a duplicate of STS-2502, but I would suggest to include 'Run As >> Run On Server' for the 'home.jsp' file for MVC template as an alternate scenario that we expect should bring up a webpage rather than a 404 error.

        Show
        kdvolder Kris De Volder added a comment - I think it could be useful to investiage different usage scenarios. There are multiple ways to deploy an app. E.g. 'drag and drop' as in STS-2502 . Also via 'Run As >> Run On Server'. While similar, the fact that Drag and Drop works doesn't necessarily guarantee that different ways of calling "Run As >> Run On Server" works as well. I.e. what I noticed is that "run on server" when clicking on the root of the sample project works as exepected, but trying to do the same for a specific 'view' file (in the sample in question that was 'home.jsp' the Run as command will deploy the app correctly, but it will not map the run as request to a correct URL on the server that actually is able to access that particular view. That doesn't correspond, I think, to the problem the user was experiencing, but it is a problem that I have found. I'm ok with labeling this bug a duplicate of STS-2502 , but I would suggest to include 'Run As >> Run On Server' for the 'home.jsp' file for MVC template as an alternate scenario that we expect should bring up a webpage rather than a 404 error.
        Hide
        kdvolder Kris De Volder added a comment -

        Actually, perhaps it would be most logical to raise a new issue for "'Run on Server' on home.jsp in spring-mvc template project doesn't work".

        Its really an unrelated problem to the nasty race conditions issues. It is a bug in the actual functionality.

        But I'll let you decide how to handle it.

        Kris

        Show
        kdvolder Kris De Volder added a comment - Actually, perhaps it would be most logical to raise a new issue for "'Run on Server' on home.jsp in spring-mvc template project doesn't work". Its really an unrelated problem to the nasty race conditions issues. It is a bug in the actual functionality. But I'll let you decide how to handle it. Kris
        Hide
        kaitlinsherwood Kaitlin Duck Sherwood added a comment -

        I made another bug for the "run on server" issue – Issue STS-2849.

        Show
        kaitlinsherwood Kaitlin Duck Sherwood added a comment - I made another bug for the "run on server" issue – Issue STS-2849 .

          People

          • Assignee:
            kaitlinsherwood Kaitlin Duck Sherwood
            Reporter:
            kdvolder Kris De Volder
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: