You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Lassi Immonen <li...@urova.fi> on 2000/11/01 09:36:58 UTC
[C2]AbstractMarkupLanguage still complaining.
Hi,
This is the same issue I thought before was only VisualAge problem, but
when I try our XSP test on different server (NT4) running Sun JDK1.3 I
get the same error (It comes with IBM:s JDK1.2.2 too):
>From Catalina log:
2000-10-31 13:09:21 StandardWrapperValve[Cocoon2]: Servlet.service() for
servlet Cocoon2 threw exception
java.lang.IllegalAccessError: try to access method
org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.addLogicsheet(Lorg/apache/cocoon/components/language/markup/LogicsheetCodeGenerator;Ljava/lang/String;Lorg/xml/sax/EntityResolver;)V
from class
org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage$XSPTransformerChainBuilderFilter
I have to change addLogicsheet to public to get rid of this error. After
that following works fine.
Sitemap:
<map:match pattern="hellotest">
<map:generate type="serverpages" src="digma/hello.xsp"/>
<map:transform src="digma/simple2html.xsl"/>
<map:serialize type="html"/>
</map:match>
hello.xsp:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-logicsheet href="digma/hello.xsl"?>
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-hello="http://digma.urova.fi/xsp/hello"
>
<content>
<para>
<xsp-hello:hello-world/>
</para>
</content>
</xsp:page>
hello.xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
version="1.0"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-hello="http://digma.urova.fi/xsp/hello"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="xsp:page">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsp:structure>
<xsp:include>java.util.*</xsp:include>
<xsp:include>java.text.*</xsp:include>
</xsp:structure>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="xsp-hello:hello-world">
Time is <xsp:expr>
SimpleDateFormat.getInstance().format(new Date())
</xsp:expr>
</xsl:template>
<xsl:template name="get-nested-content">
<xsl:param name="content"/>
<xsl:choose>
<xsl:when test="$content/*">
<xsl:apply-templates select="$content/*"/>
</xsl:when>
<xsl:otherwise>"<xsl:value-of select="$content"/>"</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="@*|*|text()|processing-instruction()">
<xsl:copy>
<xsl:apply-templates
select="@*|*|text()|processing-instruction()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Thanks,
Lassi Immonen