当前位置: 首页 > 工具软件 > JSFUnit > 使用案例 >

JSFUnit异常

易昌翰
2023-12-01

使用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就可以了。。。

 类似资料: