You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ali Ok (JIRA)" <de...@myfaces.apache.org> on 2010/03/16 01:08:27 UTC

[jira] Issue Comment Edited: (MYFACES-2606) javax.crypto.BadPaddingException on Google App Engine

    [ https://issues.apache.org/jira/browse/MYFACES-2606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845608#action_12845608 ] 

Ali Ok edited comment on MYFACES-2606 at 3/16/10 12:08 AM:
-----------------------------------------------------------

I found the reason:
StartupServletContextListener.contextInitialized is called after some time(ie. 5 minutes).
This results in a BadPaddingException since encoding key of viewstate is re-generated, thus viewstate cannot be decoded.

There is a check if private servletContext is set, but even states of other stuff is OK, StartupServletContextListener is recreated and so servletContext is gone.
This can be solved with specifying the org.apache.myfaces.SECRET context param, but I will find another a way to solve this problem.

There is a bug report [1] for this problem on GAE.

[1]: http://code.google.com/p/googleappengine/issues/detail?id=1828

      was (Author: aliok-com-tr):
    I found the reason:
StartupServletContextListener.contextInitialized is called after some time(ie. 5 minutes).
This results in a BadPaddingException since encoding key of viewstate is re-generated, thus viewstate cannot be encoded.

There is a check if private servletContext is set, but even states of other stuff is OK, StartupServletContextListener is recreated and so servletContext is gone.
This can be solved with specifying the org.apache.myfaces.SECRET context param, but I will find another a way to solve this problem.

There is a bug report [1] for this problem on GAE.

[1]: http://code.google.com/p/googleappengine/issues/detail?id=1828
  
> javax.crypto.BadPaddingException on Google App Engine
> -----------------------------------------------------
>
>                 Key: MYFACES-2606
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2606
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0-beta-3
>         Environment: Google App Engine
>            Reporter: Ali Ok
>
> javax.crypto.BadPaddingException is thrown after some time (a few minutes) while restoring the state on Google App Engine.
> Some discussion on https://issues.apache.org/jira/browse/MYFACES-2559.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.