You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alex Romayev <ro...@yahoo.com> on 2003/03/03 15:56:42 UTC

Very strange behaviour -- caching bug?

Hello,

There is a very strange behaviour that my site exibits
ever since I've upgraded my 2.1 dev code from what it
was in Nov-Dec last year to the most current version
(less than a week old).

Here is what's going on.  There is a portlet which is
generated by calling another pipeline fragment
matching "a.resource".  It looks like a.resource
behaves correctly, however it seems that a.portlet,
which uses a.resource as its input does not realize
when a.resource's output changes and keeps working
with the incorrect cached version.

The following works correctly:
http://localhost:8080/cocoon/a.resource?locale=en
- displays output in English
http://localhost:8080/cocoon/a.resource?locale=ru
- displays output in Russian

Still fine:
http://localhost:8080/cocoon/a.portlet?locale=en
- displays output in English

PROBLEM:
http://localhost:8080/cocoon/a.portlet?locale=ru
- displays output in ENGLISH!

If I "touch" a.xsl in the following pipeline, and
hence, force the reload, everything works fine,
however when I change locale, it's back to the
behaviour I've just described.

The following is a simplified pipeline:

<map:pipeline>
 <map:match "*.portlet">
  <map:match "a.portlet">
   <map:generate src="cocoon:/a.resource"/>
    <map:transform src="a.xsl"/>
   <map:serialize type="xml"/>
  </map:match>
 </map:match>
</map:pipeline>

<map:pipeline>
 <map:match "*.resource">
  <map:match "a.resource">
   <map:generate src="a.xml"/>
    <map:act type="locale">
     <map:transform type="i18n">
      <map:parameter name="locale" value="{locale}"/>
     </map:transform>
    </map:act>
   <map:serialize type="xml"/>
  </map:match>
 </map:match>
</map:pipeline>

Cheers,
-Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Question

Posted by Leszek Gawron <ou...@vip.net.pl>.
On pon, mar 03, 2003 at 05:31:17 -0300, Alejandro Raiczyk wrote:
> Is there any way to detect when a user closes the browser and that session
> is destroyed ?
> There was a way under C1 using SessionListener, but I can't find an
> implementation or something like that under C2.
It is not possible to detect browser closing but it's possible to capture
session timeout event
see http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=104609991021185&w=2
	ouzo

-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Question

Posted by Alejandro Raiczyk <al...@technisys.com.ar>.
Is there any way to detect when a user closes the browser and that session
is destroyed ?
There was a way under C1 using SessionListener, but I can't find an
implementation or something like that under C2.

Thanks in advance.

Alejandro


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Very strange behaviour -- caching bug?

Posted by Leszek Gawron <ou...@vip.net.pl>.
On pon, mar 03, 2003 at 11:27:10 -0800, Alex Romayev wrote:
> Do you know the syntax for making a pipeline
> noncaching?

first see if your main sitemap.xmap contains different pipeline implementation
(grep for "caching", "noncaching")
use it like this:

<map:pipeline type="noncaching">
  <!-- map:match stuff goes here -->
</map:pipeline>

or set it do default at your main sitemap:

                   ++ here ++
<map:pipes default="noncaching">
     <map:pipe name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
     <map:pipe name="caching-point" src="org.apache.cocoon.components.pipeline.impl.CachingPointProcessingPipeline">
       <autoCachingPoint>On</autoCachingPoint>
     </map:pipe>
     <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
</map:pipes>

	ouzo
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Very strange behaviour -- caching bug?

Posted by Alex Romayev <ro...@yahoo.com>.
Do you know the syntax for making a pipeline
noncaching?

--- Leszek Gawron <ou...@vip.net.pl> wrote:
> On pon, mar 03, 2003 at 10:01:03 -0800, Alex Romayev
> wrote:
> > Hi Mark,
> > 
> > Thanks for your help.  I like your test case -- it
> > simpler and cleaner.  Do you (or anyone else) know
> how
> > to submit this as a bug to make sure the
> developers
> > know about it?
> 
> I have encountered the same bug (I think) or very
> similar while working with
> aggregation (XSP + ESQL and static xml files. See my
> bug description at
>
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16958
> 
> I have reported it long time ago but no action was
> taken.
> 
> 	ouzo
> 
> PS. a very temporary solution is to set your
> pipeline type to noncaching.
> Doesn't solve the problem but allows you to work
> further.
> 
> -- 
>             __
>          | /  \ |        Leszek Gawron            //
>  \\
>         \_\\  //_/      ouzo@vip.net.pl         
> _\\()//_
>          .'/()\'.     Phone: +48(600)341118     / //
>  \\ \
>           \\  //  recursive: adj; see recursive  |
> \__/ |
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Very strange behaviour -- caching bug?

Posted by Leszek Gawron <ou...@vip.net.pl>.
On pon, mar 03, 2003 at 10:01:03 -0800, Alex Romayev wrote:
> Hi Mark,
> 
> Thanks for your help.  I like your test case -- it
> simpler and cleaner.  Do you (or anyone else) know how
> to submit this as a bug to make sure the developers
> know about it?

I have encountered the same bug (I think) or very similar while working with
aggregation (XSP + ESQL and static xml files. See my bug description at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16958

I have reported it long time ago but no action was taken.

	ouzo

PS. a very temporary solution is to set your pipeline type to noncaching.
Doesn't solve the problem but allows you to work further.

-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


RE: Very strange behaviour -- caching bug?

Posted by Mark H <ma...@markhorgan.com>.
>Do you (or anyone else) know how
>to submit this as a bug to make sure the developers
>know about it?

http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Cocoon%202

Never done it myself though.

-----Original Message-----
From: Alex Romayev [mailto:romayev@yahoo.com]
Sent: 03 March 2003 06:01PM
To: cocoon-users@xml.apache.org
Subject: RE: Very strange behaviour -- caching bug?


Hi Mark,

Thanks for your help.  I like your test case -- it
simpler and cleaner.  Do you (or anyone else) know how
to submit this as a bug to make sure the developers
know about it?

Cheers,
-Alex

--- Mark H <ma...@markhorgan.com> wrote:
> I tried out a simpler form: (don't have the source
> code for your
> actions/stylesheets)
> 
> <map:components>
> 	<map:actions>
> 		<map:action name="request"
> src="org.apache.cocoon.acting.RequestParamAction"/>
> 	</map:actions>
> </map:components>
> <map:pipelines>
> <map:pipeline>
> <map:match pattern="*.portlet">
> 	<map:match pattern="a.portlet">
>    		<map:generate src="cocoon:/a.resource"/>
>    		<map:serialize type="xml"/>
> 	</map:match>
> </map:match>
> <map:match pattern="*.resource">
> 	<map:match pattern="a.resource">
>   		<map:act type="request">
>   			<map:parameter name="parameters" value="true"/>
> 			<map:generate src="{locale}.xml"/>
> 	   		<map:serialize type="xml"/>
> 	  	</map:act>
>   	</map:match>
> </map:match>
> </map:pipeline>
> </map:pipelines>
> 
> and got the same caching problem you got, can
> anybody try the above in
> v2.0.4 to see if it is a 2.1 bug?
> 
> when I did the following it worked ok:
> 
>  <map:match pattern="*.portlet">
>   <map:match pattern="a.portlet">
>    <map:act type="request">
>   	<map:parameter name="parameters" value="true"/>
> 	<map:generate src="{locale}.xml"/>
> 	<map:serialize type="xml"/>
>     </map:act>
>   </map:match>
>  </map:match>
> 
> It seems to be caching cocoon:/a.resource. I can't
> see exactly what it's
> doing because it's not generating any logs (it
> should log caching in
> sitemap.log). I'm also having problems with the
> latest CVS it seems to be in
> a state of flux. The only way to fix these problems
> is to go deep into the
> Cocoon's/Avalon/Excalibur source code and debug.
> 
> -----Original Message-----
> From: Alex Romayev [mailto:romayev@yahoo.com]
> Sent: 03 March 2003 02:57PM
> To: cocoon-users@xml.apache.org
> Subject: Very strange behaviour -- caching bug?
> 
> 
> Hello,
> 
> There is a very strange behaviour that my site
> exibits
> ever since I've upgraded my 2.1 dev code from what
> it
> was in Nov-Dec last year to the most current version
> (less than a week old).
> 
> Here is what's going on.  There is a portlet which
> is
> generated by calling another pipeline fragment
> matching "a.resource".  It looks like a.resource
> behaves correctly, however it seems that a.portlet,
> which uses a.resource as its input does not realize
> when a.resource's output changes and keeps working
> with the incorrect cached version.
> 
> The following works correctly:
> http://localhost:8080/cocoon/a.resource?locale=en
> - displays output in English
> http://localhost:8080/cocoon/a.resource?locale=ru
> - displays output in Russian
> 
> Still fine:
> http://localhost:8080/cocoon/a.portlet?locale=en
> - displays output in English
> 
> PROBLEM:
> http://localhost:8080/cocoon/a.portlet?locale=ru
> - displays output in ENGLISH!
> 
> If I "touch" a.xsl in the following pipeline, and
> hence, force the reload, everything works fine,
> however when I change locale, it's back to the
> behaviour I've just described.
> 
> The following is a simplified pipeline:
> 
> <map:pipeline>
>  <map:match "*.portlet">
>   <map:match "a.portlet">
>    <map:generate src="cocoon:/a.resource"/>
>     <map:transform src="a.xsl"/>
>    <map:serialize type="xml"/>
>   </map:match>
>  </map:match>
> </map:pipeline>
> 
> <map:pipeline>
>  <map:match "*.resource">
>   <map:match "a.resource">
>    <map:generate src="a.xml"/>
>     <map:act type="locale">
>      <map:transform type="i18n">
>       <map:parameter name="locale"
> value="{locale}"/>
>      </map:transform>
>     </map:act>
>    <map:serialize type="xml"/>
>   </map:match>
>  </map:match>
> </map:pipeline>
> 
> Cheers,
> -Alex
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


RE: Very strange behaviour -- caching bug?

Posted by Alex Romayev <ro...@yahoo.com>.
Hi Mark,

Thanks for your help.  I like your test case -- it
simpler and cleaner.  Do you (or anyone else) know how
to submit this as a bug to make sure the developers
know about it?

Cheers,
-Alex

--- Mark H <ma...@markhorgan.com> wrote:
> I tried out a simpler form: (don't have the source
> code for your
> actions/stylesheets)
> 
> <map:components>
> 	<map:actions>
> 		<map:action name="request"
> src="org.apache.cocoon.acting.RequestParamAction"/>
> 	</map:actions>
> </map:components>
> <map:pipelines>
> <map:pipeline>
> <map:match pattern="*.portlet">
> 	<map:match pattern="a.portlet">
>    		<map:generate src="cocoon:/a.resource"/>
>    		<map:serialize type="xml"/>
> 	</map:match>
> </map:match>
> <map:match pattern="*.resource">
> 	<map:match pattern="a.resource">
>   		<map:act type="request">
>   			<map:parameter name="parameters" value="true"/>
> 			<map:generate src="{locale}.xml"/>
> 	   		<map:serialize type="xml"/>
> 	  	</map:act>
>   	</map:match>
> </map:match>
> </map:pipeline>
> </map:pipelines>
> 
> and got the same caching problem you got, can
> anybody try the above in
> v2.0.4 to see if it is a 2.1 bug?
> 
> when I did the following it worked ok:
> 
>  <map:match pattern="*.portlet">
>   <map:match pattern="a.portlet">
>    <map:act type="request">
>   	<map:parameter name="parameters" value="true"/>
> 	<map:generate src="{locale}.xml"/>
> 	<map:serialize type="xml"/>
>     </map:act>
>   </map:match>
>  </map:match>
> 
> It seems to be caching cocoon:/a.resource. I can't
> see exactly what it's
> doing because it's not generating any logs (it
> should log caching in
> sitemap.log). I'm also having problems with the
> latest CVS it seems to be in
> a state of flux. The only way to fix these problems
> is to go deep into the
> Cocoon's/Avalon/Excalibur source code and debug.
> 
> -----Original Message-----
> From: Alex Romayev [mailto:romayev@yahoo.com]
> Sent: 03 March 2003 02:57PM
> To: cocoon-users@xml.apache.org
> Subject: Very strange behaviour -- caching bug?
> 
> 
> Hello,
> 
> There is a very strange behaviour that my site
> exibits
> ever since I've upgraded my 2.1 dev code from what
> it
> was in Nov-Dec last year to the most current version
> (less than a week old).
> 
> Here is what's going on.  There is a portlet which
> is
> generated by calling another pipeline fragment
> matching "a.resource".  It looks like a.resource
> behaves correctly, however it seems that a.portlet,
> which uses a.resource as its input does not realize
> when a.resource's output changes and keeps working
> with the incorrect cached version.
> 
> The following works correctly:
> http://localhost:8080/cocoon/a.resource?locale=en
> - displays output in English
> http://localhost:8080/cocoon/a.resource?locale=ru
> - displays output in Russian
> 
> Still fine:
> http://localhost:8080/cocoon/a.portlet?locale=en
> - displays output in English
> 
> PROBLEM:
> http://localhost:8080/cocoon/a.portlet?locale=ru
> - displays output in ENGLISH!
> 
> If I "touch" a.xsl in the following pipeline, and
> hence, force the reload, everything works fine,
> however when I change locale, it's back to the
> behaviour I've just described.
> 
> The following is a simplified pipeline:
> 
> <map:pipeline>
>  <map:match "*.portlet">
>   <map:match "a.portlet">
>    <map:generate src="cocoon:/a.resource"/>
>     <map:transform src="a.xsl"/>
>    <map:serialize type="xml"/>
>   </map:match>
>  </map:match>
> </map:pipeline>
> 
> <map:pipeline>
>  <map:match "*.resource">
>   <map:match "a.resource">
>    <map:generate src="a.xml"/>
>     <map:act type="locale">
>      <map:transform type="i18n">
>       <map:parameter name="locale"
> value="{locale}"/>
>      </map:transform>
>     </map:act>
>    <map:serialize type="xml"/>
>   </map:match>
>  </map:match>
> </map:pipeline>
> 
> Cheers,
> -Alex
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


RE: Very strange behaviour -- caching bug?

Posted by Mark H <ma...@markhorgan.com>.
I tried out a simpler form: (don't have the source code for your
actions/stylesheets)

<map:components>
	<map:actions>
		<map:action name="request"
src="org.apache.cocoon.acting.RequestParamAction"/>
	</map:actions>
</map:components>
<map:pipelines>
<map:pipeline>
<map:match pattern="*.portlet">
	<map:match pattern="a.portlet">
   		<map:generate src="cocoon:/a.resource"/>
   		<map:serialize type="xml"/>
	</map:match>
</map:match>
<map:match pattern="*.resource">
	<map:match pattern="a.resource">
  		<map:act type="request">
  			<map:parameter name="parameters" value="true"/>
			<map:generate src="{locale}.xml"/>
	   		<map:serialize type="xml"/>
	  	</map:act>
  	</map:match>
</map:match>
</map:pipeline>
</map:pipelines>

and got the same caching problem you got, can anybody try the above in
v2.0.4 to see if it is a 2.1 bug?

when I did the following it worked ok:

 <map:match pattern="*.portlet">
  <map:match pattern="a.portlet">
   <map:act type="request">
  	<map:parameter name="parameters" value="true"/>
	<map:generate src="{locale}.xml"/>
	<map:serialize type="xml"/>
    </map:act>
  </map:match>
 </map:match>

It seems to be caching cocoon:/a.resource. I can't see exactly what it's
doing because it's not generating any logs (it should log caching in
sitemap.log). I'm also having problems with the latest CVS it seems to be in
a state of flux. The only way to fix these problems is to go deep into the
Cocoon's/Avalon/Excalibur source code and debug.

-----Original Message-----
From: Alex Romayev [mailto:romayev@yahoo.com]
Sent: 03 March 2003 02:57PM
To: cocoon-users@xml.apache.org
Subject: Very strange behaviour -- caching bug?


Hello,

There is a very strange behaviour that my site exibits
ever since I've upgraded my 2.1 dev code from what it
was in Nov-Dec last year to the most current version
(less than a week old).

Here is what's going on.  There is a portlet which is
generated by calling another pipeline fragment
matching "a.resource".  It looks like a.resource
behaves correctly, however it seems that a.portlet,
which uses a.resource as its input does not realize
when a.resource's output changes and keeps working
with the incorrect cached version.

The following works correctly:
http://localhost:8080/cocoon/a.resource?locale=en
- displays output in English
http://localhost:8080/cocoon/a.resource?locale=ru
- displays output in Russian

Still fine:
http://localhost:8080/cocoon/a.portlet?locale=en
- displays output in English

PROBLEM:
http://localhost:8080/cocoon/a.portlet?locale=ru
- displays output in ENGLISH!

If I "touch" a.xsl in the following pipeline, and
hence, force the reload, everything works fine,
however when I change locale, it's back to the
behaviour I've just described.

The following is a simplified pipeline:

<map:pipeline>
 <map:match "*.portlet">
  <map:match "a.portlet">
   <map:generate src="cocoon:/a.resource"/>
    <map:transform src="a.xsl"/>
   <map:serialize type="xml"/>
  </map:match>
 </map:match>
</map:pipeline>

<map:pipeline>
 <map:match "*.resource">
  <map:match "a.resource">
   <map:generate src="a.xml"/>
    <map:act type="locale">
     <map:transform type="i18n">
      <map:parameter name="locale" value="{locale}"/>
     </map:transform>
    </map:act>
   <map:serialize type="xml"/>
  </map:match>
 </map:match>
</map:pipeline>

Cheers,
-Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org