Hello, Is anybody else getting this sort of an error in 2.1m2 or 2.1cvs (shown below the main text of this message)? I went through the Cocoon sources for TraxTransformer, which led me to XSLTProcessorImpl from Avalon-Excalibur and the piece of code I found (around XSLTProcessorImpl.java:320) indicated that the Templates instance obtained from the TemplateHandler is null, which of course propogated to the message seen below. This leads me to believe that there is a problem with the stylesheet, but there really isn't. It's just a modified version of dynamic-page2html.xsl from Cocoon itself, and has worked for me up until I tried upgrading to m2 or cvs.
Here's where the problem (see messages below) gets worse. I have another webapp, also built on 2.1m2, and when they are running side by side in the same tomcat container, the other one works and this one doesn't. They each have some (separate) XSLTs that they use for rendering. They both have the exact same set of components included and the same set excluded (commented-out) from the default cocoon.xconf. Their logkit.xconf and instrumentation.xconf files are identical. Their web.xml files are the same except for the application display-name. Finally, their sets of jar-files in WEB-INF/lib are identifical. I know most of these details will have nothing to do with the problem, but I thought I'd include them anyway. I've also attached the stylesheet that I get the error for, and the stylesheets that it includes. I don't know if other stylesheets get the same error and it is not specific to this one because the remaining pipelines are behind auth-protect actions and I haven't yet taken the time to move some to un-protected pipelines/matches so that they could be tested for the problem (and a lot of them depend on auth-contexts anyway). This seems like such a fundamental type of problem that I must be missing something. Can anybody with experience with these newer versions of cocoon see what might be my problem? TIA /S Relevant info: Windows XP Java 1.4.1_02 Tomcat 4.1.24 (LE-jdk14) Cocoon 2.1m2 (2.1cvs has been tried as well) Here is the page-output for the error: --------------------->8----------------------------------------------------- Message: null Description: No details available. Sender: org.apache.cocoon.servlet.CocoonServlet Source: Cocoon Servlet Request URI loginpage cause Unable to create templates for stylesheet: file:/path/to/stylesheets/blah.xsl request-uri /my-app/loginpage ----------------------8<---------------------------------------------------- Here are the details from error.log: --------------------->8----------------------------------------------------- org.apache.cocoon.ProcessingException: Unable to get transformer handler for stylesheets/blah.xsl: org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception in creating Transform Handler at org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:307) (more traceback left out...) Caused by: org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception in creating Transform Handler at org.apache.excalibur.xml.xslt.XSLTProcessorImpl.getTransformerHandlerAndValidity(XSLTProcessorImpl.java:380) at org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:302) ... 45 more Caused by: org.apache.excalibur.xml.xslt.XSLTProcessorException: Unable to create templates for stylesheet: file:/path/to/stylesheets/blah.xsl at org.apache.excalibur.xml.xslt.XSLTProcessorImpl.getTransformerHandlerAndValidity(XSLTProcessorImpl.java:320) ... 46 more org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception in creating Transform Handler at org.apache.excalibur.xml.xslt.XSLTProcessorImpl.getTransformerHandlerAndValidity(XSLTProcessorImpl.java:380) (more traceback left out...) Caused by: org.apache.excalibur.xml.xslt.XSLTProcessorException: Unable to create templates for stylesheet: file:/path/to/stylesheets/blah.xsl at org.apache.excalibur.xml.xslt.XSLTProcessorImpl.getTransformerHandlerAndValidity(XSLTProcessorImpl.java:320) ... 46 more ----------------------8<---------------------------------------------------- -- Steven Cummings Columbia, MO Email: [EMAIL PROTECTED] AIM: cummingscs ICQ: 3330114 MSN: [EMAIL PROTECTED] __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- This stylesheet was taken from the example cocoon web-application. --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsp-request="http://apache.org/xsp/request/2.0"> <xsl:include href="simple-page2html.xsl"/> <xsl:template match="xsp-request:uri"> <b><xsl:value-of select="."/></b> </xsl:template> <xsl:template match="xsp-request:parameter"> <i><xsl:value-of select="@name"/></i>:<b><xsl:value-of select="."/></b> </xsl:template> <xsl:template match="xsp-request:parameter-values"> <p>Parameter Values for "<xsl:value-of select="@name"/>":</p> <ul> <xsl:for-each select="xsp-request:value"> <li> <xsl:value-of select="."/> </li> </xsl:for-each> </ul> </xsl:template> <xsl:template match="xsp-request:parameter-names"> <p>All Parameter Names:</p> <ul> <xsl:for-each select="xsp-request:name"> <li> <xsl:value-of select="."/> </li> </xsl:for-each> </ul> </xsl:template> <xsl:template match="xsp-request:headers"> <p>Headers:</p> <ul> <xsl:for-each select="xsp-request:header"> <li> <i><xsl:value-of select="@name"/></i>: <b><xsl:value-of select="."/></b> </li> </xsl:for-each> </ul> <br/> </xsl:template> <xsl:template match="xsp-request:header"> <i><xsl:value-of select="@name"/></i>:<b><xsl:value-of select="."/></b> </xsl:template> <xsl:template match="xsp-request:header-names"> <p>All Header names:</p> <ul> <xsl:for-each select="xsp-request:name"> <li> <xsl:value-of select="."/> </li> </xsl:for-each> </ul> </xsl:template> <xsl:template match="@*|node()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
<?xml version="1.0"?> <!-- Steven Cummings [EMAIL PROTECTED] Stylesheet for transforming static content into HTML pages. Usually the content is a file or the result of XSP generation (not really static). --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html"/> <xsl:include href="simple-xml2html.xsl"/> <xsl:template match="page"> <html> <head> <xsl:if test="title"> <title><xsl:value-of select="title"/></title> </xsl:if> <link rel="Stylesheet" href="main.css"/> </head> <body> <xsl:if test="menu"> <table class="page_layout"> <tr valign="top"> <td class="header" colspan="2"> <!-- <xsl:if test="menu"> <xsl:attribute name="colspan">2</xsl:attribute> </xsl:if> --> <xsl:if test="title"> <h2><xsl:value-of select="title"/></h2> </xsl:if> <xsl:apply-templates select="header/*"/> </td> </tr> <tr valign="top"> <xsl:if test="menu"> <td class="sidebar"> <xsl:apply-templates select="menu/*"/> </td> </xsl:if> <td> <xsl:if test="menu"> <xsl:attribute name="class">page_content</xsl:attribute> </xsl:if> <xsl:call-template name="page-content"/> </td> </tr> </table> </xsl:if> <xsl:if test="not(menu)"> <xsl:call-template name="page-content"/> </xsl:if> </body> </html> </xsl:template> <xsl:template name="page-content"> <xsl:if test="title and not(menu)"> <h2><xsl:value-of select="title"/></h2> </xsl:if> <xsl:apply-templates select="content/*"/> <xsl:apply-templates select="author"/> <xsl:apply-templates select="last-updated"/> </xsl:template> <xsl:template match="author"> <xsl:choose> <xsl:when test="email and name"> <hr/> <a> <xsl:attribute name="href">mailto:<xsl:value-of select="normalize-space(email)"/></xsl:attribute> <xsl:value-of select="normalize-space(name)"/> </a><br/> </xsl:when> <xsl:when test="email"> <hr/> <a> <xsl:attribute name="href">mailto:<xsl:value-of select="normalize-space(email)"/></xsl:attribute> <xsl:value-of select="normalize-space(email)"/> </a><br/> </xsl:when> <xsl:when test="name"> <hr/> <xsl:value-of select="normalize-space(name)"/><br/> </xsl:when> </xsl:choose> </xsl:template> <xsl:template match="last-updated"> <xsl:if test="not(../author)"> <hr/> </xsl:if> <xsl:value-of select="."/><br/> </xsl:template> <xsl:template match="section"> <xsl:choose> <xsl:when test="title"> <h3><xsl:value-of select="title"/></h3> </xsl:when> <xsl:when test="subtitle"> <h4><xsl:value-of select="subtitle"/></h4> </xsl:when> <xsl:when test="subsubtitle"> <h5><xsl:value-of select="subsubtitle"/></h5> </xsl:when> <xsl:when test="subsubsubtitle"> <h6><xsl:value-of select="subsubsubtitle"/></h6> </xsl:when> </xsl:choose> <xsl:apply-templates/> </xsl:template> <xsl:template match="paragraph"> <p> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="message"> <div class="message"> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="error-message"> <div class="error"> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="grid-layout|table"> <table cellspacing="0" cellpadding="0" border="0"> <xsl:apply-templates/> </table> </xsl:template> <xsl:template match="row"> <tr valign="top"> <xsl:apply-templates/> </tr> </xsl:template> <xsl:template match="cell"> <td valign="top"> <xsl:apply-templates/> </td> </xsl:template> <xsl:template match="list"> <ul> <xsl:apply-templates/> </ul> </xsl:template> <xsl:template match="item"> <li> <xsl:apply-templates/> </li> </xsl:template> <xsl:template match="code|source|syntax"> <pre> <xsl:apply-templates/> </pre> </xsl:template> <xsl:template match="bold"> <b><xsl:apply-templates/></b> </xsl:template> <xsl:template match="italics"> <i><xsl:apply-templates/></i> </xsl:template> <xsl:template match="underline"> <u><xsl:apply-templates/></u> </xsl:template> <xsl:template match="xml-document"> <xsl:call-template name="xml-document"/> </xsl:template> <xsl:template match="link"> <a href="[EMAIL PROTECTED]"> <!-- <xsl:if test="@title"> <xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute> </xsl:if> --> <xsl:apply-templates select="@*[not(local-name()='uri')]"/> <xsl:value-of select="."/> </a> </xsl:template> <xsl:template match="@*|node()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
<!-- | | XSLT REC Compliant Version of IE5 Default Stylesheet | | Original version by Jonathan Marsh ([EMAIL PROTECTED]) | http://msdn.microsoft.com/xml/samples/defaultss/defaultss.xsl | | Conversion to XSLT 1.0 REC Syntax by Steve Muench ([EMAIL PROTECTED]) | +============================================================================ | Steven Cummings | 2002-11-15 | | Updated to render embedded content by keeping a "rendering" mode | (mode="xml"). +--> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="no" method="html"/> <xsl:template name="xml-document"> <div> <SCRIPT> <xsl:comment><![CDATA[ function f(e){ if (e.className=="ci") { if (e.children(0).innerText.indexOf("\n")>0) fix(e,"cb"); } if (e.className=="di") { if (e.children(0).innerText.indexOf("\n")>0) fix(e,"db"); } e.id=""; } function fix(e,cl){ e.className=cl; e.style.display="block"; j=e.parentElement.children(0); j.className="c"; k=j.children(0); k.style.visibility="visible"; k.href="#"; } function ch(e) { mark=e.children(0).children(0); if (mark.innerText=="+") { mark.innerText="-"; for (var i=1;i<e.children.length;i++) { e.children(i).style.display="block"; } } else if (mark.innerText=="-") { mark.innerText="+"; for (var i=1;i<e.children.length;i++) { e.children(i).style.display="none"; } } } function ch2(e) { mark=e.children(0).children(0); contents=e.children(1); if (mark.innerText=="+") { mark.innerText="-"; if (contents.className=="db"||contents.className=="cb") { contents.style.display="block"; } else { contents.style.display="inline"; } } else if (mark.innerText=="-") { mark.innerText="+"; contents.style.display="none"; } } function cl() { e=window.event.srcElement; if (e.className!="c") { e=e.parentElement; if (e.className!="c") { return; } } e=e.parentElement; if (e.className=="e") { ch(e); } if (e.className=="k") { ch2(e); } } function ex(){} function h(){window.status=" ";} document.onclick=cl; ]]> </xsl:comment> </SCRIPT> <STYLE> BODY {font:x-small 'Verdana'; margin-right:1.5em} .c {cursor:hand} .b {color:red; font-family:'Courier New'; font-weight:bold; text-decoration:none} .e {margin-left:1em; text-indent:-1em; margin-right:1em} .k {margin-left:1em; text-indent:-1em; margin-right:1em} .t {color:#990000} .xt {color:#990099} .ns {color:red} .dt {color:green} .m {color:blue} .tx {font-weight:bold} .db {text-indent:0px; margin-left:1em; margin-top:0px; margin-bottom:0px;padding-left:.3em; border-left:1px solid #CCCCCC; font:small Courier} .di {font:small Courier} .d {color:blue} .pi {color:blue} .cb {text-indent:0px; margin-left:1em; margin-top:0px; margin-bottom:0px;padding-left:.3em; font:small Courier; color:#888888} .ci {font:small Courier; color:#888888} PRE {margin:0px; display:inline} </STYLE> <xsl:apply-templates mode="xml"/> </div> </xsl:template> <xsl:template match="processing-instruction()" mode="xml"> <DIV class="e"> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text><?</xsl:text> </SPAN> <SPAN class="pi"> <xsl:value-of select="name(.)"/> <xsl:value-of select="."/> </SPAN> <SPAN class="m"> <xsl:text>?></xsl:text> </SPAN> </DIV> </xsl:template> <xsl:template match="processing-instruction('xml')" mode="xml"> <DIV class="e"> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text><?</xsl:text> </SPAN> <SPAN class="pi"> <xsl:text>xml </xsl:text> <xsl:for-each select="@*"> <xsl:value-of select="name(.)"/> <xsl:text>="</xsl:text> <xsl:value-of select="."/> <xsl:text>" </xsl:text> </xsl:for-each> </SPAN> <SPAN class="m"> <xsl:text>?></xsl:text> </SPAN> </DIV> </xsl:template> <xsl:template match="@*" mode="xml"> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*/@*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> </SPAN> <SPAN class="m">="</SPAN> <B> <xsl:value-of select="."/> </B> <SPAN class="m">"</SPAN> </xsl:template> <xsl:template match="text()" mode="xml"> <DIV class="e"> <SPAN class="b"> </SPAN> <SPAN class="tx"> <xsl:value-of select="."/> </SPAN> </DIV> </xsl:template> <xsl:template match="comment()" mode="xml"> <DIV class="k"> <SPAN> <A STYLE="visibility:hidden" class="b" onclick="return false" onfocus="h()">-</A> <SPAN class="m"> <xsl:text><!--</xsl:text> </SPAN> </SPAN> <SPAN class="ci" id="clean"> <PRE> <xsl:value-of select="."/> </PRE> </SPAN> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text>--></xsl:text> </SPAN> <SCRIPT>f(clean);</SCRIPT> </DIV> </xsl:template> <xsl:template match="*" mode="xml"> <DIV class="e"> <DIV STYLE="margin-left:1em;text-indent:-2em"> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"><</SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> <xsl:if test="@*"> <xsl:text> </xsl:text> </xsl:if> </SPAN> <xsl:apply-templates select="@*" mode="xml"/> <SPAN class="m"> <xsl:text>/></xsl:text> </SPAN> </DIV> </DIV> </xsl:template> <xsl:template match="*[node()]" mode="xml"> <DIV class="e"> <DIV class="c"> <A class="b" href="#" onclick="return false" onfocus="h()">-</A> <SPAN class="m"><</SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> <xsl:if test="@*"> <xsl:text> </xsl:text> </xsl:if> </SPAN> <xsl:apply-templates select="@*" mode="xml"/> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> </DIV> <DIV> <xsl:apply-templates mode="xml"/> <DIV> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text></</xsl:text> </SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> </SPAN> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> </DIV> </DIV> </DIV> </xsl:template> <xsl:template match="*[text() and not (comment() or processing-instruction())]" mode="xml"> <DIV class="e"> <DIV STYLE="margin-left:1em;text-indent:-2em"> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text><</xsl:text> </SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> <xsl:if test="@*"> <xsl:text> </xsl:text> </xsl:if> </SPAN> <xsl:apply-templates select="@*" mode="xml"/> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> <SPAN class="tx"> <xsl:value-of select="."/> </SPAN> <SPAN class="m"></</SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> </SPAN> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> </DIV> </DIV> </xsl:template> <xsl:template match="*[*]" priority="20" mode="xml"> <DIV class="e"> <DIV STYLE="margin-left:1em;text-indent:-2em" class="c"> <A class="b" href="#" onclick="return false" onfocus="h()">-</A> <SPAN class="m"><</SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> <xsl:if test="@*"> <xsl:text> </xsl:text> </xsl:if> </SPAN> <xsl:apply-templates select="@*" mode="xml"/> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> </DIV> <DIV> <xsl:apply-templates mode="xml"/> <DIV> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text></</xsl:text> </SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> </SPAN> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> </DIV> </DIV> </DIV> </xsl:template> <xsl:template name="nbsp-ref" mode="xml"> <xsl:text> </xsl:text> </xsl:template> </xsl:stylesheet>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]