Hi Felix,

If I set that property, the users periodically get the following:

java.io.StreamCorruptedException: invalid stream header: BBA53E25
        at 
java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:794)
        at java.io.ObjectInputStream.<init>(ObjectInputStream.java:291)
        at 
org.apache.myfaces.shared_impl.util.MyFacesObjectInputStream.<init>(MyFacesObjectInputStream.java:41)
        at 
org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory.getObjectInputStream(DefaultSerialFactory.java:43)
        at 
org.apache.myfaces.shared_impl.util.StateUtils.getAsObject(StateUtils.java:315)
        at 
org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:243)
        at 
org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(HtmlResponseStateManager.java:187)
        at 
org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:151)
        at 
org.ajax4jsf.application.AjaxStateManager.restoreLogicalViewId(AjaxStateManager.java:573)
        at 
org.ajax4jsf.application.AjaxStateManager.restoreStateFromSession(AjaxStateManager.java:454)
        at 
org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:402)
        at 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:51

On Mon, Feb 16, 2009 at 11:29 AM,  <[email protected]> wrote:
> Hi Geoff,
>
> you have to disable the encryption explicitly - it's not depending on the 
> state saving method. Use
>
> <context-param>
>        <param-name>org.apache.myfaces.USE_ENCRYPTION</param-name>
>        <param-value>false</param-value>
> </context-param>
>
> Regards,
>
> Felix
>
> -----Original Message-----
> From: Geoff Longo [mailto:[email protected]]
> Sent: Friday, February 13, 2009 4:14 PM
> To: MyFaces Discussion
> Subject: Re: BadPadding Exception and more
>
> 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