我正在使用 Mojarra 2.1.11 和 JBoss AS 6.1.0。我遇到了与java.lang.IllegalArgumentException: null source中提出的相同问题,但答案对我不起作用。
页面上的 xhtml 在语法上是正确的(我已经尝试过很多页面)所以我认为这不是问题。错误文字:
Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(Unknown Source) [:1.6.0_31]
at javax.faces.event.SystemEvent.<init>(SystemEvent.java:71) [:2.1.11]
at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:73) [:2.1.11]
at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:73) [:2.1.11]
at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:271) [:2.1.11]
...
在 web.xml 中,我将会话超时设置为 1 分钟,并且我测试的任何页面在一分钟后都会产生上述错误。如果我理解正确,这应该会产生 ViewExpiredException。如果有人对我可以尝试的其他东西有任何想法,我将不胜感激。
谢谢,克莱
:edit 7/28/2012 - 项目的堆栈跟踪:
16:55:01,663 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/TestProject
16:55:01,711 INFO [org.apache.catalina.core.StandardContext] The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
16:55:01,789 INFO [javax.enterprise.resource.webcontainer.jsf.config] Initializing Mojarra 2.1.11 ( 20120711-1632) for context '/TestProject'
16:55:03,692 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
16:55:03,692 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8009
16:55:03,692 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8443
16:55:03,692 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.1.0.Final "Neo"] Started in 30s:523ms
16:56:59,846 WARN [org.apache.tomcat.util.http.Parameters] Parameters: Invalid chunk ignored.
16:56:59,846 WARN [org.apache.tomcat.util.http.Parameters] Parameters: Invalid chunk ignored.
16:57:01,642 WARN [org.apache.tomcat.util.http.Parameters] Parameters: Invalid chunk ignored.
16:57:01,642 WARN [org.apache.tomcat.util.http.Parameters] Parameters: Invalid chunk ignored.
16:57:01,642 INFO [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
16:57:03,219 WARN [org.apache.tomcat.util.http.Parameters] Parameters: Invalid chunk ignored.
16:57:03,219 WARN [org.apache.tomcat.util.http.Parameters] Parameters: Invalid chunk ignored.
16:59:37,112 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/TestProject].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(Unknown Source) [:1.6.0_31]
at javax.faces.event.SystemEvent.<init>(SystemEvent.java:71) [:2.1.11]
at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:73) [:2.1.11]
at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:73) [:2.1.11]
at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:271) [:2.1.11]
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:257) [:2.1.11]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [:2.1.11]
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) [:2.1.11]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [:2.1.11]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [:2.1.11]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.1.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [:6.1.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.1.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [:6.1.0.Final]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.1.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.1.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159) [:6.1.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.1.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.1.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.1.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.1.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.1.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.1.0.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.1.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.1.0.Final]
at java.lang.Thread.run(Unknown Source) [:1.6.0_31]
如果从服务器启动到错误发生的完整堆栈跟踪有用,请告诉我。