[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2164) Improve exception chaining in SeamLoginModule
by Yannick Lazzari (JIRA)
Improve exception chaining in SeamLoginModule
---------------------------------------------
Key: JBSEAM-2164
URL: http://jira.jboss.com/jira/browse/JBSEAM-2164
Project: JBoss Seam
Issue Type: Feature Request
Reporter: Yannick Lazzari
Priority: Minor
This an improvement request in the SeamLoginModule class to properly chain exceptions when throwing LoginExceptions in the login method. See code below:
public boolean login()
throws LoginException
{
try
{
NameCallback cbName = new NameCallback("Enter username");
PasswordCallback cbPassword = new PasswordCallback("Enter password", false);
// Get the username and password from the callback handler
callbackHandler.handle(new Callback[] { cbName, cbPassword });
username = cbName.getName();
}
catch (Exception ex)
{
log.error("Error logging in", ex);
throw new LoginException(ex.getMessage());
}
MethodExpression mb = Identity.instance().getAuthenticateMethod();
if (mb==null)
{
throw new IllegalStateException("No authentication method defined - please define <security:authenticate-method/> for <security:identity/> in components.xml");
}
try
{
return (Boolean) mb.invoke();
}
catch (Exception ex)
{
log.error("Error invoking login method", ex);
throw new LoginException(ex.getMessage());
}
}
In both instances where a LoginException is thrown, only the message is passed to the constructor of the LoginException. I know that the LoginException does not overload the constructor to pass a cause directly but we can use the initCause method instead:
LoginException loginException = new LoginException();
loginException.initCause(originalException);
throw loginException;
If people use typed exceptions in their authenticator method to express different reasons why the login attempt failed, it's impossible right now to get that original exception.
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4211) Addition of footnotes
by Robert Morse (JIRA)
Addition of footnotes
---------------------
Key: JBSEAM-4211
URL: https://jira.jboss.org/jira/browse/JBSEAM-4211
Project: Seam
Issue Type: Feature Request
Components: PDF
Environment: Seam 2.1.2.CR2, Mac OS X
Reporter: Robert Morse
Priority: Minor
It would be great to have the ability to footnote a paragraph, cell, or text and have the footnote appear on the same page as the referencing tag. This is different from a footer which repeats on every page. As a suggestion, I would embed some special footnote character within the text that would be replaced by the appropriate footnote number / letter. Then create a new <p:footnote> tag that would contain the actual footnote. It would look something like:
<p:paragraph>
<p:text value = "this is the word ¹ that gets footnoted"/>
<p:footnote value = "And this is the footnote that gets positioned at the bottom of the same page"/>
</p:paragraph>
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4190) RewriteFilter is Non-deterministic
by John Gilbert (JIRA)
RewriteFilter is Non-deterministic
----------------------------------
Key: JBSEAM-4190
URL: https://jira.jboss.org/jira/browse/JBSEAM-4190
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.1.GA
Reporter: John Gilbert
The RewriteFilter is non-deterministic in some cases. An example serves best.
Here are the rewrite rules I would like:
/Customer/edit/{id} -> /jsf/Customer/Edit.xhtml
/Customer/create -> /jsf/Customer/Edit.xhtml
/Customer/{id} -> /jsf/Customer/View.xhtml
When debugging the value of RewriteFilter.getAllPatterns(), the order of the two rules for /jsf/Customer/Edit.xhtml are always preserved.
However, because Pages.getKnownViewIds() returns a HashSet there is no guarantee that the rules for /jsf/Customer/View.xhtml will come after the rules for /jsf/Customer/Edit.xhtml. As a result, /Customer/create sometimes translates to /jsf/Customer/View.xhtml when /jsf/Customer/View.xhtml is returned first in the set.
There are several possible solutions:
1) Change /Customer/{id} to /Customer/view/{id}. However, this is not the best url for a View.
2) Change Pages.pagesByViewId to a TreeMap. This is the patch I am currently using, but it is only guaranteed for my patterns.
3) Change RewriteFilter.getAllPatterns() to returns a TreeSet sorted from longest to shortest. This is similar to the way Pages.wildcardViewIds works.
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4228) expose rewrite rules
by Duncan Stockdill (JIRA)
expose rewrite rules
--------------------
Key: JBSEAM-4228
URL: https://jira.jboss.org/jira/browse/JBSEAM-4228
Project: Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.1.2.CR2
Reporter: Duncan Stockdill
The RewriteFilter translates the requests to the internal view URLs and dispatches the request with the rewritten URL. e.g.
RequestDispatcher dispatcher = request.getRequestDispatcher(newPath);
dispatcher.forward(request, response);
As a result, the original URL is lost to processing further down the chain. In some cases it's useful to have access the original URL.
Potentially the URL could be stored and made available as an injectable component, but a more generic answer would be to expose the rewrite rules so an internal view can be converted to an external URL programatically. e.g. add matchPatterns or rewritePath to Pages class.
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4170) Concurrent call to conversation Exception for first login
by Hunter Lee (JIRA)
Concurrent call to conversation Exception for first login
---------------------------------------------------------
Key: JBSEAM-4170
URL: https://jira.jboss.org/jira/browse/JBSEAM-4170
Project: Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.1.2.CR1
Environment: jboss-4.2.3.GA / jdk1.5.0_16 / Win XP sp3
Reporter: Hunter Lee
Priority: Blocker
1. Clean Browser cookies
2. Type an URL that need to login without cid
3. Enter login account and password.
4. expect go to the typed URL directly, but throw an Exception:
11:33:33,921 WARN [SeamPhaseListener] uncaught exception, passing to exception handler
org.jboss.seam.ConcurrentRequestTimeoutException: Concurrent call to conversation
at org.jboss.seam.core.Manager.restoreAndLockConversation(Manager.java:641)
at org.jboss.seam.core.Manager.restoreConversation(Manager.java:603)
at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:392)
at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:230)
at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.jboss.seam.web.RewriteFilter.process(RewriteFilter.java:98)
at org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:57)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
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.BaseFilter.doFilter(BaseFilter.java:532)
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$FilterChainImpl.doFilter(SeamFilter.java:73)
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.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
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.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
11:33:33,937 ERROR [CachedConnectionValve] Application error: default did not complete its transaction
--
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, 10 months