Hi

Following Giacomo's comment that Forms samples are broken I tried to run this 
sample:
http://localhost:8888/cocoon-forms-sample/form1.flow (first one in Forms 
samples)

I got following exception:
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)
[...]

After taking quick look on this problem I saw that JXTemplateGenerator is 
broken by the fact that it
implements (indirectly, by extending AbstractXMLProducer) Recycable interface. 
Implementing this
interface makes JXTemplateGenerator handled by our Avalon-Spring bridge instead 
of pure Spring and
treated as an Avalon component.

Obviously, if component is treated as an Avalon bean the setter injection will 
not work causing NPE
I showed above. I'm not sure if it's a bug in our bridge because the situation 
we are seeing now is
a conflict of two different concepts from two different worlds - singleton 
beans of Spring and
poolable component of Avalon.

Do you have an idea how to fix that? Maybe we should create new 
AbstractXMLProducer implementation
that is free of Avalon interfaces?

-- 
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/

Reply via email to