[JBoss JIRA] Created: (SEAMFACES-166) UIValidateForm doesn't set the rendererType property correctly
by Christian Kaltepoth (JIRA)
UIValidateForm doesn't set the rendererType property correctly
--------------------------------------------------------------
Key: SEAMFACES-166
URL: https://issues.jboss.org/browse/SEAMFACES-166
Project: Seam Faces
Issue Type: Bug
Components: Validation & Conversion
Affects Versions: 3.0.1
Environment: Tomcat 7.0.5, MyFaces 2.0.5, Weld 1.1.0
Reporter: Christian Kaltepoth
Priority: Minor
MyFaces emits some warning when <s:validateForm> is used on a page:
{code}
30.05.2011 17:30:03 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
WARNUNG: Unsupported component-family/renderer-type: org.jboss.seam.faces.ValidateForm/javax.faces.Text
30.05.2011 17:30:03 org.apache.catalina.core.ApplicationContext log
INFO: No Renderer found for component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /validation.xhtml][Class: javax.faces.component.html.HtmlForm,Id: j_id98696035_5e1fb46][Class: org.jboss.seam.faces.component.UIValidateForm,Id: j_id98696035_5e1fb24]} (component-family=org.jboss.seam.faces.ValidateForm, renderer-type=javax.faces.Text)
30.05.2011 17:30:03 javax.faces.component.UIComponentBase getRenderer
WARNUNG: No Renderer found for component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /validation.xhtml][Class: javax.faces.component.html.HtmlForm,Id: j_id98696035_5e1fb46][Class: org.jboss.seam.faces.component.UIValidateForm,Id: j_id98696035_5e1fb24]} (component-family=org.jboss.seam.faces.ValidateForm, renderer-type=javax.faces.Text)
{code}
{{UIValidateForm}} doesn't render any output and therefore implements the {{encode*()}} methods with empty method bodies. The {{rendererType}} property has to be {{null}} for this methods to be used (direct implementation model for rendering components).
The problem with {{UIValidateForm}} is that it is a subclass of {{UIInput}}. According to 4.1.6.2 the default value of the {{rendererType}} property for {{UIInput}} is {{javax.faces.Text}}. As {{UIValidateForm}} doesn't overwrite {{getRendererType()}} MyFaces uses the default value and therefore searches for a renderer for the component.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (SEAMFACES-167) UIValidateForm's state saving doesn't work correctly
by Christian Kaltepoth (JIRA)
UIValidateForm's state saving doesn't work correctly
----------------------------------------------------
Key: SEAMFACES-167
URL: https://issues.jboss.org/browse/SEAMFACES-167
Project: Seam Faces
Issue Type: Bug
Components: Validation & Conversion
Affects Versions: 3.0.1
Environment: Tomcat 7.0.5, Weld 1.1.0, various versions of Mojarra and MyFaces tested
Reporter: Christian Kaltepoth
I'm getting the following exception if I use {{s:validateForm}} on a page:
{code}
java.io.NotSerializableException: javax.faces.component.html.HtmlInputText
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
java.util.HashMap.writeObject(HashMap.java:1001)
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)
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
java.util.HashMap.writeObject(HashMap.java:1001)
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)
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
com.sun.faces.renderkit.ClientSideStateHelper.doWriteState(ClientSideStateHelper.java:293)
com.sun.faces.renderkit.ClientSideStateHelper.writeState(ClientSideStateHelper.java:167)
com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:123)
com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:155)
com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:221)
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:397)
com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
{code}
I'm getting this (or similar) exceptions for the following combinations of JSF implementation and state saving configuration:
* Mojarra <= 2.0.2 (client side state saving)
* MyFaces (all versions, client & server side state saving)
I'm NOT getting this exception with:
* Mojarra <= 2.0.2 (server side state saving)
* Mojarra >= 2.0.3 (client & server side state saving)
The problem seems to be that {{UIValidateForm}} saves a {{Map<String,UIInput>}} to the view state. Older Mojarra versions and MyFaces will try to serialize this map which will fail because {{UIInput}} doesn't implement {{Serializable}}. Newer Mojarra versions are handling maps by processing keys and values individually and seem to correctly detect that {{UIInput}} implements {{StateHolder}}.
However I don't think that a JSF implementation is required to support such situations. I looked at the spec and it only says that the objects written to the state (a map in this case) have to either implement {{Serializable}} or {{StateHolder}} (see 3.2.4.2).
I'm seeing the following options for this problem:
* Keep the current behavior. But this breaks compatibility with older Mojarra versions and all MyFaces versions.
* Replace the map with a list. I think this should work because I saw special handling for lists in both Mojarra and MyFaces. But the spec doesn't enforce this for a JSF implementation.
* Don't store the map in the state at all. I think this should work because the map is always populated with the required values by {{FormValidationFieldProducer}} before the actual validation happens.
What do you think?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (SEAMPERSIST-52) Problem with Jboss AS 6.0.0.FINAL and WELD 1.1.0.CR3 and SEAM PERSISTENCE 3.0.0.CR1
by Richard Hopkirk (JIRA)
Problem with Jboss AS 6.0.0.FINAL and WELD 1.1.0.CR3 and SEAM PERSISTENCE 3.0.0.CR1
-----------------------------------------------------------------------------------
Key: SEAMPERSIST-52
URL: https://issues.jboss.org/browse/SEAMPERSIST-52
Project: Seam Persistence
Issue Type: Bug
Affects Versions: 3.0.0.CR1
Environment: Jboss AS 6.0.0.FINAL, seam-persistence 3.0.0.CR1, seam-solder 3.0.0.CR1, weld 1.1.0.CR3, java version 1.6.0_07, windows
Reporter: Richard Hopkirk
I posted about this a while back on the WELD Users forum here [http://seamframework.org/Community/ProblemWithJbossAS600FINALAndWELD110CR...] but have had no replies to date.
Hi all,
I'm trying to use seam-persistence for TX demarcation. I've managed to get an Arquillian test up and running that hits a remote jboss-as 6 and all is well. The problem is that when I then try to deploy my JAR to jboss 6. I'm using a copy of the <b>"all"</b> server and have copied <b>seam-persistence-3.0.0.CR1.jar</b> and <b>seam-solder-3.0.0.CR1.jar</b> to /lib. On deployment of my JAR I get the following error:
`
2011-03-23 15:57:00,475 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (Thread-2) Error installing to Create: name=vfs:///D:/java/jboss/jboss-6.0.0.Final/server/jam/deploy/10jam-core-2011.1.2-SNAPSHOT.jar_WeldBootstrapBean state=Configured: java.lang.NullPointerException
at org.jboss.weld.util.ApiAbstraction.annotationTypeForName(ApiAbstraction.java:86) [:6.0.0.Final]
at org.jboss.weld.ejb.EJBApiAbstraction.<init>(EJBApiAbstraction.java:36) [:6.0.0.Final]
at org.jboss.weld.bootstrap.BeanDeployment.<init>(BeanDeployment.java:99) [:6.0.0.Final]
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:184) [:6.0.0.Final]
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:195) [:6.0.0.Final]
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:155) [:6.0.0.Final]
at org.jboss.weld.bootstrap.WeldBootstrap.startContainer(WeldBootstrap.java:286) [:6.0.0.Final]
at org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.initialize(BootstrapBean.java:106) [:6.0.0.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.GA]
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]
`
In an attempt to isolate any problems my code may be causing I then proceeded to run the <b>WELD 1.1.0.CR3</b> tests in the <b>"tests-arquillian"</b> folder against a remote jboss as 6 instance running the <b>"all"</b> server with the <b>seam-persistence</b> and <b>seam-solder</b> jars above deployed in the /lib directory. This results in none of the tests running and when I look in the server.log I see the following:
`
2011-03-24 14:34:11,840 INFO [org.jboss.weld.Version] (WorkerThread#0[XXX.XXX.XXX.XXX:56799]) WELD-000900 1.1.0 (CR3)
2011-03-24 14:34:12,056 DEBUG [org.jboss.weld.Bootstrap] (WorkerThread#0[XXX.XXX.XXX.XXX:56799]) WELD-000103 Enabled alternatives for Manager
Enabled alternatives: [] []
Registered contexts: [interface javax.enterprise.context.ApplicationScoped, interface javax.enterprise.context.ConversationScoped, interface javax.enterprise.context.SessionScoped, interface javax.inject.Singleton, interface javax.enterprise.context.Dependent, interface javax.enterprise.context.RequestScoped]
Registered beans: 0
Specialized beans: 0
: [] []
2011-03-24 14:34:12,057 DEBUG [org.jboss.weld.Bootstrap] (WorkerThread#0[XXX.XXX.XXX.XXX:56799]) WELD-000104 Enabled decorator types for Manager
Enabled alternatives: [] []
Registered contexts: [interface javax.enterprise.context.ApplicationScoped, interface javax.enterprise.context.ConversationScoped, interface javax.enterprise.context.SessionScoped, interface javax.inject.Singleton, interface javax.enterprise.context.Dependent, interface javax.enterprise.context.RequestScoped]
Registered beans: 0
Specialized beans: 0
: []
2011-03-24 14:34:12,057 DEBUG [org.jboss.weld.Bootstrap] (WorkerThread#0[XXX.XXX.XXX.XXX:56799]) WELD-000105 Enabled interceptor types for Manager
Enabled alternatives: [] []
Registered contexts: [interface javax.enterprise.context.ApplicationScoped, interface javax.enterprise.context.ConversationScoped, interface javax.enterprise.context.SessionScoped, interface javax.inject.Singleton, interface javax.enterprise.context.Dependent, interface javax.enterprise.context.RequestScoped]
Registered beans: 0
Specialized beans: 0
: []
2011-03-24 14:34:12,071 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (WorkerThread#0[XXX.XXX.XXX.XXX:56799]) Error installing to Create: name=vfs:///D:/java/jboss/jboss-6.0.0.Final/server/all/deploy/test.war_WeldBootstrapBean state=Configured: java.lang.NullPointerException
at org.jboss.weld.util.ApiAbstraction.annotationTypeForName(ApiAbstraction.java:86) [:6.0.0.Final]
at org.jboss.weld.ejb.EJBApiAbstraction.<init>(EJBApiAbstraction.java:36) [:6.0.0.Final]
at org.jboss.weld.bootstrap.BeanDeployment.<init>(BeanDeployment.java:99) [:6.0.0.Final]
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:184) [:6.0.0.Final]
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:195) [:6.0.0.Final]
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:155) [:6.0.0.Final]
at org.jboss.weld.bootstrap.WeldBootstrap.startContainer(WeldBootstrap.java:286) [:6.0.0.Final]
at org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.initialize(BootstrapBean.java:106) [:6.0.0.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]
`
<b>NOTE</b>: The WELD tests run successfully using the same setup as above if I remove the <b>seam-persistence</b> and <b>seam-solder</b> JARs from the /lib directory. My full setup is as follows:
# <b>Windows 7</b>
# <b>"java version 1.6.0_07 / Java(TM) SE Runtime Environment (build 1.6.0_07-b06) / Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)"</b>
# <b>Jboss AS 6.0.0.FINAL</b>
# <b>seam-persistence 3.0.0.CR1</b>
# <b>seam-solder 3.0.0.CR1</b>
# <b>weld 1.1.0.CR3</b>
I also have full <b>TRACE</b> level logging for <b>org.jboss.weld</b> available for both runs e.g. tests pass / tests fail to run, if this would be useful.
Is there some configuration missing ? Should I be using a more recent version of <b>seam-persistence</b> / <b>seam-solder</b> ? Any help greatly appreciated!
Apologies if the formatting is a bit messed up!!
regards,
Rich
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months