-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Grzegorz Kossakowski wrote:
> 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?

An Avalon-free AbstractXMLProducer might solve these problems for short term 
migrations but at the
end we probably need new concepts (as mentioned by Daniel in a previous mail).

Ciao

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFHDIq5LNdJvZjjVZARAsuIAJ9Nj4roBO9R310m9rZkLCHt5WUVoACg47Ci
E7QxpTqakqiPHEXa5TWorpg=
=D6JQ
-----END PGP SIGNATURE-----

Reply via email to