cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Coboos <cromo...@gmx.net>
Subject JXTemplate import + JSPGenerator = ClassCastException
Date Wed, 05 Jan 2005 22:46:08 GMT
Hello,

I'm importing a sitemap ressource within a JXTemplate using the 
<jxt:import/> element:

<jxt:import uri="cocoon:/test.jsp"/>

The according pipline parses a JSP an returns the result as XML:

      <map:match pattern="**.jsp">
         <map:generate type="jsp"  src="context://app/templates/{1}.jsp"/>
         <map:serialize type="xml"/>
      </map:match>

Using the protocol cocoon:/ to retrieve the JSP result causes an 
ClassCastException. Calling test.jsp directly (without JXTemplate) works 
well.

The stacktrace:

java.lang.ClassCastException
	at org.apache.jasper.compiler.JspRuntimeContext.<init>(JspRuntimeContext.java:95)
	at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:77)
	at org.apache.cocoon.components.jsp.JSPEngineImpl.executeJSP(JSPEngineImpl.java:71)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
	at $Proxy9.executeJSP(Unknown Source)
	at org.apache.cocoon.generation.JSPGenerator.generate(JSPGenerator.java:85)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:530)
	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:172)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:701)
	at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:415)
	at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:264)
	...

Thanks for your help.

Regards
Stephan






Mime
View raw message