Tapestry 5
  1. Tapestry 5
  2. TAP5-1995

Tapestry5 Application can not be deployed as Tomcat7 HotDeploy Package

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.3
    • Fix Version/s: 5.3.7, 5.4
    • Component/s: plastic
    • Labels:
      None

      Description

      1. WAR file is named like

      yourapp##1.2.3.war
      

      2. Results in path

      webapps/yourapp##1.2.3
      

      3. Tapestry throws error:

      Caused by: java.lang.RuntimeException: Failure reading bytecode for class com.biso.casingdb.web.services.AppModule: /home/apache-tomcat-7.0.26/webapps/yourapp%23%231.2.3/WEB-INF/classes/AppModule.class (No such file or directory)
              at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.readBytecodeForClass(PlasticInternalUtils.java:384)
              at org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.readClassNode(PlasticProxyFactoryImpl.java:107)
              at org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.getMemberLocation(PlasticProxyFactoryImpl.java:141)
              at org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.getMethodLocation(PlasticProxyFactoryImpl.java:114)
              at org.apache.tapestry5.ioc.internal.util.InternalUtils.asString(InternalUtils.java:85)
              at org.apache.tapestry5.ioc.internal.ContributionDefImpl.toString(ContributionDefImpl.java:59)
              at java.lang.String.valueOf(String.java:2902)
              at java.lang.StringBuilder.append(StringBuilder.java:128)
              at org.apache.tapestry5.ioc.internal.RegistryImpl.addToMappedConfiguration(RegistryImpl.java:557)
              at org.apache.tapestry5.ioc.internal.RegistryImpl.getMappedConfiguration(RegistryImpl.java:515)
              at org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$3.invoke(ServiceResourcesImpl.java:126)
              at org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$3.invoke(ServiceResourcesImpl.java:123)
              at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
              ... 224 more
      Caused by: java.io.FileNotFoundException: /home/apache-tomcat-7.0.26/webapps/yourapp%23%231.2.3/WEB-INF/classes/AppModule.class (No such file or directory)
              at java.io.FileInputStream.open(Native Method)
              at java.io.FileInputStream.<init>(FileInputStream.java:138)
              at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.getStreamForPath(PlasticInternalUtils.java:408)
              at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.readBytecodeForClass(PlasticInternalUtils.java:370)
              ... 236 more
      
      1. TAP5-1995.patch
        0.9 kB
        Chris Poulsen

        Issue Links

          Activity

          Hide
          Christian Köberl added a comment -

          I guess the problem is the "#" in the name of the WAR File - can you try renaming your file to "yourapp-2.3.war"

          Show
          Christian Köberl added a comment - I guess the problem is the "#" in the name of the WAR File - can you try renaming your file to "yourapp-2.3.war"
          Hide
          Thomas Hackel added a comment -

          For the very useful HOT DEPLOY function of Tomcat 7, you have to use the double hash (##) to separate the version string from the application name.

          See
          http://agoodcoder.blogspot.de/2011/03/tomcat-7-hot-deploy-rolling-upgrade.html
          and
          http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deployment

          Its a BUG of Plastic that it can not create a valid path for loading resources.

          Show
          Thomas Hackel added a comment - For the very useful HOT DEPLOY function of Tomcat 7, you have to use the double hash (##) to separate the version string from the application name. See http://agoodcoder.blogspot.de/2011/03/tomcat-7-hot-deploy-rolling-upgrade.html and http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deployment Its a BUG of Plastic that it can not create a valid path for loading resources.
          Hide
          Christian Köberl added a comment -

          Cool - I didn't know that feature - thanks for pointing out

          Show
          Christian Köberl added a comment - Cool - I didn't know that feature - thanks for pointing out
          Hide
          Thomas Hackel added a comment -

          Please Fix it so it can be used with a Tapestry5 application, at last vote for it...

          Maybe we can use this function with Tapestry 6 after a complete rewrite of everything ;-/

          Show
          Thomas Hackel added a comment - Please Fix it so it can be used with a Tapestry5 application, at last vote for it... Maybe we can use this function with Tapestry 6 after a complete rewrite of everything ;-/
          Hide
          Kalle Korhonen added a comment -

          There was a mention of the same issue on the user list. We are using Tomcat7's parallel deployment without issues with T5.3.4 (even wrote a guide for Maven users at http://tynamo.org/Zero+downtime+deployment+to+Tomcat+7+with+Maven), deploying to CentOS. Despite of our success, it's likely at least partially an issue with T5. What's your deployment platform?

          Show
          Kalle Korhonen added a comment - There was a mention of the same issue on the user list. We are using Tomcat7's parallel deployment without issues with T5.3.4 (even wrote a guide for Maven users at http://tynamo.org/Zero+downtime+deployment+to+Tomcat+7+with+Maven ), deploying to CentOS. Despite of our success, it's likely at least partially an issue with T5. What's your deployment platform?
          Hide
          Chris Poulsen added a comment -

          Hi, I just stumbled across this one. It seems to be trivial to fix - feel free to use my patch.

          Show
          Chris Poulsen added a comment - Hi, I just stumbled across this one. It seems to be trivial to fix - feel free to use my patch.
          Hide
          Kalle Korhonen added a comment -

          Applied, added test

          Show
          Kalle Korhonen added a comment - Applied, added test

            People

            • Assignee:
              Kalle Korhonen
              Reporter:
              Thomas Hackel
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development