[
https://issues.jboss.org/browse/JBSEAM-4941?page=com.atlassian.jira.plugi...
]
Andrea Martino commented on JBSEAM-4941:
----------------------------------------
Hi Marek,
I have a "standard" web.xml configured as following:
{code:xml|title=web.xml}
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Production</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.resourceOptimization.enabled</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.skin</param-name>
<param-value>blueSky</param-value>
</context-param>
<welcome-file-list>
<welcome-file>/public/login/login.seam</welcome-file>
</welcome-file-list>
<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
<servlet>
<servlet-name>Seam Resource Servlet</servlet-name>
<servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Seam Resource Servlet</servlet-name>
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.seam</url-pattern>
</servlet-mapping>
<security-constraint>
<display-name>Restrict raw XHTML/XML Documents</display-name>
<web-resource-collection>
<web-resource-name>XHTML</web-resource-name>
<url-pattern>*.xhtml</url-pattern>
</web-resource-collection>
<web-resource-collection>
<web-resource-name>PAGE_XML</web-resource-name>
<url-pattern>*.xml</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>
{code}
I just have the faces servlet with the Seam Resource Servlet, nothing else. If you need
other infos or the full application I could send you.
Conversation-id-parameter causes WELD-000321 Exception
------------------------------------------------------
Key: JBSEAM-4941
URL:
https://issues.jboss.org/browse/JBSEAM-4941
Project: Seam 2
Issue Type: Bug
Components: Core, Framework
Affects Versions: 2.3.0.BETA1
Environment: JBOSS AS 7.1 + JSF2 + RichFaces 4.2
Reporter: Andrea Martino
Labels: conversation
If a conversation-id-parameter is defined in core:manager tag in components.xml,
exceptions are thrown when should not.
Let's consider the following pages.xml configuration, where not authenticated users
are redirected to the /public/login/login.seam page:
{code:title=pages.xml}
<?xml version="1.0" encoding="UTF-8"?>
<pages login-view-id="/public/login/login.xhtml"
no-conversation-view-id="/secure/home/home.xhtml"
xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages
http://jboss.com/products/seam/pages-2.3.xsd">
<page view-id="/secure/*" login-required="true">
<restrict>#{s:hasRole('WEB_LOGIN')}</restrict>
</page>
</pages>
{code}
When no core:manager is configured in components.xml, and unauthenticated user is
redirected to /public/login/login.seam?conversationId=2 when trying to access /secure/*
pages.
This is the expected behavior, and in Seam 2.3.0.Beta1 works a in 2.2.x branches.
If the following is added to components.xml:
{code:title=components.xml}
<core:manager concurrent-request-timeout="30000"
conversation-timeout="1500000"
conversation-id-parameter="cid"
parent-conversation-id-parameter="pid" />
{code}
an unauthenticated user is redirected to "/public/login/login.seam?cid=1", and
the browser displays the following error:
{code:title=Stacktrace}
javax.servlet.ServletException: WELD-000321 No conversation found to restore for id 1
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
sunrise.ep.ui.filter.CacheControlFilter.doFilter(CacheControlFilter.java:60)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
sunrise.ep.ui.filter.Log4jSessionIdFilter.doFilter(Log4jSessionIdFilter.java:61)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
sunrise.ep.ui.filter.CallLoggingFilter.doFilter(CallLoggingFilter.java:65)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
{code}
There is probably confusion with WELD and Seam conversation ids....
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira