I've been using the following BasePageTestCase with JSF 1.1 (MyFaces) for the
past couple of years.

http://tinyurl.com/yv68y7

An example test can be seen at http://tinyurl.com/yrajef - the most
important part being getManagedBean() in setUp().

After trying to migrate to MyFaces 1.2.0, I'm getting the following error:

ERROR - DefaultFacesInitializer.initFaces(126) | Error initializing MyFaces:
null
java.lang.NullPointerException
        at
org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
        at
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57)
        at
org.appfuse.web.BasePageTestCase.performFacesContextConfig(BasePageTestCase.java:57)
        at
org.appfuse.web.BasePageTestCase.<clinit>(BasePageTestCase.java:49)

This seems to be partially caused by MyFaces 1.2.0 requiring JSP 2.1
(http://tinyurl.com/yvh63s).

It seems that I may be fighting a losing battle and it may be better to
develop some sort of implementation agnostic BasePageTestCase. Is this what
shale-test provides? Does it offer a similar mechanism to get a managed-bean
with its Spring dependencies wired, or will it allow me to instantiate a
managed bean in some way? Or is it better to just mock test managed beans?

Thanks,

Matt
-- 
View this message in context: 
http://www.nabble.com/Creating-a-BasePageTestCase-that-works-with-JSF-1.2-tf4312472.html#a12277694
Sent from the Shale - User mailing list archive at Nabble.com.

Reply via email to