[JBoss JIRA] Created: (SEAMFACES-58) State management for UIInputContainer with ajax requests
by Nicklas Karlsson (JIRA)
State management for UIInputContainer with ajax requests
--------------------------------------------------------
Key: SEAMFACES-58
URL: https://jira.jboss.org/browse/SEAMFACES-58
Project: Seam Faces
Issue Type: Bug
Components: UI Components
Affects Versions: 3.0.0.Beta1
Reporter: Nicklas Karlsson
For views like
<v:validate>
<h:inputText value="#{ajaxBean.data}" valueChangeListener="#{ajaxBean.change}">
<f:ajax execute="@this" render="@form" />
</h:inputText>
</v:validate>
I get a stacktrace like this when tabbing out of it for the second time:
09:37:33,830 ERROR [STDERR] javax.faces.FacesException: Unexpected error restoring state for component with id j_idt7:j_idt8:j_idt9. Cause: java.lang.ClassCastException: javax.faces.component.StateHolderSaver cannot be cast to [Ljava.lang.Object;.
09:37:33,831 ERROR [STDERR] at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:250)
09:37:33,831 ERROR [STDERR] at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:147)
09:37:33,831 ERROR [STDERR] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1476)
09:37:33,831 ERROR [STDERR] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
09:37:33,831 ERROR [STDERR] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
09:37:33,832 ERROR [STDERR] at fi.nik.jsf.UIInputContainer.visitTree(UIInputContainer.java:50001)
09:37:33,832 ERROR [STDERR] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
09:37:33,832 ERROR [STDERR] at javax.faces.component.UIForm.visitTree(UIForm.java:331)
09:37:33,832 ERROR [STDERR] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
09:37:33,832 ERROR [STDERR] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
09:37:33,832 ERROR [STDERR] at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:234)
09:37:33,832 ERROR [STDERR] at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:177)
09:37:33,832 ERROR [STDERR] at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:119)
09:37:33,833 ERROR [STDERR] at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:438)
09:37:33,833 ERROR [STDERR] at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:144)
09:37:33,833 ERROR [STDERR] at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:284)
09:37:33,833 ERROR [STDERR] at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:182)
09:37:33,833 ERROR [STDERR] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
09:37:33,833 ERROR [STDERR] at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
09:37:33,833 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
09:37:33,833 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
09:37:33,834 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
09:37:33,834 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
09:37:33,834 ERROR [STDERR] at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
09:37:33,834 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
09:37:33,834 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
09:37:33,834 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
09:37:33,834 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
09:37:33,835 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
09:37:33,836 ERROR [STDERR] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
09:37:33,836 ERROR [STDERR] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
09:37:33,836 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
09:37:33,836 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
09:37:33,836 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
09:37:33,836 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
09:37:33,836 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
09:37:33,837 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
09:37:33,837 ERROR [STDERR] at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
09:37:33,837 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
09:37:33,837 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
09:37:33,837 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
09:37:33,837 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
09:37:33,837 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
09:37:33,838 ERROR [STDERR] Caused by: java.lang.ClassCastException: javax.faces.component.StateHolderSaver cannot be cast to [Ljava.lang.Object;
09:37:33,838 ERROR [STDERR] at javax.faces.component.behavior.AjaxBehavior.restoreState(AjaxBehavior.java:446)
09:37:33,838 ERROR [STDERR] at javax.faces.component.UIComponentBase.restoreBehaviors(UIComponentBase.java:2052)
09:37:33,838 ERROR [STDERR] at javax.faces.component.UIComponentBase.restoreBehaviorsState(UIComponentBase.java:2019)
09:37:33,838 ERROR [STDERR] at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1439)
09:37:33,839 ERROR [STDERR] at javax.faces.component.UIOutput.restoreState(UIOutput.java:251)
09:37:33,839 ERROR [STDERR] at javax.faces.component.UIInput.restoreState(UIInput.java:1374)
09:37:33,839 ERROR [STDERR] at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:242)
09:37:33,839 ERROR [STDERR] ... 42 more
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[JBoss JIRA] Created: (SEAMFACES-51) Flash context should be more failure friendly
by Nicklas Karlsson (JIRA)
Flash context should be more failure friendly
---------------------------------------------
Key: SEAMFACES-51
URL: https://jira.jboss.org/browse/SEAMFACES-51
Project: Seam Faces
Issue Type: Bug
Affects Versions: 3.0.0.Alpha3
Reporter: Nicklas Karlsson
When faces with an unknown cid to restore, the flash producer method causes a
org.jboss.weld.exceptions.IllegalProductException: WELD-000052 Cannot return null from a non-dependent producer method: org.jboss.weld.bean.ProducerMethod$1@5ec45b2
org.jboss.weld.bean.AbstractProducerBean.checkReturnValue(AbstractProducerBean.java:255)
org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:361)
org.jboss.weld.context.AbstractMapContext.get(AbstractMapContext.java:112)
org.jboss.weld.bean.proxy.ClientProxyMethodHandler.getProxiedInstance(ClientProxyMethodHandler.java:143)
org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:100)
org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
org.jboss.seam.faces.context.FlashContext_$$_javassist_53.put(FlashContext_$$_javassist_53.java)
org.jboss.seam.faces.status.MessagesAdapter.flushBeforeNavigate(MessagesAdapter.java:63)
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.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:200)
org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:194)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241)
org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:216)
org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:654)
org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:647)
org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:641)
org.jboss.seam.faces.event.PreNavigateEventProducer.handleNavigation(PreNavigateEventProducer.java:65)
fi.affecto.kake.sys.jsf.ExceptionHandler.navigateToErrorPage(ExceptionHandler.java:49)
fi.affecto.kake.sys.jsf.ExceptionHandler.handle(ExceptionHandler.java:35)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:63)
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:68)
which hides the original cause.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4248) Messages component gets wrong locale in when called with seam remoting (@WebRemote)
by David Jensen (JIRA)
Messages component gets wrong locale in when called with seam remoting (@WebRemote)
-----------------------------------------------------------------------------------
Key: JBSEAM-4248
URL: https://jira.jboss.org/jira/browse/JBSEAM-4248
Project: Seam
Issue Type: Bug
Components: Remoting
Affects Versions: 2.1.2.GA
Environment: Seam 2.1.2.GA, JBoss EAP 4.3
Reporter: David Jensen
Assignee: Shane Bryzak
The wrong locale gets set when using the 'Messages' component in a @WebRemote method called from javascript. Regardless of supported and default locales in faces-config.xml whatever the browser requests is used.
I'll attach a clean project with code example. Basically I hunted it down to org.jboss.seam.international.LocaleSelector.getLocale() where we get the locale from the HttpRequest since no FacesContext exists.
It would seem you can only have supported and default locales in a ordinary JSF request, It would be nice if Seam could keep of track that for you instead of JSF, or have I misunderstood something?
Thanks!
/David
--
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
15 years
[JBoss JIRA] Created: (JBSEAM-4655) Custom EntityIdentifierStrategy ignored by IdentifierPolicy
by Robert Raksi (JIRA)
Custom EntityIdentifierStrategy ignored by IdentifierPolicy
-----------------------------------------------------------
Key: JBSEAM-4655
URL: https://jira.jboss.org/browse/JBSEAM-4655
Project: Seam
Issue Type: Bug
Components: Security
Affects Versions: 2.2.0.GA
Reporter: Robert Raksi
I tried to set a custom identifier strategy for one of my entities with the @Identifier annotation but after debuging the IdentifierPolicy class I found that my custom strategy is neglected in favor of the builtin EntityIdentifierStrategy.
Inside the if (strategy == null) {} block my strategy is found and put into the strategies map as expected but then in the for statement it's replaced with de default one. Shouldn't the for statement be in an else block?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[JBoss JIRA] Created: (JBSEAM-4659) RememberMe fails to add Cookie because of invalid Base64 encoding
by Florian Specker (JIRA)
RememberMe fails to add Cookie because of invalid Base64 encoding
-----------------------------------------------------------------
Key: JBSEAM-4659
URL: https://jira.jboss.org/browse/JBSEAM-4659
Project: Seam
Issue Type: Bug
Components: Security
Affects Versions: 2.2.0.GA
Reporter: Florian Specker
RememberMe.encodeToken() uses Base64 to encode Cookie values before actually adding the Cookie. For long usernames, a newline char (\n) is inserted, preventing the Cookie from being added.
JBREM-806 addressed the same issue for JBoss remoting:
[..]
---------
Solution: org.jboss.util.Base64.encodeBytes() takes an optional "options" parameter, which, among other things, can indicate that Base64 encoded strings should not be broken into lines:
change
String encoded = Base64.encodeBytes(buffer.toString().getBytes());
to
String encoded = Base64.encodeBytes(buffer.toString().getBytes(), Base64.DONT_BREAK_LINES);
[..]
As a workaround, I subclassed RememberMe and overwrote encodeToken():
@Override
protected String encodeToken(String username, String value) {
StringBuilder sb = new StringBuilder();
sb.append(username);
sb.append(":");
sb.append(value);
// do not break lines - this results in invalid cookies
return Base64.encodeBytes(sb.toString().getBytes(), Base64.DONT_BREAK_LINES);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2820) Remoting should not throw exception but 400/404 on invalid request
by Christian Bauer (JIRA)
Remoting should not throw exception but 400/404 on invalid request
------------------------------------------------------------------
Key: JBSEAM-2820
URL: http://jira.jboss.com/jira/browse/JBSEAM-2820
Project: JBoss Seam
Issue Type: Bug
Components: Remoting
Reporter: Christian Bauer
Assigned To: Shane Bryzak
Some crazy Java program is making HTTP requests on our live site:
85.82.169.224 - - [04/Apr/2008:15:38:48 +0100] "GET /seam/resource/remoting/interface.js HTTP/1.1" 200 - "null" "Java/1.5.0_13"
I'm guessing this is a home-written HTML parser or something from a Danish ;) guy or a website "downloader" or something. In any case, it cuts off the request parameters and we throw an exception:
15:38:48,818 ERROR [Remoting] Error
javax.servlet.ServletException: Invalid request - no component specified
at org.jboss.seam.remoting.InterfaceGenerator$1.process(InterfaceGenerator.java:73)
at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
at org.jboss.seam.remoting.InterfaceGenerator.handle(InterfaceGenerator.java:64)
at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:111)
at org.jboss.seam.servlet.SeamResourceServlet.doGet(SeamResourceServlet.java:75)
Do not throw an exception but either return 400 INVALID REQUEST or 404 NOT FOUND.
--
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
15 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4161) Cookies stored incorrectly when web application is deployed with emty root path
by Evgeny Denisov (JIRA)
Cookies stored incorrectly when web application is deployed with emty root path
--------------------------------------------------------------------------------
Key: JBSEAM-4161
URL: https://jira.jboss.org/jira/browse/JBSEAM-4161
Project: Seam
Issue Type: Bug
Components: Core, Security
Affects Versions: 2.1.1.GA
Environment: Firefox 3.0.x
Reporter: Evgeny Denisov
There is a bug in that prevents RememberMe functionality to work properly. This occurs when web application is deployed with empty context root path and can be reproduced in Firefox 3.0.8.
There was similar bug reported earlier for Spring: http://jira.springframework.org/browse/SEC-364
The cause is empty cookie path that set to "" in org.jboss.seam.faces.Selector when context root of deployed web app is empty. An empty cookie path results in inconsistent behavior at least between ie and firefox: ie presumes "/" whereas firefox presumes the leading path for the current request. Chrome 1.0 also does not like empty cookie path.
The bug can be fixed if method
public void setCookiePath(String cookiePath)
of org.jboss.seam.faces.Selector
will be modified in the same way:
public void setCookiePath(String cookiePath)
{
/* firefox does not like empty cookie path */
if (cookiePath == null || cookiePath.isEmpty()) {
this.cookiePath = "/";
} else {
this.cookiePath = 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
15 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3565) Remoting interface generation problem
by Andy Siu (JIRA)
Remoting interface generation problem
-------------------------------------
Key: JBSEAM-3565
URL: https://jira.jboss.org/jira/browse/JBSEAM-3565
Project: Seam
Issue Type: Bug
Components: Remoting
Reporter: Andy Siu
Assignee: Shane Bryzak
There is a problem about the caching mechanism of generating remote interface for ajax call.
at
public void generateComponentInterface(Set<Component> components, OutputStream out, Set<Type> types)
The generated interface is cached in interfaceCache. However, when passing more than one component at the same time, there may be problem.
E.g.
seam/resource/remoting/interface.js?A&B
where both A and B contain a type C
A->C will be cached with the name A
but only B will be cached with the name B (C will be skipped as it is already generated in A)
when another page only calls seam/resource/remoting/interface.js?B
C will be missed as the cached B does not contains C
I've make a workaround by passing a new HashSet<Type>() into appendComponentSource everytime
appendComponentSource(bOut, c, new HashSet<Type>());
--
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
15 years