[
https://jira.jboss.org/jira/browse/JBSEAM-3845?page=com.atlassian.jira.pl...
]
Ian Springer reopened JBSEAM-3845:
----------------------------------
I was seeing this also (with Seam 2.1.0.SP1). In my case, it was caused by the following
element in my exceptions.xml:
<exception class="javax.persistence.PersistenceException">
<render>PersistenceException was thrown
#{messages['exception.page']}</render>
<end-conversation/>
</exception>
It looks like this was causing Exceptions.createHandler() to return null, since the
element doesn't contain either a 'redirect' or an 'http-error' child
element. If 'render' is an invalid alternative, then Seam should log an error to
inform the user the syntax of their exceptions.xml is not valid. Based on some quick
Googling, it looks like a 'render' child element used to be supported but support
for it was removed somewhere in the 2006-2007 time frame.
NullPointerException in org.jboss.seam.exception.Exceptions.parse
-----------------------------------------------------------------
Key: JBSEAM-3845
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3845
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.0.SP1
Environment: JBoss EAP 4.3.0 default, JSFUnit, run using Cactus
ServletTestRunner
Reporter: Ondrej Žižka
Assignee: Norman Richards
Fix For: 2.1.2.CR1
Attachments: SeamNPE.txt
Seam throws a NPE when I run a JSFUnit test case. The test may be fault, but at least the
NPE should be handled.
Full stack trace:
-------------------------------------------------------
15:11:11,933 ERROR [BaseXMLFilter] Exception in the filter chain
javax.servlet.ServletException: org.jboss.seam.InstantiationException: Could not
instantiate Seam component: org.jboss.seam.exception.exceptions
at
org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:126)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
at
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component:
org.jboss.seam.exception.exceptions
at org.jboss.seam.Component.newInstance(Component.java:2096)
at org.jboss.seam.Component.getInstance(Component.java:1978)
at org.jboss.seam.Component.getInstance(Component.java:1957)
at org.jboss.seam.Component.getInstance(Component.java:1951)
at org.jboss.seam.Component.getInstance(Component.java:1924)
at org.jboss.seam.Component.getInstance(Component.java:1919)
at org.jboss.seam.exception.Exceptions.instance(Exceptions.java:256)
at
org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
... 31 more
Caused by: java.lang.NullPointerException
at org.jboss.seam.exception.Exceptions.parse(Exceptions.java:195)
at org.jboss.seam.exception.Exceptions.initialize(Exceptions.java:119)
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 org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
at org.jboss.seam.Component.callComponentMethod(Component.java:2201)
at org.jboss.seam.Component.callCreateMethod(Component.java:2124)
at org.jboss.seam.Component.newInstance(Component.java:2084)
... 38 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira