JSFUnit on JBoss 4.2.2
wvdenhau Jan 14, 2008 11:53 AMHey there,
I am trying out JSFUnit with a small test case but am getting following stack trace upon executing:
java.lang.NullPointerException
at org.jboss.jsfunit.facade.JSFServerSession.getCurrentViewID(JSFServerSession.java:60)
at net.link.safeonline.helpdesk.HelpdeskTest.testInitialPage(HelpdeskTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:168)
I followed the information on configuration of my web.xml so that one should be ok imo.
The unit test is basically a copy of the hello world example provided.
My application server log does not reveal anything disturbing but following line:
17:31:50,134 ERROR [STDERR] Jan 14, 2008 5:31:50 PM org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl _populateUnknownAgentImpl
WARNING: The User-Agent "httpunit/1.5" is unknown; creating an agent with "unknown" agent attributes.
Also trinidad and tomahawk are used on some pages in this webapp but not at the page I am trying jsfunit out on.
So in my web.xml I have the following context param's :
<context-param>
<param-name>
org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name>
org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE
</param-name>
<param-value>false</param-value>
</context-param>
and following filters:
<filter>
<filter-name>trinidad</filter-name>
<filter-class>
org.apache.myfaces.trinidad.webapp.TrinidadFilter
</filter-class>
</filter>
and servlet ...
<servlet>
<servlet-name>resources</servlet-name>
<servlet-class>
org.apache.myfaces.trinidad.webapp.ResourceServlet
</servlet-class>
</servlet>
Any ideas ?
Best Regards,
W.