JSF + JBOSS 6.0 + Linux + java.lang.IllegalArgumentException:null source

时间:2013-04-09 07:04:51

标签: jsf jboss illegalargumentexception xhtml-transitional

我们在使用faces版本2.1.19的本地Windows开发环境中使用Jboss 6.1.0。我们使用的应用程序完美无缺。但是,当我们将代码推广到使用面向版本为“2.0.2.Final-redhat-1”的JBoss 6.0服务器的Linux测试环境时,我们收到错误

“java.lang.IllegalArgumentException:null source”。

下面粘贴完整的堆栈跟踪。服务器没有提供比这更多的信息,我们发现很难调试。任何关于此的建议/帮助都会很棒。

当我点击页面上的按钮然后进行AJAX调用时,会出现问题。

16:37:44,298 INFO  [stdout] (http-/10.23.212.109:8080-2) AUTH FILTER -- procesiisng .. /vcp-web/jsf/calendar/calResult.xhtml
16:37:44,299 INFO  [stdout] (http-/10.23.212.109:8080-2) leaving phase >> RESTORE_VIEW 1
16:37:44,301 INFO  [stdout] (http-/10.23.212.109:8080-2) Entering phase >> RESTORE_VIEW 1
16:37:44,301 ERROR [APPL] (http-/10.23.212.109:8080-2) @@@ DefaultExceptionHandler.handle() >> Uncaught Exception
java.lang.IllegalArgumentException: null source 
16:37:44,302 ERROR [APPL] (http-/10.23.212.109:8080-2) @@@ DefaultExceptionHandler.handle() >> Uncaught Exception >> Root Cause
java.lang.IllegalArgumentException: null source: java.lang.IllegalArgumentException: null source at
util.EventObject.<init>(EventObject.java:38) [rt.jar:1.6.0_33]  
        at javax.faces.event.SystemEvent.<init>(SystemEvent.java:71)    
        [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
        at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:73) 
        [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
        at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:73) 
        [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
        at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:271) 
        [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
        at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:257) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
        at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) 
        [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) 
        [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) 
        [jbossweb-7.0.16.Final-redhat-1.jar:]
        at au.com.woolworths.vcp.web.misc.AuthenticateFilter.doFilter(AuthenticateFilter.java:54) [classes:]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) 
        [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) 
        [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) 
        [jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) 
        [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final-redhat-1.jar:]
        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]


        16:37:44,305 ERROR [APPL] (http-/10.23.212.109:8080-2) @@@ DefaultExceptionHandler.handle() >> Other Exception
        16:37:44,306 ERROR [APPL] (http-/10.23.212.109:8080-2) Exception in FacesHelper.setGlobalMessageByCode() >>     
        java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key 
        web.common.exception.unknown: java.util.MissingResourceException: Can't find resource for bundle 
        java.util.PropertyResourceBundle, key web.common.exception.unknown
        at java.util.ResourceBundle.getObject(ResourceBundle.java:374) [rt.jar:1.6.0_33]
        at java.util.ResourceBundle.getString(ResourceBundle.java:334) [rt.jar:1.6.0_33]
        at au.com.woolworths.vcp.util.helper.FacesHelper.setGlobalMessageByCode(FacesHelper.java:125) [classes:]
        at au.com.woolworths.vcp.util.exception.DefaultExceptionHandler.handle(DefaultExceptionHandler.java:55) [classes:]
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
        at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) 
        [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) 
        [jbossweb-7.0.16.Final-redhat-1.jar:]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) 
        [jbossweb-7.0.16.Final-redhat-1.jar:]

1 个答案:

答案 0 :(得分:1)

最佳解决方案是确保XHTML字段中的每个字段都具有与之关联的名称和ID。我的问题是,一些输入隐藏字段没有与之关联的名称,请求参数是在没有密钥的情况下发送的。这导致页面无法成功呈现