Tapestry 5
  1. Tapestry 5
  2. TAP5-1336

Changed classes do not reload under Tomcat

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.2
    • Fix Version/s: 5.3
    • Component/s: tapestry-ioc
    • Labels:
      None

      Description

      I am using eclipse, with maven plugin m2eclipse.

      When I launch tomcat with tomcat-maven-plugin (V 1.1), pages don't reload when I modify them. I have to restart my web server to see the changes.

      What I noticed when I modify a page :

      • Tapestry is notified of a modification of the class file
      • It flushes the old page instance and tries to reload the class file
      • It in fact reloads the old version of the file -> it seems that Tomcat classloader gives the old class file inputStream in getResourceAsStream methods

      I made a modification in ClassFactoryClassPool to get a clean new InputStream from the classFile, that fixed my issue, now pages are well reloaded when I modify them under Tomcat.

        Activity

        Hide
        Denis Delangle added a comment -

        Patch that creates a FileInputStream for resources that are in Tomcat classes folder.

        Show
        Denis Delangle added a comment - Patch that creates a FileInputStream for resources that are in Tomcat classes folder.
        Hide
        Howard M. Lewis Ship added a comment -

        That patch is no longer valid due to the switch over to Plastic. Could you see if this problem still manifests under Tomcat?

        Show
        Howard M. Lewis Ship added a comment - That patch is no longer valid due to the switch over to Plastic. Could you see if this problem still manifests under Tomcat?
        Hide
        Howard M. Lewis Ship added a comment -

        I've taken the essence of the patch and am applying it.

        Show
        Howard M. Lewis Ship added a comment - I've taken the essence of the patch and am applying it.
        Hide
        Howard M. Lewis Ship added a comment -

        I'm fudging here ... I don't have a test environment set up on Tomcat, so please reopen if this doesn't address the issue correctly.

        Show
        Howard M. Lewis Ship added a comment - I'm fudging here ... I don't have a test environment set up on Tomcat, so please reopen if this doesn't address the issue correctly.
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #535 (See https://builds.apache.org/job/tapestry-trunk-freestyle/535/)
        TAP5-1336: Changed classes do not reload under Tomcat

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1174873
        Files :

        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticInternalUtils.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #535 (See https://builds.apache.org/job/tapestry-trunk-freestyle/535/ ) TAP5-1336 : Changed classes do not reload under Tomcat hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1174873 Files : /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticInternalUtils.java
        Hide
        Denis Delangle added a comment -

        Sorry, I don't have time to migrate to 5.3 currently. I will test the correction as soon as I do it

        Show
        Denis Delangle added a comment - Sorry, I don't have time to migrate to 5.3 currently. I will test the correction as soon as I do it

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Denis Delangle
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development