我正在使用Oficial RedHat tutorial编写SEAM集成测试。
运行任何测试异常时出现:
FAILED: testOperation java.lang.NullPointerException at java.lang.String.startsWith(String.java:1421) at java.lang.String.startsWith(String.java:1450) at org.ajax4jsf.webapp.WebXml.getFacesResourceKey(WebXml.java:189) at org.ajax4jsf.webapp.WebXml.getFacesResourceKey(WebXml.java:222) at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:139) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508) at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) at org.jboss.seam.mock.AbstractSeamTest$Request.run(AbstractSeamTest.java:491) at org.meveo.admin.action.TestOperation.testOperation(TestOperation.java:36) ... Removed 22 stack frames
我在互联网上发现了同样的问题,但没有解决方案:
如何解决此异常?
答案 0 :(得分:0)
设置网址格式:
<web:ajax4jsf-filter url-pattern="*.faces"/>
从这里开始:
http://seamframework.org/Community/RunningSeamMaven2TestNGTests