[daisy] chaching problem with extern included XSP

Bruno Dumon bruno at outerthought.org
Thu Jul 13 07:05:20 CDT 2006


On Thu, 2006-07-13 at 10:19 +0200, Ehms, Jürgen wrote:
> Hallo,
> 
> I'm calling an extern cocoon site in my own daisy site mscintra
> 
> (yousing WinXP jdk1.5.0_06 daisy-1.5-M2 generatet with blocks xsp session-fw database fron source)  
> 
> http://localhost:8888/daisy/mscintra/ext/prodsearch/itm/wer-sel.html
> 
> that is generated in two steps
> 
> first i generate  the  xsp with xsl transformation from a definition xml. My subsitemap in prodsearch:
> 
> <map:match pattern="itm/wer-sel.xsp">
> <map:generate src="itm/wer.xml"/>
> <-- include database queries with esql taglib -->
> <map:transform src="stylesheets/itm/itm-sel-db.xsl"/>    
> <map:serialize type="xml"/>
> </map:match>
> 
> In the second step I transform it to html
> 
> <map:match pattern="itm/wer-sel.html">
> <map:generate type="serverpages" src="cocoon:itm/wer-sel.xsp"/> <map:transform src="stylesheets/itm/itm-sel.xsl"/>
> <map:serialize type="html"/>
> </map:match>
> 
> If I (re)start the wikki the first call of this site is funktion properly 
> But on the second call i get this Error
> 
> Message: java.util.Locale
> Class: java.lang.ClassCastException
> Stacktrace: org.apache.cocoon.www.cocoon_.daisy.mscintra.ext.prodsearch.itm.wer_sel_xsp_pipelinehash__8625529294769213369.generate (org.apache.cocoon.www.cocoon_.daisy.mscintra.ext.prodsearch.itm.wer_sel_xsp_pipelinehash__8625529294769213369:1036)
> org.apache.cocoon.generation.ServerPagesGenerator.generate (ServerPagesGenerator.java:228)
> 
> I found the two generated files in
> 
> daisy-1.5-M2\daisywiki\webapp\WEB-INF\work\org\apache\cocoon\www\cocoon_\daisy\mscintra\ext\prodsearch\itm\
>    wer_sel_xsp_pipelinehash__8625529294769213369.class
>    wer_sel_xsp_pipelinehash__8625529294769213369.java
> 
> That seems ok.
> 
> 
> What is wrong in the configuration ?

<snip/>
> Message: java.util.Locale
> Class: java.lang.ClassCastException
> Stacktrace: org.apache.cocoon.www.cocoon_.daisy.mscintra.ext.prodsearch.itm.wer_sel_xsp_pipelinehash__8625529294769213369.generate (org.apache.cocoon.www.cocoon_.daisy.mscintra.ext.prodsearch.itm.wer_sel_xsp_pipelinehash__8625529294769213369:1036)

This is the problem.

Daisy sets both a session attribute and request attribute named "locale"
containing a java.util.Locale object. Maybe your XSP tries to get such
an attribute but expects there to be something else then a
java.util.Locale object, such as a string. This might be what is done on
line 1036 of the generated java file.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org                          bruno at apache.org



More information about the daisy mailing list