You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Papaioannou, Todd" <tp...@ncr.com> on 2006/03/24 00:47:28 UTC

More than one Facelets portlet causes an exception

I have two portlets that both work when they are loaded into my portal
on their own. I can hammer them to my heart's content as long as only
one is loaded. When I load the second one and try to click on any link,
or do any type of action, the follow exception gets thrown:

Caused by: java.lang.ClassCastException:
com.sun.facelets.el.LegacyELContext
	at com.sun.facelets.el.ELAdaptor.getELContext(ELAdaptor.java:48)
	at
com.sun.facelets.impl.DefaultFaceletContext.<init>(DefaultFaceletContext
.java:82)
	at
com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:91)
	at
com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:41
8)
	at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:4
52)
	at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352
)
	at
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGene
ricPortlet.java:396)
	... 128 more

It's unclear to me why there would be a class cast exception since I
have checked that every jar dotted around the place is the same version.

I even tried to take all the jars that would have been in WEB-INF/lib
and stick them into tomcat/common/lib/ext but then I get the following
error:

Caused by: java.lang.IllegalAccessError: tried to access field
com.sun.facelets.FaceletViewHandler$NullWriter.Instance from class
com.sun.facelets.FaceletPortletViewHandler.

I guess this precludes the facelet.jar file being loaded by a different
class loader.

I am using facelets 1.1.0a1 and myfaces 1.1.1.

Any ideas what's causing this, or any suggestions on how to resolve it?
Needless to say, this is quite a show stopper!

Thanks

Todd