I have recently tried to use Groovy 1.7.3 with JSF2 (Mojarra 2.0.2)
and Tomcat 6.0.26
following instructions outlined in
http://blogs.sun.com/rlubke/entry/groovy_mojarra
I have found that it is not working.
Besides obvious problem not having FacesContext in Filter class
(com.sun.faces.scripting.GroovySupportFilter),
there is problems with class loader overriding -
> java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.render.RenderKitFactory
> Bean or property class sample.SimpleBean for managed bean bean cannot be found.
As far as I understand, Mojarra dislikes being initialized with one
classloader, and then invoked as FacesServlet with another.
The only solution I found is to override classloader at the
application server level (by specifying application server specific
ClassLoader instance).
Can be this Groovy support be updated to work with JSF2? This is
really good feature for development purposes.
With kindest personal regards,
Ruslan Gainutdinov
<ruslanfg_at_gmail.com>