[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2240) refactor for easier extensibility of seam identity: seam identiy interface + seam identity base impl
by koen handekyn (JIRA)
refactor for easier extensibility of seam identity: seam identiy interface + seam identity base impl
----------------------------------------------------------------------------------------------------
Key: JBSEAM-2240
URL: http://jira.jboss.com/jira/browse/JBSEAM-2240
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.0.GA
Reporter: koen handekyn
Priority: Optional
to allow easier extensibility of the seam identity class it would be useful to have a clear seam identity interface with complementary base impl from (package org.jboss.seam.security)
use case: i'm trying to define my own seam identiy that contains as an extra parameter domain (login@domain/password).
to have a complete implementation (which also saves the domain into a cookie) i'm stuck as
1. i don't know have an interface that I should satisfy if I wanted to make an implementation from scratch
2. extending from seam idenity has some issues : i missing some protected accessors to some private members (that maybe could be protected?)
alternatively my question would be solved if i could have extension points within initFromCookie and at "setCookieValueIfEnabled( getUsername() ); from method postAuthenticate()" such that i could combine and split login and domain when saving/reading the cookie.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[JBoss JIRA] Created: (JBSEAM-4605) Token based remember me does not work, if context root is /
by Dieter Rehbein (JIRA)
Token based remember me does not work, if context root is /
-----------------------------------------------------------
Key: JBSEAM-4605
URL: https://jira.jboss.org/jira/browse/JBSEAM-4605
Project: Seam
Issue Type: Bug
Components: Security
Affects Versions: 2.2.0.GA
Reporter: Dieter Rehbein
If you have an .ear file containing a web-application with context-root "/", token based remember me does not work.
The reason:
the method getCookiePath() of org.jboss.seam.security.RememberMe returns an empty string, if context-root is "/".
To fix this, the following change in class RememberMe is required:
change
public String getCookiePath()
{
FacesContext ctx = FacesContext.getCurrentInstance();
return ctx != null ? ctx.getExternalContext().getRequestContextPath() : null;
}
to
public String getCookiePath()
{
FacesContext ctx = FacesContext.getCurrentInstance();
String cookiePath = ctx != null ? ctx.getExternalContext().getRequestContextPath() : null;
if ("".equals(cookiePath))
{
cookiePath = "/";
}
return cookiePath;
}
--
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
14 years, 8 months
[JBoss JIRA] Created: (JBSEAM-4604) Tokenbase remember me: redirected to login, if login required (tryLogin not invoked)
by Dieter Rehbein (JIRA)
Tokenbase remember me: redirected to login, if login required (tryLogin not invoked)
------------------------------------------------------------------------------------
Key: JBSEAM-4604
URL: https://jira.jboss.org/jira/browse/JBSEAM-4604
Project: Seam
Issue Type: Bug
Components: Core, Security
Affects Versions: 2.2.0.GA
Reporter: Dieter Rehbein
If your application uses the token based remember me feature and open a page, which requires login, a redirect to the login page is performed, even if the user could be logged in silently.
To fix this, the method isLoginRedirectRequired(String viewId, Page page) has to be changed
from
private boolean isLoginRedirectRequired(String viewId, Page page)
{
return page.isLoginRequired() &&
!viewId.equals( getLoginViewId() ) &&
!Identity.instance().isLoggedIn();
}
to:
private boolean isLoginRedirectRequired(String viewId, Page page)
{
if (page.isLoginRequired() && !viewId.equals(getLoginViewId()))
{
return !Identity.instance().tryLogin();
}
else
{
return false;
}
}
--
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
14 years, 8 months
[JBoss JIRA] Created: (JBSEAM-4578) CLONE -@UserPrincipal doesn't work when used in variable declaration.
by Stephanie Stroka (JIRA)
CLONE -@UserPrincipal doesn't work when used in variable declaration.
---------------------------------------------------------------------
Key: JBSEAM-4578
URL: https://jira.jboss.org/jira/browse/JBSEAM-4578
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.0.SP1
Reporter: Stephanie Stroka
Assignee: Shane Bryzak
Related to https://jira.jboss.org/jira/browse/JBSEAM-3556
1) Make this change in class MemberAccount.java into seam-space example
@NotNull @UserPrincipal
private String username;
..........
//@NotNull @UserPrincipal
public String getUsername()
{
return username;
}
2) deploy, register a new user and try to login.
java.lang.IllegalAccessException: Class org.jboss.seam.util.Reflections can not access a member of class org.jboss.seam.example.seamspace.MemberAccount with modifiers "private"
sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
java.lang.reflect.Field.doSecurityCheck(Field.java:960)
java.lang.reflect.Field.getFieldAccessor(Field.java:896)
java.lang.reflect.Field.set(Field.java:657)
org.jboss.seam.util.Reflections.set(Reflections.java:71)
org.jboss.seam.util.Reflections.setAndWrap(Reflections.java:119)
org.jboss.seam.util.AnnotatedBeanProperty.setValue(AnnotatedBeanProperty.java:99)
org.jboss.seam.security.management.JpaIdentityStore.createUser(JpaIdentityStore.java:207)
org.jboss.seam.security.management.IdentityManager.createUser(IdentityManager.java:98)
org.jboss.seam.security.management.IdentityManager.createUser(IdentityManager.java:92)
org.jboss.seam.example.seamspace.RegisterAction$1.execute(RegisterAction.java:104)
org.jboss.seam.security.Identity.runAs(Identity.java:734)
org.jboss.seam.security.RunAsOperation.run(RunAsOperation.java:84)
org.jboss.seam.example.seamspace.RegisterAction.uploadPicture(RegisterAction.java:102)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
--
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
14 years, 8 months
[JBoss JIRA] Created: (JBSEAM-4631) NPE s:validateEquality with readonly fields
by Ignacio Larranaga (JIRA)
NPE s:validateEquality with readonly fields
-------------------------------------------
Key: JBSEAM-4631
URL: https://jira.jboss.org/jira/browse/JBSEAM-4631
Project: Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.2.0.GA
Reporter: Ignacio Larranaga
This is the sample code:
<a4j:region>
<s:decorate id="creditValueFieldId" template="/layout/edit.xhtml">
<ui:define name="label"><h:outputText value="#{messages['UserMovement.credit']}"/></ui:define>
<h:inputText id="creditValueId" required="true" value="#{userMovement.credit}" readonly="true" />
</s:decorate>
<s:decorate id="valueFieldId" template="/layout/edit.xhtml">
<ui:define name="label"><h:outputText value="#{messages['UserMovement.value']}"/></ui:define>
<h:inputText id="valueId" required="true" value="#{userMovement.value}">
<s:validateEquality for="creditValueId" operator="less_or_equal" message="#{messages['Withdraw.not_enough_credit']}" />
<a4j:support event="onchange" eventsQueue="default" reRender="valueFieldId,withdrawId"/>
</h:inputText>
<ui:param name="description" value="#{messages['Withdraw.value_must_be_le_credit']}" />
</s:decorate>
</a4j:region>
When I change the value (onchange event on creditValueId) I get this exception:
13:47:30,218 ERROR [Exceptions] handled and logged exception
javax.servlet.ServletException: java.lang.IllegalArgumentException: Values are not comparable
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
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.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:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
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.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:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
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:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.faces.FacesException: java.lang.IllegalArgumentException: Values are not comparable
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:714)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:226)
at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:463)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
... 41 more
Caused by: java.lang.IllegalArgumentException: Values are not comparable
at org.jboss.seam.ui.validator.EqualityValidator.compare(EqualityValidator.java:202)
at org.jboss.seam.ui.validator.EqualityValidator.validate(EqualityValidator.java:141)
at org.richfaces.component.UIRichInput.validateInput(UIRichInput.java:44)
at org.richfaces.component.html.HtmlInputText.validateValue(HtmlInputText.java:46)
at javax.faces.component.UIInput.validate(UIInput.java:875)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
at javax.faces.component.UIInput.processValidators(UIInput.java:672)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
at org.ajax4jsf.component.UIAjaxRegion.processValidators(UIAjaxRegion.java:121)
at org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:447)
at org.ajax4jsf.component.ContextCallbackWrapper.invokeContextCallback(ContextCallbackWrapper.java:44)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:711)
... 54 more
Caused by: java.lang.NullPointerException
at java.lang.Double.compareTo(Unknown Source)
at java.lang.Double.compareTo(Unknown Source)
at org.jboss.seam.ui.validator.EqualityValidator.compare(EqualityValidator.java:198)
... 67 more
The courious thing is that when I remove the readonly mark in the first field (creditValueFieldId) the exception dissapears :). That is:
<h:inputText id="creditValueId" required="true" value="#{userMovement.credit}" />
--
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
14 years, 8 months
[JBoss JIRA] Created: (JBSEAM-4603) Component annotated with @Startup is instantiated twice
by Ryan Nideffer (JIRA)
Component annotated with @Startup is instantiated twice
-------------------------------------------------------
Key: JBSEAM-4603
URL: https://jira.jboss.org/jira/browse/JBSEAM-4603
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.2.1.CR1
Reporter: Ryan Nideffer
Add this simple component to a Seam project:
@Startup
@Scope(APPLICATION)
@Name("startupTest")
public class SeamComponentStartupTest {
@Logger
private static Log logger;
private static AtomicInteger counter = new AtomicInteger(1);
public SeamComponentStartupTest() {
logger.debug("number of times instantiated: {0}", counter.getAndIncrement());
}
}
on seam startup, this is the output:
2010-03-17 10:57:24,210 DEBUG [SeamComponentStartupTest] (HDScanner) number of times instantiated: 1
2010-03-17 10:57:24,211 DEBUG [SeamComponentStartupTest] (HDScanner) number of times instantiated: 2
--
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
14 years, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4399) Specify the Quartz job name for @Asynchronous methods
by Nikolay Elenkov (JIRA)
Specify the Quartz job name for @Asynchronous methods
-----------------------------------------------------
Key: JBSEAM-4399
URL: https://jira.jboss.org/jira/browse/JBSEAM-4399
Project: Seam
Issue Type: Feature Request
Affects Versions: 2.2.0.GA
Environment: JBoss 4.2.x, JBoss 5.x, Quartz
Reporter: Nikolay Elenkov
Attachments: quartz-job-name.patch
When using the Quartz dispatcher, Seam implements asynchronous methods by creating Quartz job and trigger
for every method, annotated with @Asynchronous. The QuartzDispatcher class uses UIDs for the job and trigger names,
in order to generate unique names. While this is OK for one-off jobs and asynchronous events, it is not suitable for
repeatable and cron jobs that might have to be paused, cancelled or rescheduled by the application. Jobs should
have meaningful names, especially when they are saved in a database store.
Requesting a means to specify the Quartz job name when declaring an asynchronous method. One way to do
this is to add a new parameter annotation, JobName. The Quartz dispatcher should inspect the asynchronous
method parameters and use the one annotated with @JobName (if any) as the base for the job/trigger name.
--
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
14 years, 9 months
[JBoss JIRA] Created: (JBSEAM-4623) ServletContext is application scoped even though several can exist in one .ear
by Kasper Sørensen (JIRA)
ServletContext is application scoped even though several can exist in one .ear
------------------------------------------------------------------------------
Key: JBSEAM-4623
URL: https://jira.jboss.org/jira/browse/JBSEAM-4623
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.2.1.CR1
Reporter: Kasper Sørensen
When creating an .ear project with multiple .war files, several servlet contexts will exist, but Seam registers only a single servlet context in the application scope. This application scoped servlet context is used a lot of places through the ServletLifecycle class.
To reproduce, try the following:
ServletContext servletLifecycleServletContext = ServletLifecycle.getCurrentServletContext();
ServletContext facesContextServletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
This will return two different servlet contexts if called from the webapp that was not registered in application scope.
--
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
14 years, 9 months