cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geert Josten" <geert.jos...@daidalos.nl>
Subject RE: changing xslt processor to saxon
Date Wed, 04 Oct 2006 05:54:31 GMT
Dear Cindy,

The configuration looks allright to me. I see two possibilities:

1) Have you restarted Cocoon? (I reccon you have.) You need to restart
cocoon to activate changes to cocoon.xconf. And yes, your saxon.jar
should be placed into web-inf/lib. Unless the build process moves it
from lib/local to web-inf/lib automagically, but that would require a
rebuild. And if you are running in a webserver (instead with a
stand-alone Jetty configuration), you might need to redeploy your webapp
in there. Though..

2) I notice 'ClassCastException' in the stacktrace. Could it be that
another saxon.jar (older version perhaps) is placed in web-inf/lib,
webserver/lib(/endorsed) or jvm/lib(/endorsed)? Make sure only one
version is in web-inf/lib. If another (older) version of saxon in found
in webserver or jvm lib, try using paranoid class loader. That will give
priority to libraries in web-inf/lib.

Kind regards,
Geert

> 
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen,
verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
 

> Van: Cindy Girard [mailto:clm6u@virginia.edu] 
> Verzonden: dinsdag 3 oktober 2006 19:18
> Aan: users@cocoon.apache.org
> Onderwerp: changing xslt processor to saxon
> 
> Hi,
> 
>   I'm trying to use saxon as my XSLT processor instead of Xalan (for
>   now, in the matching instead of as the default), and
>   I'm getting the following error:
> 
> Message: Lookup of transformer 'xslt-saxon' failed at 
> <map:transform type="xslt-saxon"> -
> file:/C:/webserver_new/cocoon-2.1.8/build/webapp/sitemap.xmap:925:84
> 
> Description: org.apache.cocoon.ProcessingException: Lookup of 
> transformer 'xslt-saxon'
> failed at <map:transform type="xslt-saxon"> -
> file:/C:/webserver_new/cocoon-2.1.8/build/webapp/sitemap.xmap:925:84
> 
> Sender: org.apache.cocoon.servlet.CocoonServlet
> 
>   I've read through the directions, and looked in the archives of the
>   list, but I must be missing something.
> 
>   Any help would be appreciated.
> 
>   Thanks,
>   Cindy Girard
>   clm6u@virginia.edu
> 
> 
> 
>   I'm using cocoon-2.1.8 and saxon 8.8.
> 
>   I put saxon8.jar in:
>   C:\webserver_new\cocoon-2.1.8\lib\local
>   and
>   C:\webserver_new\cocoon-2.1.8\build\webapp\WEB-INF\lib
>   (I didn't think it was supposed to go here, but I get an error if
>   it's not.)
>   
>   edited cocoon.xconf:
> 
>    <component logger="core.xslt-processor"
>  role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon"
>  class="org.apache.cocoon.components.xslt.XSLTProcessorImpl">
>     
>     <parameter name="use-store" value="true"/>
>     
>     <parameter name="incremental-processing" value="false"/>
>     <parameter name="transformer-factory" 
> value="net.sf.saxon.TransformerFactoryImpl"/>
>  
>     </component>
>     
> 
>     edited sitemap.xmap:
>     <map:transformer name="xslt-saxon" pool-grow="2" 
> pool-max="32" pool-min="8" 
> src="org.apache.cocoon.transformation.TraxTransformer">
>       <use-request-parameters>true</use-request-parameters>
>       <use-session-parameters>false</use-session-parameters>
>       <use-cookie-parameters>false</use-cookie-parameters>
>       <xslt-processor-role>saxon</xslt-processor-role>
>       <check-includes>true</check-includes>
>     </map:transformer>
>     .
>     .
>     .
>      <map:match pattern="utc_firstkwd">
>        <map:generate src="utc_firstkwd.xq" type="xquery"/>
>           <map:transform type="xslt-saxon" 
> src="stylesheets/utc/utc_topcats_display.xsl"/>
>        <map:serialize type="html"/>
>           <!-- map:serialize type="xml"/ -->
>      </map:match>
> 
> 
>      full error:
> Message: Lookup of transformer 'xslt-saxon' failed at 
> <map:transform type="xslt-saxon"> - 
> file:/C:/webserver_new/cocoon-2.1.8/build/webapp/sitemap.xmap:925:84
> 
> Description: org.apache.cocoon.ProcessingException: Lookup of 
> transformer 'xslt-saxon' failed at <map:transform 
> type="xslt-saxon"> - 
> file:/C:/webserver_new/cocoon-2.1.8/build/webapp/sitemap.xmap:925:84
> 
> Sender: org.apache.cocoon.servlet.CocoonServlet
> 
> Source: Cocoon Servlet
> 
> Request URI
> 
> utc_firstkwd
> 
> cause
> 
> java.lang.ClassCastException
> 
> request-uri
> 
> /utc_firstkwd
> 
> full exception chain stacktrace
> 
> org.apache.cocoon.ProcessingException: Lookup of transformer 
> 'xslt-saxon' failed
>         at <map:transform type="xslt-saxon"> - 
> file:/C:/webserver_new/cocoon-2.1.8/build/webapp/sitemap.xmap:925:84
>         at 
> org.apache.cocoon.ProcessingException.throwLocated(ProcessingE
> xception.java:112)
>         at 
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeli
> ne.addTransformer(AbstractProcessingPipeline.java:275)
>         at 
> org.apache.cocoon.components.pipeline.impl.AbstractCachingProc
> essingPipeline.addTransformer(AbstractCachingProcessingPipelin
> e.java:153)
>         at 
> org.apache.cocoon.components.treeprocessor.sitemap.TransformNo
> de.invoke(TransformNode.java:59)
>         at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:46)
>         at 
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableM
> atchNode.invoke(PreparableMatchNode.java:130)
>         at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:68)
>         at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> e.invoke(PipelineNode.java:142)
>         at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:68)
>         at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> de.invoke(PipelinesNode.java:92)
>         at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:234)
>         at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:176)
>         at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreeProcessor.java:248)
>         at org.apache.cocoon.Cocoon.process(Cocoon.java:679)
>         at 
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.
> java:1154)
>         at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
>         at 
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebAp
> plicationHandler.java:294)
>         at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler
> .java:567)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
>         at 
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebAppl
> icationContext.java:525)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
>         at org.mortbay.http.HttpServer.service(HttpServer.java:879)
>         at 
> org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
>         at 
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
>         at 
> org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
>         at 
> org.mortbay.http.SocketListener.handleConnection(SocketListene
> r.java:218)
>         at 
> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
>         at 
> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
> Caused by: 
> org.apache.avalon.framework.component.ComponentException: 
> transformers: ComponentSelector could not access the 
> Component for hint [xslt-saxon] (key [xslt-saxon])
>         at 
> org.apache.avalon.excalibur.component.ExcaliburComponentSelect
> or.select(ExcaliburComponentSelector.java:231)
>         at 
> org.apache.cocoon.components.ExtendedComponentSelector.select(
> ExtendedComponentSelector.java:262)
>         at 
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeli
> ne.addTransformer(AbstractProcessingPipeline.java:272)
>         ... 27 more
> Caused by: java.lang.ClassCastException
>         at 
> org.apache.cocoon.transformation.TraxTransformer.configure(Tra
> xTransformer.java:259)
>         at 
> org.apache.avalon.framework.container.ContainerUtil.configure(
> ContainerUtil.java:201)
>         at 
> org.apache.avalon.excalibur.component.DefaultComponentFactory.
> newInstance(DefaultComponentFactory.java:289)
>         at 
> org.apache.avalon.excalibur.pool.InstrumentedResourceLimitingP
> ool.newPoolable(InstrumentedResourceLimitingPool.java:655)
>         at 
> org.apache.avalon.excalibur.pool.InstrumentedResourceLimitingP
> ool.get(InstrumentedResourceLimitingPool.java:371)
>         at 
> org.apache.avalon.excalibur.component.PoolableComponentHandler
> .doGet(PoolableComponentHandler.java:198)
>         at 
> org.apache.avalon.excalibur.component.ComponentHandler.get(Com
> ponentHandler.java:381)
>         at 
> org.apache.avalon.excalibur.component.ExcaliburComponentSelect
> or.select(ExcaliburComponentSelector.java:215)
>         ... 29 more
> 
> stacktrace
> 
> java.lang.ClassCastException
>         at 
> org.apache.cocoon.transformation.TraxTransformer.configure(Tra
> xTransformer.java:259)
>         at 
> org.apache.avalon.framework.container.ContainerUtil.configure(
> ContainerUtil.java:201)
>         at 
> org.apache.avalon.excalibur.component.DefaultComponentFactory.
> newInstance(DefaultComponentFactory.java:289)
>         at 
> org.apache.avalon.excalibur.pool.InstrumentedResourceLimitingP
> ool.newPoolable(InstrumentedResourceLimitingPool.java:655)
>         at 
> org.apache.avalon.excalibur.pool.InstrumentedResourceLimitingP
> ool.get(InstrumentedResourceLimitingPool.java:371)
>         at 
> org.apache.avalon.excalibur.component.PoolableComponentHandler
> .doGet(PoolableComponentHandler.java:198)
>         at 
> org.apache.avalon.excalibur.component.ComponentHandler.get(Com
> ponentHandler.java:381)
>         at 
> org.apache.avalon.excalibur.component.ExcaliburComponentSelect
> or.select(ExcaliburComponentSelector.java:215)
>         at 
> org.apache.cocoon.components.ExtendedComponentSelector.select(
> ExtendedComponentSelector.java:262)
>         at 
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeli
> ne.addTransformer(AbstractProcessingPipeline.java:272)
>         at 
> org.apache.cocoon.components.pipeline.impl.AbstractCachingProc
> essingPipeline.addTransformer(AbstractCachingProcessingPipelin
> e.java:153)
>         at 
> org.apache.cocoon.components.treeprocessor.sitemap.TransformNo
> de.invoke(TransformNode.java:59)
>         at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:46)
>         at 
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableM
> atchNode.invoke(PreparableMatchNode.java:130)
>         at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:68)
>         at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> e.invoke(PipelineNode.java:142)
>         at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:68)
>         at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> de.invoke(PipelinesNode.java:92)
>         at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:234)
>         at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:176)
>         at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreeProcessor.java:248)
>         at org.apache.cocoon.Cocoon.process(Cocoon.java:679)
>         at 
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.
> java:1154)
>         at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
>         at 
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebAp
> plicationHandler.java:294)
>         at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler
> .java:567)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
>         at 
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebAppl
> icationContext.java:525)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
>         at org.mortbay.http.HttpServer.service(HttpServer.java:879)
>         at 
> org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
>         at 
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
>         at 
> org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
>         at 
> org.mortbay.http.SocketListener.handleConnection(SocketListene
> r.java:218)
>         at 
> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
>         at 
> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
>      
>   
> 
> -----
> - Cindy  
> 
> Cynthia M. Girard
> IATH, University of Virginia
> clm6u@virginia.edu
> 
> "Danger? I laugh in the face of danger!
> ...and then I hide until it goes away."
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

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


Mime
View raw message