Error when deployed as ear
Hello all, I have a strange problem with a JSF project that uses myfaces and shale. I'm using Netbeans 5.5 and the Sun App Server 9, and all works fine when the web application is deployed independently as a war, but when deploy the full ear i have the following error: java.lang.NullPointerException at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:75) ... at org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.java:450) . I'm using a 'mock' application with no complex ejbs and jsps, so I discard a component problem. Someone have experimented this problem? Thanks in advance.
Re: How to use ConfigParser()?
I found the problem. The test was using a Tomahawk component. Since the ConfigParser does not load Tomahawk's JSF configuration, the render was not defined. My concerns around the absents of FacesContext where unfounded because the context is not need when adding renderers. Paul Spencer Paul Spencer wrote: I am trying to convert a test utility method that adds renders and other JSF components to the ConfigParser in 1.1.0-SNAPSHOT, but I getting nulls from context.getRenderKit().getRenderer(...) I have added the following in the utility method, which is NOT in an class that extends any of the shale abstract test classes. The method is called by the test's setUp() after super.setUp(). ConfigParser parser = new ConfigParser(); URL[] urls = parser.getPlatformURLs(); parser.parse(urls); Where the prior addRender() method passed FacesContext, I am not passing it to the ConfigParser. Is this the problem? See the addDefaultRenderers() method in the test utility class [1] for a more complete example. Paul Spencer [1]http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/test/utils/TestUtils.java?view=markup