Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-beta
    • Fix Version/s: 2.0.0-beta-3
    • Component/s: JSR-314
    • Labels:
      None
    • Environment:
      Google App Engine

      Description

      Google App Engine Support for Myfaces 2

      1. 2559.patch
        17 kB
        Ali Ok
      2. 2559-doc.patch
        3 kB
        Ali Ok

        Issue Links

          Activity

          Hide
          aliok-com-tr Ali Ok added a comment -

          Description of is available at "googleappenginesupport.apt" file in the patch.

          You can see a sample complete Eclipse project structure here:
          http://upload.aliok.com.tr/uploads/test-gae-myfaces2.zip

          You can see this application running at:
          http://myfaces2-2.latest.aliok-com-tr-test.appspot.com/

          Show
          aliok-com-tr Ali Ok added a comment - Description of is available at "googleappenginesupport.apt" file in the patch. You can see a sample complete Eclipse project structure here: http://upload.aliok.com.tr/uploads/test-gae-myfaces2.zip You can see this application running at: http://myfaces2-2.latest.aliok-com-tr-test.appspot.com/
          Hide
          aliok-com-tr Ali Ok added a comment -

          I created a new ticket for Myfaces2 since there are some differences between Myfaces2 and Myfaces 1.2.
          You can see the ticket for Google App Engine Support Myfaces 1.2 on:
          https://issues.apache.org/jira/browse/MYFACES-2504

          Show
          aliok-com-tr Ali Ok added a comment - I created a new ticket for Myfaces2 since there are some differences between Myfaces2 and Myfaces 1.2. You can see the ticket for Google App Engine Support Myfaces 1.2 on: https://issues.apache.org/jira/browse/MYFACES-2504
          Hide
          aliok-com-tr Ali Ok added a comment -

          Sorry, deleted the wrong path, uploaded the correct one.

          Show
          aliok-com-tr Ali Ok added a comment - Sorry, deleted the wrong path, uploaded the correct one.
          Hide
          matzew Matthias Weßendorf added a comment -

          Thanks for the patch!

          I slightly modified the facelet documentation part, as no viewhandler needed in vanilla jsf2

          Show
          matzew Matthias Weßendorf added a comment - Thanks for the patch! I slightly modified the facelet documentation part, as no viewhandler needed in vanilla jsf2
          Hide
          jakobkorherr Jakob Korherr added a comment -

          Great work, guys

          Show
          jakobkorherr Jakob Korherr added a comment - Great work, guys
          Hide
          tolot27 Mathias Walter added a comment -

          Guessing the correct number results in a javax.crypto.BadPaddingException: "Given final block not properly padded".

          I'm not sure if it's an application error or related to MyFACES.

          Anyway, a test application should work.

          Show
          tolot27 Mathias Walter added a comment - Guessing the correct number results in a javax.crypto.BadPaddingException: "Given final block not properly padded". I'm not sure if it's an application error or related to MyFACES. Anyway, a test application should work.
          Hide
          jakobkorherr Jakob Korherr added a comment -

          Got it too, it occurs when guessing the number right and hitting the back button:

          javax.faces.FacesException: javax.crypto.BadPaddingException: Given final block not properly padded
          at org.apache.myfaces.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
          at org.apache.myfaces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
          at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:157)
          at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:88)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
          at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
          at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
          at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
          at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
          at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
          at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
          at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
          at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
          at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
          at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
          at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
          at org.mortbay.jetty.Server.handle(Server.java:313)
          at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
          at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
          at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
          at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
          at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
          at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
          at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5485)
          at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5483)
          at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
          at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363)
          at com.google.net.rpc.impl.Server$2.run(Server.java:837)
          at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
          at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:536)
          at com.google.net.rpc.impl.Server.startRpc(Server.java:792)
          at com.google.net.rpc.impl.Server.processRequest(Server.java:367)
          at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:448)
          at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319)
          at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290)
          at com.google.net.async.Connection.handleReadEvent(Connection.java:474)
          at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:774)
          at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:205)
          at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
          at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251)
          at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:394)
          at java.lang.Thread.run(Unknown Source)
          Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
          at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
          at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
          at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA13*..)
          at javax.crypto.Cipher.doFinal(DashoA13*..)
          at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:471)
          at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:513)
          at org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:313)
          at org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:262)
          at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(HtmlResponseStateManager.java:213)
          at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getState(HtmlResponseStateManager.java:160)
          at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:406)
          at org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
          at org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:240)
          at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:318)
          at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:109)
          at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:138)
          ... 43 more

          Show
          jakobkorherr Jakob Korherr added a comment - Got it too, it occurs when guessing the number right and hitting the back button: javax.faces.FacesException: javax.crypto.BadPaddingException: Given final block not properly padded at org.apache.myfaces.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) at org.apache.myfaces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:157) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:88) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5485) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5483) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363) at com.google.net.rpc.impl.Server$2.run(Server.java:837) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:536) at com.google.net.rpc.impl.Server.startRpc(Server.java:792) at com.google.net.rpc.impl.Server.processRequest(Server.java:367) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:448) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java:474) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:774) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:394) at java.lang.Thread.run(Unknown Source) Caused by: javax.crypto.BadPaddingException: Given final block not properly padded at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA13*..) at javax.crypto.Cipher.doFinal(DashoA13*..) at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:471) at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:513) at org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:313) at org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:262) at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(HtmlResponseStateManager.java:213) at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getState(HtmlResponseStateManager.java:160) at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:406) at org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106) at org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:240) at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:318) at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:109) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:138) ... 43 more
          Hide
          aliok-com-tr Ali Ok added a comment -

          Updated the document.
          Removed "downloading facelets.jar" instruction.

          Show
          aliok-com-tr Ali Ok added a comment - Updated the document. Removed "downloading facelets.jar" instruction.
          Hide
          aliok-com-tr Ali Ok added a comment -

          About javax.crypto.BadPaddingException: "Given final block not properly padded":
          I thought this was about session handling or something and ignored it since it seemed not about Myfaces or GAE. I thought this problem was occured because of this number-guess application. But I am not sure...

          I didn't get the error using the pattern you said. Finding the correct number didn't resulted in this error. I couldnt find a pattern. It seems random.

          I see a JIRA issue is fired for this error before.
          I will work on this problem.

          Show
          aliok-com-tr Ali Ok added a comment - About javax.crypto.BadPaddingException: "Given final block not properly padded": I thought this was about session handling or something and ignored it since it seemed not about Myfaces or GAE. I thought this problem was occured because of this number-guess application. But I am not sure... I didn't get the error using the pattern you said. Finding the correct number didn't resulted in this error. I couldnt find a pattern. It seems random. I see a JIRA issue is fired for this error before. I will work on this problem.
          Hide
          jakobkorherr Jakob Korherr added a comment -

          I think the problem is because of MyFaces' state saving algorithm. I saw that you're using client state saving in the example and I guess the Exception occurs when the request is populated to another machine on Google's infrastructure. It seems like another machine is not able to decode the view state generated by an other machine, which of course should not be the case.

          Take a look at the state saving algorithm, Ali. Especially at the encoding and decoding stuff for client state saving. I'm sure you'll find something there!

          Show
          jakobkorherr Jakob Korherr added a comment - I think the problem is because of MyFaces' state saving algorithm. I saw that you're using client state saving in the example and I guess the Exception occurs when the request is populated to another machine on Google's infrastructure. It seems like another machine is not able to decode the view state generated by an other machine, which of course should not be the case. Take a look at the state saving algorithm, Ali. Especially at the encoding and decoding stuff for client state saving. I'm sure you'll find something there!
          Hide
          aliok-com-tr Ali Ok added a comment -

          I fired another ticket for this problem:
          https://issues.apache.org/jira/browse/MYFACES-2606

          Show
          aliok-com-tr Ali Ok added a comment - I fired another ticket for this problem: https://issues.apache.org/jira/browse/MYFACES-2606

            People

            • Assignee:
              matzew Matthias Weßendorf
              Reporter:
              aliok-com-tr Ali Ok
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development