Setup managed bean in JSF 1.2 ----------------------------- Key: SHALE-475 URL: https://issues.apache.org/struts/browse/SHALE-475 Project: Shale Issue Type: Bug Components: Test Affects Versions: 1.0.4 Environment: Java 5, OS X 10.4.10, JSF 1.2 Reporter: Chris Keefer
When trying to add a managed bean to the Mock Faces Context a Missing Resource Exception is thrown. The test class extends AbstractJsfTestCase. The setUp method is the following: public void setUp() throws Exception { super.setUp(); // add managed bean _factory = application.getExpressionFactory(); _elContext = MockFacesContext.getCurrentInstance().getELContext(); ValueExpression expression = _factory.createValueExpression(_elContext, "#{leftNav}", LeftNav.class); MockServletContext context = (MockServletContext)session.getServletContext(); context.setDocumentRoot(new File(DOC_ROOT)); expression.setValue(_elContext, new LeftNav()); } The last line throws the MissingResourceException. java.util.MissingResourceException: Can't find bundle for base name leftNav, locale en_US at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805) at java.util.ResourceBundle.getBundle(ResourceBundle.java:576) at org.apache.shale.test.mock.MockApplication12.getResourceBundle(MockApplication12.java:261) at org.apache.shale.test.el.FacesResourceBundleELResolver.setValue(FacesResourceBundleELResolver.java:202) at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:283) at org.apache.shale.test.el.MockValueExpression.setValue(MockValueExpression.java:248) --Chris -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.