You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Thangavel, Senthil Kumar (LNG-CON)" <Se...@lexisnexis.com.INVALID> on 2018/10/04 12:03:14 UTC

Migrating cocoon 2.1 project to 2.2

HI,
I am currently migrating the cocoon 2.1 based project to 2.2, while I tried to set it up with cocoon 2.2 I am running in to following issue while executing a transform pipeline.
Could some on help me to fix this issue and provide your expert advice. Thanks in advance.

I have tried with the below xslt configuration (placed in META-INF/cocoon/avalon/cocoon-core-saxon-xslt.xconf) but still the issue persists.

<?xml version="1.0" encoding="UTF-8"?> <components> <component role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon" class="org.apache.cocoon.components.xslt.TraxProcessor"> <parameter name="use-store" value="true"/> <parameter name="transformer-factory" value="net.sf.saxon.TransformerFactoryImpl"/> </component> </components>


Unable to get transformer handler for file:///C:/Users/thandakx/AppData/Local/Temp/Jetty_0_0_0_0_8323_webapp____i45n8s/blocks/custom-block/tabula-rasa/structure/transforms/tabula-rasa-index.xsl
        at <map:serialize type="xhtml"> - file:///C:/Users/thandakx/AppData/Local/Temp/Jetty_0_0_0_0_8323_webapp____i45n8s/blocks/custom-block/sitemap.xmap:255:36
        at <map:transform> - file:///C:/Users/thandakx/AppData/Local/Temp/Jetty_0_0_0_0_8323_webapp____i45n8s/blocks/custom-block/sitemap.xmap:241:72
        at <map:transform> - file:///C:/Users/thandakx/AppData/Local/Temp/Jetty_0_0_0_0_8323_webapp____i45n8s/blocks/custom-block/sitemap.xmap:218:81
        at <map:serialize type="xml"> - file:///C:/Users/thandakx/AppData/Local/Temp/Jetty_0_0_0_0_8323_webapp____i45n8s/blocks/custom-block/sitemap.xmap:195:32
        at <map:transform type="index"> - file:///C:/Users/thandakx/AppData/Local/Temp/Jetty_0_0_0_0_8323_webapp____i45n8s/blocks/custom-block/sitemap.xmap:194:34
        at <map:generate> - file:///C:/Users/thandakx/AppData/Local/Temp/Jetty_0_0_0_0_8323_webapp____i45n8s/blocks/custom-block/sitemap.xmap:193:112
        at <map:match> - file:///C:/Users/thandakx/AppData/Local/Temp/Jetty_0_0_0_0_8323_webapp____i45n8s/blocks/custom-block/sitemap.xmap:191:46
RequestURI=/custom-block/build-search/newadminportal/US/en_US/all

Caused by: javax.xml.transform.TransformerException: Could not find function: tokenize

        at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:610)

        at org.apache.xpath.compiler.XPathParser.FunctionCall(XPathParser.java:1507)

        at org.apache.xpath.compiler.XPathParser.PrimaryExpr(XPathParser.java:1446)

        at org.apache.xpath.compiler.XPathParser.FilterExpr(XPathParser.java:1345)

        at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1278)

        at org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1236)

        at org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1142)

        at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1063)

        at org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:1005)

        at org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:930)

        at org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:870)

        at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:834)

        at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:807)

        at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:790)

        at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:129)

        at org.apache.xpath.XPath.(XPath.java:227)

        at org.apache.xalan.processor.StylesheetHandler.createXPath(StylesheetHandler.java:152)

        at org.apache.xalan.processor.XSLTAttributeDef.processEXPR(XSLTAttributeDef.java:763)

        at org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.java:1405)

        at org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.java:1601)

        at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:355)

        at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:267)

        at org.apache.xalan.processor.ProcessorTemplateElem.startElement(ProcessorTemplateElem.java:78)

        at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:623)

        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)

Regards,
Senthilkumar.T

Re: Migrating cocoon 2.1 project to 2.2

Posted by gelo1234 <ge...@gmail.com>.
Hello Senthilkumar,

I think we have the 2-factor based problem here.

1 is that you use Xalan instead of Saxon in your Pipeline (error log shows
xalan package info not saxon)

2. is that it might adhere to Saxon version that you use. Old Saxon had
many features that new Saxon does NOT have unless you buy a license :)
Checkout different Saxon versions: http://saxon.sourceforge.net/

Old Saxon had many very nice features that now are only available  in
Saxon_PE/EE e.g. Saxon extensions (Java xsl support, etc.).

I suppose tokenize was out for some reason and only available in PE/EE? But
I might be wrong. Just a suggestion to take into account while hitting
against the wall.
Tokenize was part of xslt2.0, not xslt1.0 which is default for xalan in
default Cocoon config.

Greetings,
Greg