[
https://jira.jboss.org/jira/browse/JBSEAM-3769?page=com.atlassian.jira.pl...
]
Christian Bauer reopened JBSEAM-3769:
-------------------------------------
This breaks the registration email sending feature in the wiki example (and prevents
updating the
sfwk.org website). Steps to reproduce:
- use 2.2 community trunk
- configure examples/wiki/ according to README for development profile
- edit components-dev.xml and use a real SMTP smarthost for sending e-mails
- deploy wiki to JBoss 4.2.3 with upgraded Hibernate (see readme)
- Go to localhost:8080/wiki and click on 'Register'
- Fill out the form and register
Exception page should show, exception trace in the log:
[http-127.0.0.1-8080-5] 11:29:41,837 DEBUG [org.jboss.seam.wiki.core.action.UserHome]
sending activation e-mail to registered user
[http-127.0.0.1-8080-5] 11:29:41,847 DEBUG [org.jboss.seam.util.Resources] Loaded resource
from servlet context:
jndi:/localhost/wiki/themes/default/mailtemplates/confirmationRegistration.xhtml
[http-127.0.0.1-8080-5] 11:29:42,030 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/classes/META-INF/j4j.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,040 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/classes/META-INF/stringutils.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,043 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/classes/META-INF/wiki.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,045 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,048 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,051 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,053 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,055 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,057 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,060 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,073 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,084 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/a4j.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,086 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/jsp.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,094 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/ajax4jsf.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,099 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/rich.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,103 ERROR [STDERR] Oct 4, 2009 11:29:42 AM
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from:
jar:file:/Users/cb/work/local/jboss/jboss-4.2.3.GA/server/default/deploy/wiki.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/richfaces.taglib.xml
[http-127.0.0.1-8080-5] 11:29:42,141 DEBUG [org.jboss.seam.mail.MailSession] Creating
JavaMail Session (mail.bluewin.ch:25)
[http-127.0.0.1-8080-5] 11:29:42,145 DEBUG [org.jboss.seam.mail.MailSession] connected to
mail server
[http-127.0.0.1-8080-5] 11:29:42,351 DEBUG [org.jboss.seam.web.ExceptionFilter] handling
uncaught exception
java.lang.IllegalStateException
at
com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:395)
at
com.sun.faces.context.FacesContextImpl.getExternalContext(FacesContextImpl.java:147)
at
com.sun.faces.util.RequestStateManager.getStateMap(RequestStateManager.java:276)
at com.sun.faces.util.RequestStateManager.remove(RequestStateManager.java:243)
at com.sun.faces.context.FacesContextImpl.release(FacesContextImpl.java:345)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:283)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
at
org.jboss.seam.wiki.core.ui.WikiUrlRewriteFilter.doFilter(WikiUrlRewriteFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
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:60)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at
org.jboss.seam.wiki.core.ui.WikiUrlSessionIdFilter.doFilter(WikiUrlSessionIdFilter.java:86)
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:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
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:262)
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:446)
at java.lang.Thread.run(Thread.java:637)
[http-127.0.0.1-8080-5] 11:29:42,353 DEBUG [org.jboss.seam.web.ExceptionFilter] exception
root cause
[http-127.0.0.1-8080-5] 11:29:42,353 DEBUG [org.jboss.seam.web.ExceptionFilter] running
exception handlers
When I rollback this change, it works again:
http://fisheye.jboss.org/changelog/Seam/branches/community/Seam_2_2/ui/sr...
org.jboss.seam.ui.facelet.RendererRequest replaces HttpServletXXX
with MockHttpServletXXX
-----------------------------------------------------------------------------------------
Key: JBSEAM-3769
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3769
Project: Seam
Issue Type: Bug
Components: JSF Integration
Affects Versions: 2.1.1.CR1, 2.2.0.CR1
Environment: Mac OS X 10.5.5
JBoss AS 4.2.3.GA
JBoss Seam 2.1.1.CR1
Java 6
Reporter: Kenneth Christensen
Assignee: Samuel Mendenhall
Priority: Minor
Fix For: 2.2.1.CR1
Attachments: MockHttpServletRequest.diff, MockHttpServletRequest.diff,
RendererRequest.diff, RendererRequest.diff
Seam 2.0.3:
private void init()
{
// Make sure we are using the correct ClassLoader
originalClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
// If a FacesContext isn't available, set one up
if (FacesContext.getCurrentInstance() == null)
{
MockFacesContext mockFacesContext = new MockFacesContext(new
MockExternalContext(new MockServletContext()))
.setCurrent();
mockFacesContext.createViewRoot();
}
FacesContext facesContext = FacesContext.getCurrentInstance();
// Wrap the ResponseWriter
originalResponseWriter = facesContext.getResponseWriter();
facesContext.setResponseWriter(facesContext.getRenderKit().createResponseWriter(writer,
null, null));
// Create a new UIViewRoot
originalViewRoot = facesContext.getViewRoot();
UIViewRoot viewRoot = new UIViewRoot();
viewRoot.setRenderKitId(facesContext.getApplication().getViewHandler().calculateRenderKitId(facesContext));
viewRoot.setViewId(viewId);
viewRoot.setLocale(originalViewRoot.getLocale());
facesContext.setViewRoot(viewRoot);
}
Seam 2.1.1.CR1:
private void init()
{
request = new MockHttpServletRequest(HttpSessionManager.instance());
response = new MockHttpServletResponse();
// Generate the FacesContext from the JSF FacesContextFactory
originalFacesContext = FacesContext.getCurrentInstance();
facesContext = RendererFacesContextFactory.instance().getFacesContext(request,
response);
DelegatingFacesContext.setCurrentInstance(facesContext);
// Create the viewRoot
UIViewRoot newRoot =
facesContext.getApplication().getViewHandler().createView(facesContext, viewId);
facesContext.setViewRoot(newRoot);
// Set the responseWriter to write to a buffer
writer = new StringWriter();
facesContext.setResponseWriter(facesContext.getRenderKit().createResponseWriter(writer,
null, null));
}
As you can see, Seam 2.1.1.CR1 never checks for the original FacesContext, but creates a
new FacesContext which includes the MockHttpServletXXX.
It's a problem for the application I'm developing, because I need the external
context (HttpServletResponse) when I'm using the
renderer.render("/abc/xyz.xhtml").
It works fine with Seam 2.0.3, but not with Seam 2.1.
--
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