You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Gerhard Petracek <ge...@gmail.com> on 2010/07/19 06:04:26 UTC

Re: validateBean and java.lang.InstantiationException: org.apache.myfaces.extensions.validator.beanval.interceptor.BeanValidatorWrapper

hi simon,

by default extval doesn't use tags. so f:validateBean isn't supported.
the typesafe alternative for using group validation,... is @BeanValidation.

if you really need a tag, it's quite simple to impl. it.
[1] illustrates an implementation which provides all features of
@BeanValidation via a tag.

regards,
gerhard

[1]
http://code.google.com/p/os890/source/browse/#svn/trunk/java/web/jsf/extval.bv/tag_based_extval-bv_meta-data

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2010/7/19 Simon Zambrovski <sz...@gmail.com>

>  Hi Folks,
>
> 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>
>
>
>
> Any ideas?
>
> Kind regards,
>
> Simon
>

Re: validateBean and java.lang.InstantiationException: org.apache.myfaces.extensions.validator.beanval.interceptor.BeanValidatorWrapper

Posted by Gerhard Petracek <ge...@gmail.com>.
hi simon,

ok - great to hear!

yes - please file a jira issue.
(as mentioned before:
 >please file a jira issue (new feature) for the support of f:validateBean.)

regards,
gerhard

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2010/7/21 Simon Zambrovski <sz...@gmail.com>

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Gerhard!
>
> thanks for the excellent job. The exception is gone.
>
> Should I help you to follow the community process? So should I file
> the JIRA bug for it?
>
> Kind regards,
>
> Simon
>
>
> Am 19.07.2010 07:04, schrieb Gerhard Petracek:
> > i've uploaded the current snapshot to [1]. please try this new
> > version.
> >
> > regards, gerhard
> >
> > [1] http://people.apache.org/~gpetracek/myfaces/extval/snapshots/
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse - JSF Consulting, Development and Courses in
> > English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> > 2010/7/19 Gerhard Petracek <ge...@gmail.com>
> >
> >> short addition:
> >>
> >> with ExtVal 2 f:validateBean is ~supported. It's more a feature
> >> which is prepared for the next version of ExtVal. I know what's
> >> the issue here. Please file a jira issue (new feature) for the
> >> support of f:validateBean.
> >>
> >> regards, gerhard
> >>
> >>
> >> http://www.irian.at
> >>
> >> Your JSF powerhouse - JSF Consulting, Development and Courses in
> >> English and German
> >>
> >> Professional Support for Apache MyFaces
> >>
> >>
> >> 2010/7/19 Gerhard Petracek <ge...@gmail.com>
> >>
> >> hi simon,
> >>>
> >>> by default extval doesn't use tags. so f:validateBean isn't
> >>> supported. the typesafe alternative for using group
> >>> validation,... is @BeanValidation.
> >>>
> >>> if you really need a tag, it's quite simple to impl. it. [1]
> >>> illustrates an implementation which provides all features of
> >>> @BeanValidation via a tag.
> >>>
> >>> regards, gerhard
> >>>
> >>> [1]
> >>>
>
> http://code.google.com/p/os890/source/browse/#svn/trunk/java/web/jsf/extval.bv/tag_based_extval-bv_meta-data
> >>>
> >>>
> >>>
> http://www.irian.at
> >>>
> >>> Your JSF powerhouse - JSF Consulting, Development and Courses
> >>> in English and German
> >>>
> >>> Professional Support for Apache MyFaces
> >>>
> >>>
> >>> 2010/7/19 Simon Zambrovski <sz...@gmail.com>
> >>>
> >>> Hi Folks,
> >>>>
> >>>> 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>
> >>>>
> >>>>
> >>>>
> >>>> Any ideas?
> >>>>
> >>>> Kind regards,
> >>>>
> >>>> Simon
> >>>>
> >>>
> >>>
> >>
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxG58sACgkQwNq/QDsDo2u+xwCeOqGDaTDYG5vJAYgNbwFZR+eS
> rHgAn19a0eNFVR2z6jo1KwjfpUMNgTF8
> =Xh/9
> -----END PGP SIGNATURE-----
>
>

Re: validateBean and java.lang.InstantiationException: org.apache.myfaces.extensions.validator.beanval.interceptor.BeanValidatorWrapper

Posted by Simon Zambrovski <sz...@gmail.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Gerhard!

thanks for the excellent job. The exception is gone.

Should I help you to follow the community process? So should I file
the JIRA bug for it?

Kind regards,

Simon


Am 19.07.2010 07:04, schrieb Gerhard Petracek:
> i've uploaded the current snapshot to [1]. please try this new
> version.
>
> regards, gerhard
>
> [1] http://people.apache.org/~gpetracek/myfaces/extval/snapshots/
>
> http://www.irian.at
>
> Your JSF powerhouse - JSF Consulting, Development and Courses in
> English and German
>
> Professional Support for Apache MyFaces
>
>
> 2010/7/19 Gerhard Petracek <ge...@gmail.com>
>
>> short addition:
>>
>> with ExtVal 2 f:validateBean is ~supported. It's more a feature
>> which is prepared for the next version of ExtVal. I know what's
>> the issue here. Please file a jira issue (new feature) for the
>> support of f:validateBean.
>>
>> regards, gerhard
>>
>>
>> http://www.irian.at
>>
>> Your JSF powerhouse - JSF Consulting, Development and Courses in
>> English and German
>>
>> Professional Support for Apache MyFaces
>>
>>
>> 2010/7/19 Gerhard Petracek <ge...@gmail.com>
>>
>> hi simon,
>>>
>>> by default extval doesn't use tags. so f:validateBean isn't
>>> supported. the typesafe alternative for using group
>>> validation,... is @BeanValidation.
>>>
>>> if you really need a tag, it's quite simple to impl. it. [1]
>>> illustrates an implementation which provides all features of
>>> @BeanValidation via a tag.
>>>
>>> regards, gerhard
>>>
>>> [1]
>>>
http://code.google.com/p/os890/source/browse/#svn/trunk/java/web/jsf/extval.bv/tag_based_extval-bv_meta-data
>>>
>>>
>>>
http://www.irian.at
>>>
>>> Your JSF powerhouse - JSF Consulting, Development and Courses
>>> in English and German
>>>
>>> Professional Support for Apache MyFaces
>>>
>>>
>>> 2010/7/19 Simon Zambrovski <sz...@gmail.com>
>>>
>>> Hi Folks,
>>>>
>>>> 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>
>>>>
>>>>
>>>>
>>>> Any ideas?
>>>>
>>>> Kind regards,
>>>>
>>>> Simon
>>>>
>>>
>>>
>>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
iEYEARECAAYFAkxG58sACgkQwNq/QDsDo2u+xwCeOqGDaTDYG5vJAYgNbwFZR+eS
rHgAn19a0eNFVR2z6jo1KwjfpUMNgTF8
=Xh/9
-----END PGP SIGNATURE-----


Re: validateBean and java.lang.InstantiationException: org.apache.myfaces.extensions.validator.beanval.interceptor.BeanValidatorWrapper

Posted by Gerhard Petracek <ge...@gmail.com>.
i've uploaded the current snapshot to [1].
please try this new version.

regards,
gerhard

[1] http://people.apache.org/~gpetracek/myfaces/extval/snapshots/

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2010/7/19 Gerhard Petracek <ge...@gmail.com>

> short addition:
>
> with ExtVal 2 f:validateBean is ~supported. It's more a feature which is
> prepared for the next version of ExtVal.
> I know what's the issue here. Please file a jira issue (new feature) for
> the support of f:validateBean.
>
> regards,
> gerhard
>
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2010/7/19 Gerhard Petracek <ge...@gmail.com>
>
>  hi simon,
>>
>> by default extval doesn't use tags. so f:validateBean isn't supported.
>> the typesafe alternative for using group validation,... is
>> @BeanValidation.
>>
>> if you really need a tag, it's quite simple to impl. it.
>> [1] illustrates an implementation which provides all features of
>> @BeanValidation via a tag.
>>
>> regards,
>> gerhard
>>
>> [1]
>> http://code.google.com/p/os890/source/browse/#svn/trunk/java/web/jsf/extval.bv/tag_based_extval-bv_meta-data
>>
>> http://www.irian.at
>>
>> Your JSF powerhouse -
>> JSF Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache MyFaces
>>
>>
>> 2010/7/19 Simon Zambrovski <sz...@gmail.com>
>>
>>  Hi Folks,
>>>
>>> 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>
>>>
>>>
>>>
>>> Any ideas?
>>>
>>> Kind regards,
>>>
>>> Simon
>>>
>>
>>
>

Re: validateBean and java.lang.InstantiationException: org.apache.myfaces.extensions.validator.beanval.interceptor.BeanValidatorWrapper

Posted by Gerhard Petracek <ge...@gmail.com>.
short addition:

with ExtVal 2 f:validateBean is ~supported. It's more a feature which is
prepared for the next version of ExtVal.
I know what's the issue here. Please file a jira issue (new feature) for the
support of f:validateBean.

regards,
gerhard

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2010/7/19 Gerhard Petracek <ge...@gmail.com>

> hi simon,
>
> by default extval doesn't use tags. so f:validateBean isn't supported.
> the typesafe alternative for using group validation,... is @BeanValidation.
>
> if you really need a tag, it's quite simple to impl. it.
> [1] illustrates an implementation which provides all features of
> @BeanValidation via a tag.
>
> regards,
> gerhard
>
> [1]
> http://code.google.com/p/os890/source/browse/#svn/trunk/java/web/jsf/extval.bv/tag_based_extval-bv_meta-data
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2010/7/19 Simon Zambrovski <sz...@gmail.com>
>
>  Hi Folks,
>>
>> 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>
>>
>>
>>
>> Any ideas?
>>
>> Kind regards,
>>
>> Simon
>>
>
>