Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2364

Tapestry can use prohibited operations in some environments, such as Google App Engine

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.4
    • 5.4
    • tapestry-webresources
    • None

    Description

      beta15 breaks GAE & some other prod environments
      I have a couple of app engine apps that are broken w/ beta15
      This is due to use of java.io.File to mkdir, which is prohibited on app engine and is more generally considered a JEE no-no.

      ...
      ResourceTransformerFactoryImpl creates a File for the asset cache directory.
      This breaks my app in GAE, since creating a new File is prohibited.

      ...
      it looks like the cache is only used in development
      mode but still references File in production (thus breaking GAE). Perhaps a
      proper fix will involve a pluggable cache which does nothing in production
      mode.

      As a workaround you can override the ResourceTransformerFactory via ioc
      with an implementation that doesn't reference java.io.File. Most likely a
      copy/paste/tweak of the current version.

      ...
      Note, this could also break non GAE environments since it calls mkdirs() on
      @Symbol(WebResourcesSymbols.CACHE_DIR). For example a unix server without
      write permission.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            jonathan.williams Jonathan Williams
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: