1 Reply Latest reply on Sep 17, 2010 4:58 AM by taccart.thierry.accart.name

    EAR redeploy makes ajax failing

    taccart.thierry.accart.name
      Hi

      from time to time, we have a really weird error after EAR redeploy : AJAX stops working.
      We're using Seam 2.1.2 on JBOSS 4.2.2 (jdk 1.5.018) on  a windows 2003 server.

      I had a look on http requests initiated by Ajax : they are identical, but the responses are different.

      When it works, the ajax response is something as following
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <title>
      </title>
      <link class="component" href="/MyApp/a4j/s/3_3_0.GAMETA-INF/skins/glassX.xcss/DATB/eAGTcz60MXT5DGkAD2IDhA__" rel="stylesheet" type="text/css" />
      <link class="component" href="/MyApp/a4j/s/3_3_0.GAMETA-INF/skins/glassXExt.xcss/DATB/eAGTcz60MXT5DGkAD2IDhA__" media="rich-extended-skinning" rel="stylesheet" type="text/css" />
      <link class="user" href="/MyApp/a4j/s/3_3_0.GAstylesheet/theme.xcss/DATB/eAGTcz60MXT5DGkAD2IDhA__" rel="stylesheet" type="text/css" />
      <link class="user" href="/MyApp/stylesheet/theme.css" rel="stylesheet" type="text/css" />
      </head>
      <body>
      <span id="j_id363:mainTitle">
      <h1>New Training item
      </h1>
      <ul>
      </ul>
      </span>
      <a id="j_id363:existingRecordNumber:aproachLink" name="j_id363:existingRecordNumber:aproachLink" href="http://127.0.0.1:8095/" target="_blank">Records app</a>
      <meta name="Ajax-Update-Ids" content="j_id363:mainTitle,j_id363:existingRecordNumber:aproachLink" />
      <span id="ajax-view-state">
      <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id4" />
      </span>
      <meta id="Ajax-Response" name="Ajax-Response" content="true" />
      </body>
      </html>


      After a redeploy of EAR, when ajax fails, the same call gives the following response: \

      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <link class="component" href="/MyApp/a4j/s/3_3_0.GAMETA-INF/skins/glassX.xcss/DATB/eAGTcz60MXT5DGkAD2IDhA__" rel="stylesheet" type="text/css" />
      <link class="component" href="/MyApp/a4j/s/3_3_0.GAMETA-INF/skins/glassXExt.xcss/DATB/eAGTcz60MXT5DGkAD2IDhA__" media="rich-extended-skinning" rel="stylesheet" type="text/css" />
      <meta name="Ajax-Update-Ids" content="" />
      <title>
      </title>
      </head>
      <body>
      <span id="ajax-view-state">
      <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id6" />
      </span>
      <meta id="Ajax-Response" name="Ajax-Response" content="true" />
      </body>
      </html>

      As you can see, the response is almost empty. It handles only an update for the ajax viewState element.

      The most disturbing it that stopping JBoss and restarting it (even with a cleanup) does dot solve the issue: when it happens, the only one solution we have is to restart the server ! ;(
      Thus, we strongly suspect a problem at OS level, but have to clue : did anyone encountered a similar problem ?


      Thx


        • 1. Re: EAR redeploy makes ajax failing
          taccart.thierry.accart.name

          Problem was not fixed for months, driving us crazy sometime.


          Source of problem has been identified by Delphine Fina R. :
          our compilation and packaging was executed on a workstation, set on local timezone (Europe TZ) , and deployment was on a server, set on (GMT TZ).
          The lag between compilation time and server time was simply causing an error.


          Compiling and packaging on a computer with same timezone as target server fixed the problem.


          Thanks Fina! :)