[
https://issues.apache.org/jira/browse/EXTVAL-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gerhard Petracek resolved EXTVAL-108.
-------------------------------------
Fix Version/s: 2.0.4-SNAPSHOT
Resolution: Fixed
> validateBean and java.lang.InstantiationException:
> org.apache.myfaces.extensions.validator.beanval.interceptor.BeanValidatorWrapper
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: EXTVAL-108
> URL: https://issues.apache.org/jira/browse/EXTVAL-108
> Project: MyFaces Extensions Validator
> Issue Type: Bug
> Components: Bean Validation
> Affects Versions: 2.0.3
> Environment: PrimeFaces 2.0.0, Mojarra JSF Implementation
> (javax.faces/2.0) 2.0.2 -FCS, ExtVal: 2.0.4-SNAPSHOT
> Reporter: Simon Zambrovski
> Fix For: 2.0.4-SNAPSHOT
>
>
> I observe a strange exception by that appears inside of the
> BeanValidatorWrapper in a very specific scenario. Here is how it goes:
> I use PrimeFaces 2.0.2 running on Mojarra JSF and using ExtVal for Bean
> Validation (especially to support @Valid). It works perfect, except for
> one case. If I open a popup (p:dialog) and use a link (p:commandButton)
> which submits a form which contains a f:validateBean tag setting a Bean
> Validation group - an exception is thrown during an attempt to access an
> non-existent default constructor in BeanValidatorWrapper. If I remove
> the f:validateBean tag, everything works fine, and if I use it not from
> the popup too. Here is the VDL:
> <p:dialog widgetVar="PopupDialog" fixedCenter="true"
> header="Customer Search" modal="true" close="false">
> <h:form id="PopupDialogForm" prependId="false">
> <h:messages globalOnly="true" errorClass="error"
> fatalClass="fatal" infoClass="info" warnClass="warn" />
> <p:panel header="Customer Search">
> <h:panelGrid columns="1">
> <h:panelGrid columns="2">
> <h:outputLabel for="name" value="Name:" />
> <h:inputText id="name"
> value="#{searchController.search.name}" label="#{msgs.label}">
> <f:validateBean
> validationGroups="de.techjava.web.popup.validation.SearchGroup" />
> </h:inputText>
> </h:panelGrid>
> <h:message for="name" id="name_msg" />
> <p:commandButton value="Search"
> action="#{searchController.doSearch}" onsuccess="if (args) { var isValid
> = args.isValid; if (isValid) { PopupDialog.hide();}}"
> update="@form" process="@form" />
> </h:panelGrid>
> </p:panel>
> <p:panel header="Customer Search Result">
> <p:dataTable id="items"
> value="#{searchController.result}" var="item">
> <p:column>
> <f:facet name="header">
> <h:outputText value="Name" />
> </f:facet>
> <h:outputText value="#{item.name}" />
> </p:column>
> </p:dataTable>
> </p:panel>
> <p:commandButton value="Close"
> action="#{searchController.doCancel}" onsuccess="PopupDialog.hide()"
> update="@none" process="@this" />
> </h:form>
> </p:dialog>
> The Stacktrace looks like following:
> java.lang.InstantiationException:
> org.apache.myfaces.extensions.validator.beanval.interceptor.BeanValidatorWrapper
> at java.lang.Class.newInstance0(Class.java:340)
> at java.lang.Class.newInstance(Class.java:308)
> at
> javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:103)
> at
> javax.faces.component.AttachedObjectListHolder.restoreState(AttachedObjectListHolder.java:153)
> at javax.faces.component.UIInput.restoreState(UIInput.java:1375)
> at
> com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:242)
> at
> com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:147)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1442)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at javax.faces.component.UIForm.visitTree(UIForm.java:322)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1453)
> at
> com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:234)
> at
> com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:177)
> at
> com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:119)
> at
> com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:438)
> at
> com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:144)
> at
> com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:198)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
> at
> com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
> at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.