We just upgraded our application to Myfaces 1.2 and periodically I get
the BadPaddingException.  The strange part is, we are using
server-side state saving.  From our web.xml:

  <context-param>
    <description>State saving method: "client" or "server" (= default)
See JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
  </context-param>

Am I missing something?  I thought encryption was only used for client
side state.

Thanks,
Geoff

On Fri, Feb 13, 2009 at 5:45 AM,  <[email protected]> wrote:
> Hi Alvaro, Hi Michael,
>
> I had the same problems here. Disabling the myfaces encryption removed the 
> badpadding exception.
>
> @ViewExpiredException: this simply means that your session is timed out. You 
> can use a servlet filter which checks if the session is ok and if not creates 
> a new one - or you can define your own myfaces error handler which redirects 
> the user to the default page when it catches a ViewExpiredException.
>
> These tricks helped me to avoid the view expired exception and the crypto bad 
> padding exception.
>
> Please consider that client side state saving with disabled encryption may be 
> a security problem. When using the server side saving look for 
> NotSerializableExceptions in your logfile.
>
> Regards
>
> Felix
>
> -----Original Message-----
> From: alvaro tovar [mailto:[email protected]]
> Sent: Thursday, February 12, 2009 10:11 PM
> To: MyFaces Discussion
> Subject: Re: BadPadding Exception and more
>
> hello
> i have this error when the session is time out, but i don't kown how i
> can solve this.
> regards
>
> 2009/2/12 Heiß Michael <[email protected]>:
>>
>> Hi,
>>
>> I have created a webapplication using myfaces 1.2.6 / tomahawk 1.1.8 and
>> richfaces 3.2.2 and tested this application successfully using a local
>> tomcat 6 webserver.
>> Now i tried to depoly the application to our windows 2003 x64 testserver who
>> also runs tomcat 6, but now i got one error message after the other.
>>
>> When i call an action or actionListener i get and BadPaddingException or
>> ViewExpiredException every time.
>> I have read the issue MYFACES-1838 but the workarounds (set secret, turn off
>> encryption, server side state saving) did not help me. Even they lead to new
>> exceptions that tells me that the stream header is currupt.
>> (StreamCorruptedException)
>>
>> Now i simply do not know where to search for errors, because the application
>> is working on my local server tomcat server without problems.
>>
>> Thanks in advance,
>> Michael
>> --
>> View this message in context: 
>> http://www.nabble.com/BadPadding-Exception-and-more-tp21984713p21984713.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>

Reply via email to