You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Thorsten Scherler <th...@apache.org> on 2005/06/10 02:57:32 UTC

[views] Headsup - today suddenly views haven't worked anymore

Hello devs,

FAQ: today suddenly views haven't worked anymore. 

Possible problem: If this happens for you then check
http://xobjex.com/service/date.xsl in a browser. 
If you do not get an answer in your browser, that is the problem.

Solution: change in your view a contract that causes cocoon to hang up
and waiting forever for an answer:
<!--<forrest:contract name="last-published-net"/>-->
You can use the js-fallback:
<forrest:contract name="last-published">

Background:
After a good while of debugging (p.s. we need a better design and
debugging) I found out that the problem has been one contract.

The last-published-net contract is contacting a server for the time. The
problem is that 
02:19:15 thorsten@cartman>~/apache/forrest-trunk $ ping xobjex.com
PING xobjex.com (64.81.233.221) 56(84) bytes of data.
did not gave an answer but my net was up. :(

I learned from this that 
select="document('http://xobjex.com/service/date.xsl')/date"
is a dangerous thing to do in contracts. 

I reckon this has to be done earlier with the locationmap. I guess there
is a timeout implemented to overcome this problem. I will hopefully know
more after the weekend and can address this issue. ;-)

good night.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [views] Headsup - today suddenly views haven't worked anymore

Posted by Diwaker Gupta <di...@gmail.com>.
On 6/9/05, Diwaker Gupta <di...@gmail.com> wrote:
> > I learned from this that
> > select="document('http://xobjex.com/service/date.xsl')/date"
> > is a dangerous thing to do in contracts.

IMHO, here is the simplest solution:

o since we already use Ant, can we use the <tstamp> target [1] to set
some global property variable
o make sure this property variable is available to the contracts (so
that other contracts may also use it) OR
o pass the variable as a parameter to the contract (I'm not sure if
this is the right approach)

I don't know enough about how the Ant build files are setup right now
to integrate this, but it should be fairly simple for someone more
familiar with the system. I figure that since we are already using
this huge amount of Java, its stupid to write a Python program to
generate a date :)

[1] http://ant.apache.org/manual/CoreTasks/tstamp.html
-- 
Diwaker Gupta
http://resolute.ucsd.edu/diwaker

Re: [views] Headsup - today suddenly views haven't worked anymore

Posted by Diwaker Gupta <di...@gmail.com>.
> I learned from this that
> select="document('http://xobjex.com/service/date.xsl')/date"
> is a dangerous thing to do in contracts.

Its a simple script -- Forrest can host it on its own website.

But even that is not required -- I had supplied a simple Python script
that generates this document. All we need is to run this python script
_at the beginning_ of the build and generate the XML document, and
then keep reusing this XML document in all future calls in the build.

-- 
Diwaker Gupta
http://resolute.ucsd.edu/diwaker