cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject JXTemplate is broken by implementing Recycable interface
Date Tue, 09 Oct 2007 20:19:57 GMT

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(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(

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
interface makes JXTemplateGenerator handled by our Avalon-Spring bridge instead of pure Spring
treated as an Avalon component.

Obviously, if component is treated as an Avalon bean the setter injection will not work causing
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
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

View raw message