Tapestry 5
  1. Tapestry 5
  2. TAP5-2067

Error loading classes with Tomcat 7 parallel deployment

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.6
    • Fix Version/s: 5.3.7
    • Component/s: None
    • Labels:
      None

      Description

      When trying to deploy tapestry app using tomcat 7 parallel deployment (which demands to name app dir like myapp##version) there is an FileNotFoundException when loading AppModule file. The reason is, that path to app dir gets urlencoded whith those ## looking like %23%23.
      In PlasticInternalUtils there is already code dealing with urlencoded spaces

      private static InputStream getStreamForPath(....

      if (url.getProtocol().equals("file"))

      { String urlPath = url.getPath(); String decoded = urlPath.replaceAll("%20", " "); return new FileInputStream(new File(decoded)); }

      could it be extended (or better generalised) to handle all urlencoded problems? I think it is really easy to fix and is very annoying not being able to use parallel deployment. I could even provide a patch if you think this issue is worth fixing.

        Issue Links

          Activity

          Hide
          Kalle Korhonen added a comment -

          The reason I haven't attempted fixing it is that I don't see the issue in my Tomcat 7 parallel deployment environment. I'm running Tapestry 5.3.6 with Tomcat 7.0.27 on CentOS release 5.8 (Final) x86_64. I'd be interested in knowing why it works on some environment and doesn't in others. What are the details of your environment?

          Show
          Kalle Korhonen added a comment - The reason I haven't attempted fixing it is that I don't see the issue in my Tomcat 7 parallel deployment environment. I'm running Tapestry 5.3.6 with Tomcat 7.0.27 on CentOS release 5.8 (Final) x86_64. I'd be interested in knowing why it works on some environment and doesn't in others. What are the details of your environment?
          Hide
          Pavel added a comment - - edited

          I have Debian 5.0 (Kernel 2.6.26-2-686-bigmem, i386) with Tomcat 7.0.33. JVM 1.6.0_26-b03, Tapestry 5.3.6, application is deployed to root context as ROOT##version folder

          Show
          Pavel added a comment - - edited I have Debian 5.0 (Kernel 2.6.26-2-686-bigmem, i386) with Tomcat 7.0.33. JVM 1.6.0_26-b03, Tapestry 5.3.6, application is deployed to root context as ROOT##version folder
          Hide
          Pavel added a comment -

          So, is anybody in the mood to add just another urlPath.replaceAll("%23", "#") so that we can finally use parallel deployment?

          Show
          Pavel added a comment - So, is anybody in the mood to add just another urlPath.replaceAll("%23", "#") so that we can finally use parallel deployment?
          Hide
          Kalle Korhonen added a comment - - edited

          Finally stumbled upon the the cause of different behaviors we are seeing. Anybody requiring parallel development can just use Maven war plugin's archiveClasses feature or similar (see http://maven.apache.org/plugins/maven-war-plugin/faq.html) as a workaround. If you don't archive classes in a jar, you'll see this failure in a parallel deployment environment. The issue is already addressed by TAP5-1995, to be included in T5.3.7.

          Show
          Kalle Korhonen added a comment - - edited Finally stumbled upon the the cause of different behaviors we are seeing. Anybody requiring parallel development can just use Maven war plugin's archiveClasses feature or similar (see http://maven.apache.org/plugins/maven-war-plugin/faq.html ) as a workaround. If you don't archive classes in a jar, you'll see this failure in a parallel deployment environment. The issue is already addressed by TAP5-1995 , to be included in T5.3.7.
          Hide
          Jeffrey Davison added a comment -

          Any estimate as to when T5.3.7 will be released? I'm anxiously awaiting this fix!

          Show
          Jeffrey Davison added a comment - Any estimate as to when T5.3.7 will be released? I'm anxiously awaiting this fix!

            People

            • Assignee:
              Kalle Korhonen
              Reporter:
              Pavel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development