>
> Even Felix can now run our app without the known hassles and exceptions. But
> we don't know whether
> to migrate as now some of the CForm samples throw exceptions they didn't
> after my springification.
>
> Any ideas what caused the samples to stop working?
>
It seems that the JXGenerator stopped working.
Changing the generation part in the sitemap [1] from
<snip>
<map:match pattern="*-display-pipeline.jx">
<map:generate type="jx" src="forms/{1}_template.xml" label="content1">
<map:parameter name="locale" value="{flow-attribute:locale}" />
</map:generate>
</snip>
to
<map:match pattern="*-display-pipeline.jx">
<map:generate src="forms/{1}_template.xml" label="content1">
<map:parameter name="locale" value="{flow-attribute:locale}" />
</map:generate>
<map:transform type="jx" />
made sample working again.
It looks like the properties from the bean definition
(saxParser,scriptManager, ObjectModel) are not set when the
JXTemplateGenerator.setup(...) is called and therefor
this.startDocument = scriptManager.resolveTemplate(src);
throws Exception below because scriptManager = null.
Caused by: java.lang.NullPointerException
at
org.apache.cocoon.template.JXTemplateGenerator.setup(JXTemplateGenerator.java:117)
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:597)
at
org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:72)
at $Proxy9.setup(Unknown Source)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:341)
Felix
[1]
blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sitemap.xmap