JSFUnit异常

使用JSFUnit进行测试。

页面报错:

500 Internal Server Error for http://localhost:8083/testjsf/pages/proxy/listProxy.faces


 

com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 Internal Server Error for http://localhost:8083/testjsf/pages/proxy/listProxy.faces
at com.gargoylesoftware.htmlunit.WebClient.throwFailingHttpStatusCodeExceptionIfNecessary(WebClient.java:531)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:308)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:369)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:354)
at org.jboss.jsfunit.framework.SimpleInitialRequestStrategy.doInitialRequest(SimpleInitialRequestStrategy.java:48)
at org.jboss.jsfunit.framework.WebClientSpec.doInitialRequest(WebClientSpec.java:259)
at org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:81)
at org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:58)
at JSFUnitTest.setUp(JSFUnitTest.java:23)
at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

 

console

 

2010-12-03 15:11:48.207::WARN:  EXCEPTION 

java.lang.IllegalStateException: No SessionHandler or SessionManager

at org.mortbay.jetty.Request.getSession(Request.java:1022)

at com.sun.faces.context.ExternalContextImpl.getSession(ExternalContextImpl.java:151)

at org.jboss.jsfunit.context.JSFUnitExternalContext.<init>(JSFUnitExternalContext.java:112)

at org.jboss.jsfunit.context.JSFUnitFacesContext.release(JSFUnitFacesContext.java:229)

at com.sun.faces.application.WebappLifecycleListener.requestDestroyed(WebappLifecycleListener.java:126)

at com.sun.faces.config.ConfigureListener.requestDestroyed(ConfigureListener.java:346)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:735)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

2010-12-03 15:11:49.973::WARN:  EXCEPTION 

java.lang.NullPointerException

at org.mortbay.jetty.HttpFields$1.hasMoreElements(HttpFields.java:227)

at com.sun.faces.context.BaseContextMap$BaseIterator.hasNext(BaseContextMap.java:225)

at com.sun.faces.context.BaseContextMap$BaseSet.size(BaseContextMap.java:150)

at java.util.Collections$UnmodifiableCollection.size(Unknown Source)

at java.util.AbstractMap.size(Unknown Source)

at java.util.Collections$UnmodifiableMap.size(Unknown Source)

at java.util.HashMap.<init>(Unknown Source)

at org.jboss.jsfunit.context.JSFUnitExternalContext.<init>(JSFUnitExternalContext.java:97)

at org.jboss.jsfunit.context.JSFUnitFacesContext.release(JSFUnitFacesContext.java:229)

at com.sun.faces.application.WebappLifecycleListener.requestDestroyed(WebappLifecycleListener.java:126)

at com.sun.faces.config.ConfigureListener.requestDestroyed(ConfigureListener.java:346)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:735)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

2010-12-03 15:11:49.095::WARN:  EXCEPTION 

java.lang.NullPointerException

at org.mortbay.jetty.HttpFields$1.hasMoreElements(HttpFields.java:227)

at com.sun.faces.context.BaseContextMap$BaseIterator.hasNext(BaseContextMap.java:225)

at com.sun.faces.context.BaseContextMap$BaseSet.size(BaseContextMap.java:150)

at java.util.Collections$UnmodifiableCollection.size(Unknown Source)

at java.util.AbstractMap.size(Unknown Source)

at java.util.Collections$UnmodifiableMap.size(Unknown Source)

at java.util.HashMap.<init>(Unknown Source)

at org.jboss.jsfunit.context.JSFUnitExternalContext.<init>(JSFUnitExternalContext.java:97)

at org.jboss.jsfunit.context.JSFUnitFacesContext.release(JSFUnitFacesContext.java:229)

at com.sun.faces.application.WebappLifecycleListener.requestDestroyed(WebappLifecycleListener.java:126)

at com.sun.faces.config.ConfigureListener.requestDestroyed(ConfigureListener.java:346)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:735)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

2010-12-03 15:11:49.127::WARN:  EXCEPTION 

java.lang.NullPointerException

at org.mortbay.jetty.HttpFields$1.hasMoreElements(HttpFields.java:227)

at com.sun.faces.context.BaseContextMap$BaseIterator.hasNext(BaseContextMap.java:225)

at com.sun.faces.context.BaseContextMap$BaseSet.size(BaseContextMap.java:150)

at java.util.Collections$UnmodifiableCollection.size(Unknown Source)

at java.util.AbstractMap.size(Unknown Source)

at java.util.Collections$UnmodifiableMap.size(Unknown Source)

at java.util.HashMap.<init>(Unknown Source)

at org.jboss.jsfunit.context.JSFUnitExternalContext.<init>(JSFUnitExternalContext.java:97)

at org.jboss.jsfunit.context.JSFUnitFacesContext.release(JSFUnitFacesContext.java:229)

at com.sun.faces.application.WebappLifecycleListener.requestDestroyed(WebappLifecycleListener.java:126)

at com.sun.faces.config.ConfigureListener.requestDestroyed(ConfigureListener.java:346)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:735)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

 

 

没有解决,可能是jetty的问题吧,改用tomcat就可以了。。。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值