myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <werner.p...@gmail.com>
Subject Re: MyFaces and GAE weird behavior
Date Mon, 13 Dec 2010 20:15:24 GMT
Yeah it seems like it, never had this issue here though, strangely.
The request seems to be absolutely correct and should be identified as 
ajax request.

Werner


Am 13.12.10 21:12, schrieb Ganesh:
> Sure! I always have this request:
>
> menu=2&menu2=2&j_id1631913672_61450686_SUBMIT=1&javax.faces.ViewState=8EgC7hvJoXWgMHaUZxk5rx66APlnNueyP32ajDxbvc%2Fi5akMf2jX5YAFR9g2TeexpCqMG8%2FZTjSuzyyp4wTfTQtIRYI2NGNYrowj3xe1Ea5gMnGDCmf4XDHE2t4%3D&javax.faces.source=menu&javax.faces.partial.ajax=true&javax.faces.partial.execute=menu%20%40this&j_id1631913672_61450686=j_id1631913672_61450686
>
>
> and 1500 time I this response:
>
> <?xml version="1.0" encoding="utf-8"?><partial-response><changes><update
> id="javax.faces.ViewState"><![CDATA[8EgC7hvJoXWgMHaUZxk5rx66APlnNueyP32ajDxbvc/i5akMf2jX5YAFR9g2TeexsmWaz0OwVCSuzyyp4wTfTQtIRYI2NGNYizaF3VX+29/gA9k66oAqkdcbAYw=]]></update></changes></partial-response>
>
>
> Then, suddenly I get this one:
>
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
> <html xmlns="http://www.w3.org/1999/xhtml"><head>
> <title>Facelet Title</title><script type="text/javascript"
> src="/javax.faces.resource/jsf.js.jsf?ln=javax.faces&amp;stage=Development"><!--
>
>
> //--></script></head><body><form id="j_id1631913672_61450686"
> name="j_id1631913672_61450686" method="post" action="/welcome.jsf"
> enctype="application/x-www-form-urlencoded">
> Selector
> <script type="text/javascript"><!--
>
> setInterval(function() {
> jsf.ajax.request(document.getElementById("menu"),null, {execute:"menu",
> render:"@none"});
> }, 100);
> //--></script><select id="menu" name="menu" size="1"
> onchange="jsf.ajax.request('menu',event,{execute:'@this',render:'menu2
> register','javax.faces.behavior.event':'change'})"> <option
> value="1">one</option> <option value="2"
> selected="selected">two</option></select><select id="menu2" name="menu2"
> size="1"
> onchange="jsf.ajax.request('menu2',event,{execute:'@this',render:'register','javax.faces.behavior.event':'change'})">
> <option value="1">one</option> <option value="2"
> selected="selected">two</option></select><span id="register">2</span>
> updatearea<input type="hidden" name="j_id1631913672_61450686_SUBMIT"
> value="1" /><input type="hidden" name="javax.faces.ViewState"
> id="javax.faces.ViewState"
> value="8EgC7hvJoXWgMHaUZxk5rx66APlnNueyP32ajDxbvc/i5akMf2jX5YAFR9g2TeexZLWjcpLNwuKuzyyp4wTfTQtIRYI2NGNYxG03TD1n1SnzkVnE0HeVBTpV0LQ="
> /></form>
> Hello dskgfjsfd gjfdlkjg from Facelets skdjgb kdfsjg<div
> id="javax_faces_developmentstage_messages"></div></body>
> </html>
>
> Some system component gets an hickup after a while ... let me do some
> additional tests before I submit an issue. Did you try reducing the
> intervall to 100 and let glassfish run for an hour? On Tomcat this can
> definitely be reproduced!
>
> Best regards,
> Ganesh
>
> Am 13.12.2010 18:28, schrieb Werner Punz:
>> Hi I never had a full response in my testing case.
>> Not sure how you triggered it in my code as well.
>>
>> Either way a full response points towards that the server was not
>> interpreting the ajax request as ajax request, which is close to
>> impossible in the standard jsf2 ajax part because the ajax markers are
>> appended at ever request automatically in the code no matter what.
>> Can you show me what request is sent downwards which caused the full
>> response instead of the ajax one?
>>
>>
>> Werner
>>
>>
>> Am 13.12.10 18:18, schrieb Ganesh:
>>> I had already taken crypto out - running with clean standard
>>> configuration, but I'm probably producing a bug different from yours:
>>> Once in a while I'm getting a complete HTML response on an XHR request.
>>>
>>> I'll do some more testing and then open a new bug.
>>>
>>> Best regards,
>>> Ganesh
>>>
>>> Request:
>>> menu=1&menu2=1&j_id1631913672_61450686_SUBMIT=1&javax.faces.ViewState=F8vqQJXUrd4zAZMzy8pO6QpsR0MoQCS001fI%2BaRelCM3BwX5gVhP1F1HbOnrY7di%2BaEzD2dOBzMwrfsplPJBRSeUcyZ%2BBmw6pwlX7DigjiMx9A2oOe7ztPJtY5c%3D&javax.faces.source=menu&javax.faces.partial.ajax=true&javax.faces.partial.execute=menu%20%40this&j_id1631913672_61450686=j_id1631913672_61450686
>>>
>>>
>>>
>>> Response:
>>> <?xml version='1.0' encoding='UTF-8' ?>
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
>>> <html xmlns="http://www.w3.org/1999/xhtml"
>>> xmlns:ez="http://java.sun.com/jsf/composite/ezcomp"><head>
>>> <title>Facelet Title</title><script type="text/javascript"
>>> src="/TestGAE/javax.faces.resource/jsf.js.jsf?ln=javax.faces&amp;stage=Development"><!--
>>>
>>>
>>>
>>> //--></script></head><body><form id="j_id1631913672_61450686"
>>> name="j_id1631913672_61450686" method="post"
>>> action="/TestGAE/welcome.jsf"
>>> enctype="application/x-www-form-urlencoded">
>>> Selector
>>> <script type="text/javascript"><!--
>>>
>>> setInterval(function() {
>>> jsf.ajax.request(document.getElementById("menu"),null, {execute:"menu",
>>> render:"@none"});
>>> }, 100);
>>> //--></script><select id="menu" name="menu" size="1"
>>> onchange="jsf.ajax.request('menu',event,{execute:'@this',render:'menu2
>>> register','javax.faces.behavior.event':'change'})"> <option value="1"
>>> selected="selected">one</option> <option
>>> value="2">two</option></select><select id="menu2" name="menu2"
size="1"
>>> onchange="jsf.ajax.request('menu2',event,{execute:'@this',render:'register','javax.faces.behavior.event':'change'})">
>>>
>>> <option value="1" selected="selected">one</option> <option
>>> value="2">two</option></select><span id="register">1</span>
>>> updatearea<input type="hidden" name="j_id1631913672_61450686_SUBMIT"
>>> value="1" /><input type="hidden" name="javax.faces.ViewState"
>>> id="javax.faces.ViewState"
>>> value="F8vqQJXUrd4zAZMzy8pO6QpsR0MoQCS001fI+aRelCM3BwX5gVhP1F1HbOnrY7diEoaJsT2FQu0wrfsplPJBRSeUcyZ+Bmw6l4QOe8gddH2qxjx8SrlrzKy8qxU="
>>>
>>> /></form>
>>> Hello dskgfjsfd gjfdlkjg from Facelets skdjgb kdfsjg<div
>>> id="javax_faces_developmentstage_messages"></div></body>
>>> </html>
>>>
>>>
>>>
>>> Am 13.12.2010 16:39, schrieb Werner Punz:
>>>> Hi Ganesh take out the encryption entry in the web.xml. For me all
>>>> bugs are gone on the defaults.
>>>> Or even better turn encryption off entirely in the web.xml by setting
>>>> it explicitely on off.
>>>> I already raised a bug but since the original bug was caused by a
>>>> fault entry in the web.xml on my side and since it is gone entirely
>>>> afterwards I closed it again.
>>>>
>>>>
>>>> Werner
>>>>
>>>>
>>>> Am 13.12.10 12:38, schrieb Ganesh:
>>>>> Reproduced on Tomcat (had to remove your ezcomp as it uses JEE6
>>>>> syntax).
>>>>> Took several thousand requests to happen (increased firepower by
>>>>> decreasing intervall to 100ms). Bug: MyFaces 2.0.2 sometimes answers
>>>>> AJAX Request with a full HTML page.
>>>>>
>>>>> Best regards,
>>>>> Ganesh
>>>>>
>>>>> Am 12.12.2010 15:50, schrieb Werner Punz:
>>>>>> Ok I can reproduce the issue locally on glassfish as well by leaving
>>>>>> my application running and triggering the ajax requests locally.
>>>>>> (Currently testing against glassfish)
>>>>>> So GAE is out of the game now. I guess we have a serious bug here,
>>>>>> not
>>>>>> sure if it is crypto related, I just removed all the keys, to have
>>>>>> the
>>>>>> app running at defaults. The next step now is to disable crypto
>>>>>> entirely. Either way I guess it is time to file a bugreport, this
is
>>>>>> definitely not GAE anymore.
>>>>>>
>>>>>> Werner
>>>>>>
>>>>>>
>>>>>>
>>>>>> Am 12.12.10 12:08, schrieb Werner Punz:
>>>>>>> Ok I have to revert my last mail, I just got the error again
despite
>>>>>>> having no encryption at all.
>>>>>>>
>>>>>>> Werner
>>>>>>>
>>>>>>>
>>>>>>> Am 12.12.10 12:05, schrieb Werner Punz:
>>>>>>>> Hi the issue seems to be encrypten related, my mistake I
set a
>>>>>>>> secret
>>>>>>>> and no secret_mac as leo suggested.
>>>>>>>> I now removed testwise the encryption entirely and the problem
>>>>>>>> seems to
>>>>>>>> be gone even for server side state saving.
>>>>>>>>
>>>>>>>> GAE has improved their session handling, I am still running
on
>>>>>>>> server
>>>>>>>> side settings with no impact so far, so I do think the general
>>>>>>>> recommendation of having to use client side state saving
can be
>>>>>>>> reverted
>>>>>>>> to some degree (there are size limitations for server sessions
>>>>>>>> afaik)
>>>>>>>>
>>>>>>>> Werber
>>>>>>>>
>>>>>>>>
>>>>>>>> Am 11.12.10 05:15, schrieb Ganesh:
>>>>>>>>> Wow, you've invented the AJAX LOIC!
>>>>>>>>>
>>>>>>>>> After running it a minute with Firebug ON it gives me
a different
>>>>>>>>> error
>>>>>>>>> than you described:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> First I get about 10-50 successfull AJAX requests (I
let it run
>>>>>>>>> autonomously, no AJAX request manually triggerd):
>>>>>>>>>
>>>>>>>>> REQUEST
>>>>>>>>> menu=2&menu2=2&j_id1631913672_61450686_SUBMIT=1&javax.faces.ViewState=8EgC7hvJoXWgMHaUZxk5rx66APlnNueyP32ajDxbvc%2Fi5akMf2jX5YAFR9g2TeexpCqMG8%2FZTjSuzyyp4wTfTQtIRYI2NGNYrowj3xe1Ea5gMnGDCmf4XDHE2t4%3D&javax.faces.source=menu&javax.faces.partial.ajax=true&javax.faces.partial.execute=menu%20%40this&j_id1631913672_61450686=j_id1631913672_61450686
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> RESPONSE
>>>>>>>>> <?xml version="1.0"
>>>>>>>>> encoding="utf-8"?><partial-response><changes><update
>>>>>>>>> id="javax.faces.ViewState"><![CDATA[8EgC7hvJoXWgMHaUZxk5rx66APlnNueyP32ajDxbvc/i5akMf2jX5YAFR9g2TeexsmWaz0OwVCSuzyyp4wTfTQtIRYI2NGNYizaF3VX+29/gA9k66oAqkdcbAYw=]]></update></changes></partial-response>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Then I get 2 requests where MyFaces suddenly answers
the AJAX
>>>>>>>>> requests
>>>>>>>>> with HTML:
>>>>>>>>>
>>>>>>>>> REQUEST
>>>>>>>>> menu=2&menu2=2&j_id1631913672_61450686_SUBMIT=1&javax.faces.ViewState=8EgC7hvJoXWgMHaUZxk5rx66APlnNueyP32ajDxbvc%2Fi5akMf2jX5YAFR9g2TeexsmWaz0OwVCSuzyyp4wTfTQtIRYI2NGNYizaF3VX%2B29%2FgA9k66oAqkdcbAYw%3D&javax.faces.source=menu&javax.faces.partial.ajax=true&javax.faces.partial.execute=menu%20%40this&j_id1631913672_61450686=j_id1631913672_61450686
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> RESPONSE
>>>>>>>>> <?xml version='1.0' encoding='UTF-8' ?>
>>>>>>>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>>>>>>>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
>>>>>>>>> <html xmlns="http://www.w3.org/1999/xhtml"><head>
>>>>>>>>> <title>Facelet Title</title><script type="text/javascript"
>>>>>>>>> src="/javax.faces.resource/jsf.js.jsf?ln=javax.faces&amp;stage=Development"><!--
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> //--></script></head><body><form
id="j_id1631913672_61450686"
>>>>>>>>> name="j_id1631913672_61450686" method="post" action="/welcome.jsf"
>>>>>>>>> enctype="application/x-www-form-urlencoded">
>>>>>>>>> Selector
>>>>>>>>> <script type="text/javascript"><!--
>>>>>>>>>
>>>>>>>>> setInterval(function() {
>>>>>>>>> jsf.ajax.request(document.getElementById("menu"),null,
>>>>>>>>> {execute:"menu",
>>>>>>>>> render:"@none"});
>>>>>>>>> }, 10000);
>>>>>>>>> //--></script><select id="menu" name="menu"
size="1"
>>>>>>>>> onchange="jsf.ajax.request('menu',event,{execute:'@this',render:'menu2
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> register','javax.faces.behavior.event':'change'})">
<option
>>>>>>>>> value="1">one</option> <option value="2"
>>>>>>>>> selected="selected">two</option></select><select
id="menu2"
>>>>>>>>> name="menu2"
>>>>>>>>> size="1"
>>>>>>>>> onchange="jsf.ajax.request('menu2',event,{execute:'@this',render:'register','javax.faces.behavior.event':'change'})">
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> <option value="1">one</option> <option
value="2"
>>>>>>>>> selected="selected">two</option></select><span
>>>>>>>>> id="register">2</span>
>>>>>>>>> updatearea<input type="hidden"
>>>>>>>>> name="j_id1631913672_61450686_SUBMIT"
>>>>>>>>> value="1" /><input type="hidden" name="javax.faces.ViewState"
>>>>>>>>> id="javax.faces.ViewState"
>>>>>>>>> value="8EgC7hvJoXWgMHaUZxk5rx66APlnNueyP32ajDxbvc/i5akMf2jX5YAFR9g2TeexZLWjcpLNwuKuzyyp4wTfTQtIRYI2NGNYxG03TD1n1SnzkVnE0HeVBTpV0LQ="
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> /></form>
>>>>>>>>> Hello dskgfjsfd gjfdlkjg from Facelets skdjgb kdfsjg<div
>>>>>>>>> id="javax_faces_developmentstage_messages"></div></body>
>>>>>>>>> </html>
>>>>>>>>>
>>>>>>>>> And after exactly two HTML responses the AJAX LOIC stops.
>>>>>>>>>
>>>>>>>>> Can you confirm this behaviour from your tests? I think
I've seen
>>>>>>>>> this
>>>>>>>>> behaviour when developing the DojoFaces showroom on Tomcat,
so
>>>>>>>>> maybe
>>>>>>>>> it's not GAE specific. I planned to investigate into
this since
>>>>>>>>> long.
>>>>>>>>> Can you please send the LOIC source? I'll direct it on
Tomcat and
>>>>>>>>> report, whether I can reproduce the behaviour there.
>>>>>>>>>
>>>>>>>>> Best regards,
>>>>>>>>> Ganesh
>>>>>>>>>
>>>>>>>>> Am 10.12.2010 17:51, schrieb Leonardo Uribe:
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> I readed your previous emails related to this one
and one
>>>>>>>>>> possibility
>>>>>>>>>> that comes to my mind is we are storing something
on session
>>>>>>>>>> without
>>>>>>>>>> implement Serializable interface. If that so, as
soon as GAE
>>>>>>>>>> serialize
>>>>>>>>>> the session to disk, that code causes an Exception
and when
>>>>>>>>>> MyFaces
>>>>>>>>>> try to restore the state it just has dissapeared
(servlet
>>>>>>>>>> session is
>>>>>>>>>> invalid, so a new one is created and our value in
>>>>>>>>>> javax.faces.ViewState request parameter is not found,
so a
>>>>>>>>>> ViewExpiredException is thrown).
>>>>>>>>>>
>>>>>>>>>> The solution if that is the case is check all lines
that do
>>>>>>>>>> something
>>>>>>>>>> with session map and check if it is possible to serialize
to
>>>>>>>>>> disk. I
>>>>>>>>>> tried the demo but I don't see the exception.
>>>>>>>>>>
>>>>>>>>>> regards,
>>>>>>>>>>
>>>>>>>>>> Leonardo Uribe
>>>>>>>>>>
>>>>>>>>>> 2010/12/10 Werner Punz <werner.punz@gmail.com
>>>>>>>>>> <mailto:werner.punz@gmail.com>>
>>>>>>>>>>
>>>>>>>>>> Hello, I just wanted to discuss some weird behavior
I am facing
>>>>>>>>>> with
>>>>>>>>>> GAE in conjunction with MyFaces I assume this is
GAE related
>>>>>>>>>> but I
>>>>>>>>>> just wonder if we can fix or work around it on our
side.
>>>>>>>>>>
>>>>>>>>>> Here is the situation:
>>>>>>>>>>
>>>>>>>>>> Given that I want to help a user out regarding all
this,
>>>>>>>>>> I have a testing project deployed with MyFaces 2.0
on GAE, for
>>>>>>>>>> now
>>>>>>>>>> the
>>>>>>>>>> state saving is server (not tested yet on client)
>>>>>>>>>> GAE supports session handling on its infrastructure
with
>>>>>>>>>> memcache,
>>>>>>>>>> but
>>>>>>>>>> here is the problem. I have a basic keepalive enabled
which
>>>>>>>>>> should
>>>>>>>>>> refresh the memcache session and keep it alive. This
works, but
>>>>>>>>>> occasionally GAE seems to hickup and delivers a null
object on
>>>>>>>>>> the
>>>>>>>>>> code which we use to access our serialised view,
which results
>>>>>>>>>> in a
>>>>>>>>>> ViewRoot not found exception. Now this is definitely
a GAE
>>>>>>>>>> problem,
>>>>>>>>>> but I wonder if we cannot fix it up on our side,
maybe by
>>>>>>>>>> triggering
>>>>>>>>>> some API from google.
>>>>>>>>>>
>>>>>>>>>> Here is the example
>>>>>>>>>> http://testinck4040.appspot.com/welcome.jsf
>>>>>>>>>>
>>>>>>>>>> You can leave the browser runnning, especially in
the beginning,
>>>>>>>>>> you
>>>>>>>>>> will see this hickup from time to time, as soon as
you confirm
>>>>>>>>>> the
>>>>>>>>>> error alert the next ajax request again goes through
because the
>>>>>>>>>> subsequent request was again able to restore the
viewroot.
>>>>>>>>>> After a while the errors become less or go away,
which looks
>>>>>>>>>> eerily
>>>>>>>>>> like caching behavior to me.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I assume this has something to do with GAEs internal
way of
>>>>>>>>>> serialising the session from time to time.
>>>>>>>>>> Either way, any ideas or insight on this?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Werner
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>



Mime
View raw message