Bean Validation

Hi all,
sometime when i run application , shows an error like below shown.....
WARNING: Apache Trinidad is running with time-stamp checking enabled. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
24 Dec, 2011 9:51:08 AM org.apache.myfaces.trinidad.component.UIXEditableValue _isBeanValidationAvailable
WARNING: A Bean Validation provider is not present, therefore bean validation is disabled
Please Help Me
PMS

That is not an error. You can ignore it.

Similar Messages

  • JSF 1.0 Final - no backing bean validation of empty imputs

    Hi,
    I have simple inputText with validator in backing bean :
    <h:inputText id="layName" maxlength="30" value="#{shp.layerName}" validator="#{shp.validate}"/>
    and validator is executed properly when inputText isn't empty, but when is empty it isn't !.
    In my opinion validator should be executed in every reason, so I wonder if it is a bug ?
    I know that I can set required attribute to "true" and have additional validation of empty values :
    <h:inputText required="true" id="layName" maxlength="30" value="#{shp.layerName}" validator="#{shp.validate}"/>
    <h:message id="errors1" for="layName"/>
    but in this case I will receive standard error message. So my second question is how to overwrite this message with localized massage if backing bean validator isn't executed ?
    Thanks in advance.
    Olek

    If required is "false", then validators will not execute when the field is empty.
    The spec defines how to override the error message for when "required" validation fails, though I don't have the spec handy at the moment.
    -- Adam Winer (EG member)

  • JPA2 / Hibernate on WL 10.3.5: exception in Bean Validation

    Hi all,
    I am deploying on Weblogic 10.3.5. Our application uses JPA 2.0 and our provider is Hibernate 4.1.7. So far this has been working for us without a problem.
    My problems started when I tried to add Bean Validation (JSR-303) implemented by the Hibernate Validation, as I get a strange stacktrace where Hibernate Validator looks up the classpach for loaded JPA providers, and instead of Hibernate, OpenJPA comes up, a version that is incompatible with JPA 2.
    JPA 2 + Hibernate work properly for months now, so there is no doubt as to whether JPA 2 has been enabled properly.
    Apparently, this has been recorded as an issue on Hibernate Jira ( [HV-425|https://hibernate.onjira.com/browse/HV-425] ), but with a different persistence provider and an earlier Weblogic version (10.3.3 and 10.3.4).
    Is there something I have mis-configured that is preventing Hibernate to be picked up as my persistence provider?
    This is my EJB code where I try to validate my top-level entity:
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public void saveResult() throws ResultInvalidException{
         ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
         Validator validator = factory.getValidator();
         Set<ConstraintViolation<FullResultsSet>> violations = validator.validate(result);
         if(!violations.isEmpty()) {
              throw new ResultInvalidException(violations);
         result.setCreatedDate(new Date());
         if(result.getRevisionNumber() != null) {
              result.setRevisionNumber(result.getRevisionNumber() + 1);
         } else{
              result.setRevisionNumber(1L);
         if (result.getFullResultsSetId() == null) {
              getEm().persist(result);
         getEm().flush();
    }This is my startWeblogic.cmd (I have added the JSF 2 libraries):
    @ECHO OFF
    @REM WARNING: This file is created by the Configuration Wizard.
    @REM Any changes to this script may be lost when adding extensions to this configuration.
    SETLOCAL
    set USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:+DisableExplicitGC -XX:+UseParNewGC -XX:ParallelGCThreads=14 -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=31 -XX:CMSInitiatingOccupancyFraction=75
    set PRODUCTION_MODE=false
    set debugFlag=true
    set DEBUG_PORT=8453
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.compiler=NONE -Djava.awt.headless=true
    set DOMAIN_HOME=C:\dbin\WLS103~1\user_projects\domains\eudract_domain
    set PRE_CLASSPATH=%MW_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%MW_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-0.jar;
    call "%DOMAIN_HOME%\bin\startWebLogic.cmd" %*
    ENDLOCALThese are the contents of my .ear/WEB-INF/lib file:
    commons-beanutils-1.7.0.jar
    commons-collections-3.2.jar
    commons-digester-1.8.1.jar
    commons-io-1.4.jar
    commons-lang-2.4.jar
    commons-lang3-3.0.1.jar
    commons-logging-1.1.1.jar
    commons-validator-1.2.0.jar
    YYYYYY-public-domain-1.2.1-SNAPSHOT.jar
    YYYYYY-secure2public-1.2.1-SNAPSHOT.jar
    dom4j-1.6.1.jar
    dozer-5.3.0.jar
    ehcache-core-2.3.1.jar
    el-api-1.0.jar
    el-impl-1.0.jar
    el-messages-1.0.jar
    XXXXXXX-cache-1.0.0.jar
    XXXXXXX-configuration2-1.0.0.jar
    XXXXXXX-domain-8.5.0-SNAPSHOT.jar
    XXXXXXX-enumerations-8.5.0-SNAPSHOT.jar
    XXXXXXX-jsf-tools-8.5.0-SNAPSHOT.jar
    XXXXXXX-main-configuration-8.5.0-SNAPSHOT.jar
    XXXXXXX-utils-1.0.0.jar
    XXXXXXX-xml-model-8.5.0-SNAPSHOT.jar
    hibernate-commons-annotations-4.0.1.Final.jar
    hibernate-core-4.1.7.Final.jar
    hibernate-entitymanager-4.1.7.Final.jar
    hibernate-jpa-2.0-api-1.0.1.Final.jar
    hibernate-validator-4.3.1.Final.jar
    imaging-01012005.jar
    javassist-3.15.0-GA.jar
    jboss-logging-3.1.0.GA.jar
    jboss-transaction-api_1.1_spec-1.0.0.Final.jar
    jcaptcha-1.0.jar
    jcaptcha-api-1.0.jar
    jsf-api-2.0.jar
    jsf-facelets-1.1.15.jar
    jsf-impl-2.0.1-FCS.jar
    jstl-1.1.2.jar
    log4j-1.2.13.jar
    oro-2.0.8.jar
    quartz-1.5.2.jar
    ZZZZZZZ-configuration-0.6-SNAPSHOT.jar
    ZZZZZZZ-domain-0.6-SNAPSHOT.jar
    ZZZZZZZ-logic-api-0.6-SNAPSHOT.jar
    ZZZZZZZ-persistence-0.6-SNAPSHOT.jar
    richfaces-api-3.3.3.Final.jar
    richfaces-impl-jsf2-3.3.3.Final.jar
    richfaces-ui-3.3.3.Final.jar
    slf4j-api-1.4.2.jar
    slf4j-log4j12-1.4.2.jar
    validation-api-1.0.0.GA.jar
    velocity-1.7.jar
    weblogic-di-10.3.5.jar
    xml-apis-1.0.b2.jarThis is the stacktrace:
    javax.faces.FacesException: #{ResultBean.saveResult}: javax.ejb.EJBException: EJB Exception: : java.lang.AbstractMethodError: org.apache.openjpa.persistence.PersistenceProviderImpl.getProviderUtil()Ljavax/persistence/spi/ProviderUtil;
         at javax.persistence.Persistence$PersistenceUtilImpl.isLoaded(Unknown Source)
         at org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:57)
         at org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:130)
         at org.hibernate.validator.internal.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:46)
         at org.hibernate.validator.internal.engine.ValidatorImpl.isCascadeRequired(ValidatorImpl.java:1250)
         at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:463)
         at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:312)
         at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:133)
         at eu.ema.eudract.results.result.ResultStatefulServiceBean.saveResult(ResultStatefulServiceBean.java:79)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy252.saveResult(Unknown Source)
         at eu.ema.eudract.results.result.ResultStatefulServiceBean_6puf0g_ResultStatefulServiceImpl.__WL_invoke(Unknown Source)
         at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39)
         at eu.ema.eudract.results.result.ResultStatefulServiceBean_6puf0g_ResultStatefulServiceImpl.saveResult(Unknown Source)
         at eu.ema.eudract.results.presentation.result.ResultBean.saveResult(ResultBean.java:29)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:315)
         at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:329)
         at org.ajax4jsf.component.AjaxViewRoot.broadcastEventsForPhase(AjaxViewRoot.java:304)
         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:261)
         at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:474)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:90)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    Adding to the question above, following is my struts.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
    <constant name="struts.enable.DynamicMethodInvocation"
    value="false" />
    <constant name="struts.devMode" value="false" />
    <constant name="struts.custom.i18n.resources"
    value="ApplicationResources" />
    <package name="default" extends="struts-default" namespace="/">
    <action name="login"
    class="struts2.action.LoginAction">
    <result name="success">Welcome.jsp</result>
    <result name="error">Login.jsp</result>
    </action>
    </package>
    </struts>
    ---------------------------------------------------------------------------------------

  • Backing Bean Validation Method error

    Hi all,
    I've an ADF JSF User Registration Form and I want to set my server-side validation to confirm passwords entered by the user using the validator attribute bound to customized validation logic sitting in a method my backing bean. I've tried quite a few cracks at this but I still seem to get a java.lang.NullPointerException error when the method is invoked.
    The relevant method in my Backing Bean looks like this:
    public void comparePassword(FacesContext facesContext, UIComponent uiComponent, Object newValue) {
    //Get the new value that is passed passed from the Confirm Password field
    String confirmPassword = (String)newValue;
    //Get the password that has already been entered
    String password = (String)getLoginPasswordText().getValue();
    //Compare passwords and raise validation error message
    if (!password.equals(confirmPassword)){
    throw new ValidatorException(new FacesMessage
    (FacesMessage.SEVERITY_ERROR,
    "Passwords need to be the same",
    "Password values should be the same"));
    The getters and setters for the components are also in the bean and the gettLoginPasswordText() returns the original password input text field (the one that I want to compare it to).
    Is there something that I've missed here?
    Cheers

    Thanks Frank.
    I now understand a bit more about value binding. But unfortunately I need a little more help (from anyone) on this one. I've tried quite a few things and I think the problem stems from the fact that the validation code doesn't seem to pickup the value entered in the comparison field - at least in the way that I've coded it. Here's a more complete example of what I'm trying to overcome:
    I've got two input text components:
    <af:inputText required="true" simple="true"
    id="loginPasswordText"
    immediate="true"
    value="#{backing_UserRegistration.password1}">
    </af:inputText>
    <af:inputText required="true" simple="true"
    id="loginConfirmPasswordText"
    immediate="true"
    validator="#{backing_UserRegistration.comparePassword}"
    value="#{backing_UserRegistration.password2}">
    </af:inputText>
    I've setup the relevant accessors as in the following:
    String password1 = "";
    public String getPassword1(){
    return password1;
    String password2 = "";
    public String getPassword2(){
    return password2;
    And my validation now code looks like this:
    public void comparePassword(FacesContext context, UIComponent toValidate, Object value) {
    if (!Password2.equals(Password1)) {
    FacesMessage msg = new FacesMessage("summary message", " detailed message");
    msg.setSeverity(FacesMessage.SEVERITY_INFO);
    ValidatorException e = new ValidatorException(msg);
    throw e;
    I've tested the validation code on a standalone basis ie passing in a new variable as part of the method ie.
    String word = (String) value;
    if (word.equals("tom"))....
    The validator and message fires OK, so I know the problem lies with picking up the entered values for password1 and password2. I know the values are there because I can "see" them on screen and they are recognized by standalone validators and the bean has a session scope.
    Ideas anyone?
    Thanks

  • Access a manage bean through other bean/validator

    Hello
    I want to access a session managed bean from a Validator i created.
    I did added that to my faces-config.xml :
         <referenced-bean>
              <referenced-bean-name>userDetails</referenced-bean-name>
              <referenced-bean-class>com.ibm.manageBeans.UserDetails</referenced-bean-class>          
         </referenced-bean>
    but how do i access the bean within the validator class ??
    Thanks

    I found why this happen but i can't fix it :
    It happen because the validator class is invoking
    before the bean's setters are.
    So naturally the validator get a null when he uses
    the getters.
    What should I do in such a case ?Based on what you have written I imagine you are expecting the bean's values to be set from values in the request? If you are just acting on one value, i.e. the thing you are validating then that value is passed into the validator method, you do not need to get it from a bean.

  • Problem with Validation in Struts

    Dear All,
    I am facing a proble with validation in struts.
    I have got this code in my action class
    //Initial Code...
    ArrayList branches=new ArrayList();
    branches.add("B01", "Main Branch");
    branches.add("B02", "Second Branch");
    branches.add("B03", "Third Branch");
    DynaValidatorForm memberForm=(DynaValidatorForm)form;
    memberForm.set(branches);
    //Finalizing code.....This form is getting validated in validation.xml.
    This action is being forwarded to folllowing JSP.
    //Initial Code...
            <tr>
                <td align="right"><strong>Branch Name </strong></td>
                <td> </td>
                <td align="left">
                    <html:select property="branid">
                        <html:optionsCollection name="memberForm" property="branches" value="key" label="value"/>
                    </html:select>
                </td>
            </tr>
    //Later code...I have action mapping as..
            <action path="/member/save" input="member.page" name="memberForm" validate="true"
            scope="request" type="com.mlm.action.MemberAction" parameter="action">
                <forward name="success" path="/show.do?action=member" redirect="true"/>
            </action>Now, the problem is that when the form doesn't pass the validation then it gives an exception that..
    Can't find collection 'branches' in bean

    sauanu wrote:
    Ok, now I am giving full code of my module...
    Form-bean
    <form-beans>
    <form-bean name="memberForm" type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="id" type="java.lang.String"/>
    <form-property name="membname" type="java.lang.String"/>
    <form-property name="address" type="java.lang.String"/>
    <form-property name="branid" type="java.lang.String"/>
    <form-property name="branches" type="java.util.ArrayList"/>
    </form-bean>
    </form-beans>Validation is being done for all fileds except "branches". Validation type is "requried"
    My Jsp....
    <html:form action="/member/save?action=save">
    <html:hidden property="id"/>
    <tr>
    <td align="right"><strong>Member Name </strong></td>
    <td> </td>
    <td align="left">
    <html:text property="membname"/>
    </td>
    </tr>
    <tr>
    <td align="right"><strong>Address</strong></td>
    <td> </td>
    <td align="left">
    <html:text property="address"/>
    </td>
    </tr>
    <tr>
    <td align="right"><strong>Branch Name </strong></td>
    <td> </td>
    <td align="left">
    <html:select property="branid">
    <html:optionsCollection name="memberForm" property="branches" />
    </html:select>
    </td>
    </tr>
    <tr>
    <td align="right">
    <html:submit/>
    </td>
    <b><td>   </td></b>
    <td>
    <html:button value="Cancel" onclick="javascript:history.go(-1)" property="cancel"/>
    </td>
    </tr>
    </html:form>This is the code..
    I tried to find out the problem and I found that.. when the form does not pass the validation its input page gets displayed..
    Now, when the input is getting displayed.. "branches" field of the form contains null???Why?
    Edited by: sauanu on ?? ??????, ???? ??:?? ?????????Forget,about Validations.
    Who is forwarding the control to this JSP page or view ??
    Is it Action method code which metioned earlier doing it ??
    Or some other Action is involved if it is some other action please intialize Values of branches component in the respective action.
    Also,
    Also,
    ArrayList branches=new ArrayList();
    branches.add("B01", "Main Branch");
    branches.add("B02", "Second Branch");
    branches.add("B03", "Third Branch"); I believe you need to get a good understanding of Java Collection classes aswell.
    You can add things as entities in the above case lets create a simple java bean named Option.
    public class Option implements Serializable{
        private String label;
        private String value;
        public void setValue(String value){this.value = value;};
        public String getValue(){return this.value;}
        public void setLabel(String label){this.label = label;}
        public String getLabel(){return this.label;}
    } and inside the action which is forwarding to the respective view
    ArrayList branches=new ArrayList();
    Option option = new Option();
    option.setValue("B01");
    option.setLabel("Main Branch");
    branches.add(option);
    option = new Option();
    option.setValue("B02");
    option.setLabel("Second Branch");
    branches.add(option);
    option = new Option();
    option.setValue("B03");
    option.setLabel("Third Branch");
    branches.add(option);
          <html:select property="branid">
                   <html:options name="memberForm" collection="branches"   value="value" label="label" />
           </html:select>and one more thing is is that after the validation if it is not validated it'd be sent back to input page which destorys the request therefore try making scope of "memberForm" to session in your action mappings and check.
    Hope this might help :)
    REGARDS,
    RaHuL

  • Forms and validations - here's some of my ideas, what are yours?

    One of the big things still missing from the JFX space (especially where JEE is concerned) is forms and form validations. Maybe you guys have been luckier but at least 80% of the screens I've had to build in my career have been boring old forms - enter data in the fields, validate them and hit submit.
    So, I've been hacking around on this to try and get a pattern and hopefully some reusable classes for doing this in JavaFX. I have something that works but the code is verbose and less than elegant. I'm hoping some of you guys might want to kick around some ideas on this with me here. If we can come up with something that works, I'd like to either include it in [url http://www.zenjava.com/jfx-flow/]JFX Flow, or put it out as a separate open source project (whichever makes more sense).
    What I think needs to be supported:
    * Map between a normal Java bean and the fields on a form
    * Validate the data, i.e. specifying the constraints on a field and then checking those constraints
    * Show a validation summary at the top of the form
    * Highlight individual fields if they have validation errors
    * Support auto-validation, i.e. the validation highlights and messages will instantly update as the user types
    Some extra restrictions:
    * The data input will ideally be a normal bean and so it won't have observable values on it. In most projects I use, the beans are coming from the server and sometimes may be shared between desktop client and a jsp/web client, or even be a third party API so they can't be changed. End result: we don't want any JFX complexities or dependencies in our server code (design leak). This rule could be bent but only as a last resort.
    * The validations must be defined relative to the normal data bean not a JFX model or controller, etc. This is so the bean can be validated on the server as well as the client. The server must do validation to prevent dodgy data getting in (never trust a client). Ideally we don't want to be specifying the validations in two places (i.e. once for the client and once for the server) as this creates maintenance problems and weakens the integrity of the system over time.
    * Ideally the validation mechanism will be based on [url http://java.dzone.com/articles/bean-validation-and-jsr-303]JSR 303 - Bean Validations as this is quite nice. This is flexible however if there is a suitable alternative that integrates better.
    To give us something to reference in conversation, I've created a small working sample. This is only meant to be a rough starting point (at best) and I'd really like to get feedback on both the code (i.e. should we have a 'presentation model', how could bindings be better used, etc) and the general way I'm representing errors (i.e. should we use tooltips to show errors, or actually show the errors next to the field, should we use border colours or put a little exclamation mark over the field, should the fields be auto-validated or only validated on submit, etc).
    The example is a single form for editing a person. It has three fields, first name, last name and gender. When the form is blank, auto-editing is off. When the user submits the form it is validated and from that point on auto-validating is on. Error fields are highlighted with a style change, and a tooltip is added with details (I think we can do better - what's your ideas?).
    I have used all plain Java to keep thngs simple, but I'd be looking for the end result to translate to FXML as well. I've also coded everything into the one class but the eventual goal would be to have the common stuff moved out to reusable base classes, etc.
    Here's a workspace with some example code in it: http://code.google.com/p/jfxee/source/browse/trunk/jfxforms/
    Here's a running deploy of that code: http://zenjava.com/demo/form/forms.html
    (edit: I've moved the code to its own project and changed the url for the launch - the values above are the new, correct ones)
    Looking forward to hearing some thoughts on this topic.
    Edited by: zonski on 01-Dec-2011 13:41

    At Devoxx I did some straw man prototype that you might find useful (or hopeless, I'm not sure which, I did it in a hurry :-)). I followed some principles that I was influenced by years back by JGoodies, but I haven't looked at the JGoodies stuff in forever and know it isn't all the same. But anyway, like I said, I'm not sure it is actually useful but maybe there is something genius hidden in there.
    I have a Validator, which is just a simple SAM:
    import javafx.scene.control.Control;
    * @author Richard
    public interface Validator<C extends Control> {
        public ValidationResult validate(C control);
    }The idea is that it is given a Control, it will validate that control, and then return a ValidationResult. ValidationResult is actually only needed in cases of errors, since returning null indicates success, so the following is somewhat of a crock but you could rename it ValidationError or something and remove the "SUCCESS" type and there you are.
    public class ValidationResult {
        public enum Type { ERROR, WARNING, SUCCESS }
        private final String message;
        private final Type type;
        public ValidationResult(String message, Type type) {
            this.message = message;
            this.type = type;
        public final String getMessage() {
            return message;
        public final Type getType() {
            return type;
        }For good measure I threw in a ValidationEvent.
    import javafx.event.Event;
    import javafx.event.EventType;
    * @author Richard
    public class ValidationEvent extends Event {
        public static final EventType<ValidationEvent> ANY =
                new EventType<ValidationEvent>(Event.ANY, "VALIDATION");
        private final ValidationResult result;
        public ValidationEvent(ValidationResult result) {
            super(ANY);
            this.result = result;
        public final ValidationResult getResult() { return result; }
    }Because Control's don't presently have the notion of validation built in, I created a ValidationPane which is like a specialized StackPane, where there is a bottom layer, the control, and a glass pane layer. And from CSS you can style it however you like. The ValidationPane has a CSS style class set in case of errors / warnings. So without augmenting controls, the idea is that a ValidationPane subclass would exist to wrap each type of control you needed to validate. It did this because somebody has to wire up the listeners to the control to react on text input etc, and so I thought I'd like that encapsulated in something reusable, and there it was.
    import javafx.beans.DefaultProperty;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.ReadOnlyObjectProperty;
    import javafx.beans.property.ReadOnlyObjectWrapper;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.EventHandler;
    import javafx.scene.control.Control;
    import javafx.scene.layout.Region;
    * @author Richard
    @DefaultProperty("content")
    public abstract class ValidatorPane<C extends Control> extends Region {
         * The content for the validator pane is the control it should work with.
        private ObjectProperty<C> content = new SimpleObjectProperty<C>(this, "content", null);
        public final C getContent() { return content.get(); }
        public final void setContent(C value) { content.set(value); }
        public final ObjectProperty<C> contentProperty() { return content; }
         * The validator
        private ObjectProperty<Validator<C>> validator = new SimpleObjectProperty<Validator<C>>(this, "validator");
        public final Validator<C> getValidator() { return validator.get(); }
        public final void setValidator(Validator<C> value) { validator.set(value); }
        public final ObjectProperty<Validator<C>> validatorProperty() { return validator; }
         * The validation result
        private ReadOnlyObjectWrapper<ValidationResult> validationResult = new ReadOnlyObjectWrapper<ValidationResult>(this, "validationResult");
        public final ValidationResult getValidationResult() { return validationResult.get(); }
        public final ReadOnlyObjectProperty<ValidationResult> validationResultProperty() { return validationResult.getReadOnlyProperty(); }
         *  The event handler
        private ObjectProperty<EventHandler<ValidationEvent>> onValidation =
                new SimpleObjectProperty<EventHandler<ValidationEvent>>(this, "onValidation");
        public final EventHandler<ValidationEvent> getOnValidation() { return onValidation.get(); }
        public final void setOnValidation(EventHandler<ValidationEvent> value) { onValidation.set(value); }
        public final ObjectProperty<EventHandler<ValidationEvent>> onValidationProperty() { return onValidation; }
        public ValidatorPane() {
            content.addListener(new ChangeListener<Control>() {
                public void changed(ObservableValue<? extends Control> ov, Control oldValue, Control newValue) {
                    if (oldValue != null) getChildren().remove(oldValue);
                    if (newValue != null) getChildren().add(0, newValue);
        protected void handleValidationResult(ValidationResult result) {
            getStyleClass().removeAll("validation-error", "validation-warning");
            if (result != null) {
                if (result.getType() == ValidationResult.Type.ERROR) {
                    getStyleClass().add("validation-error");
                } else if (result.getType() == ValidationResult.Type.WARNING) {
                    getStyleClass().add("validation-warning");
            validationResult.set(result);
            fireEvent(new ValidationEvent(result));
        @Override
        protected void layoutChildren() {
            Control c = content.get();
            if (c != null) {
                c.resizeRelocate(0, 0, getWidth(), getHeight());
        @Override
        protected double computeMaxHeight(double d) {
            Control c = content.get();
            return c == null ? super.computeMaxHeight(d) : c.maxHeight(d);
        @Override
        protected double computeMinHeight(double d) {
            Control c = content.get();
            return c == null ? super.computeMinHeight(d) : c.minHeight(d);
        @Override
        protected double computePrefHeight(double d) {
            Control c = content.get();
            return c == null ? super.computePrefHeight(d) : c.prefHeight(d);
        @Override
        protected double computePrefWidth(double d) {
            Control c = content.get();
            return c == null ? super.computePrefWidth(d) : c.prefWidth(d);
        @Override
        protected double computeMaxWidth(double d) {
            Control c = content.get();
            return c == null ? super.computeMaxWidth(d) : c.maxWidth(d);
        @Override
        protected double computeMinWidth(double d) {
            Control c = content.get();
            return c == null ? super.computeMinWidth(d) : c.minWidth(d);
    }And finally the TextInputValidatorPane instance good for any TextInputControl. I think.
    import javafx.beans.InvalidationListener;
    import javafx.beans.Observable;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.scene.control.TextInputControl;
    * @author Richard
    public class TextInputValidatorPane<C extends TextInputControl> extends ValidatorPane<C> {
        private InvalidationListener textListener = new InvalidationListener() {
            public void invalidated(Observable o) {
                final Validator v = getValidator();
                final ValidationResult result = v != null ?
                    v.validate(getContent()) :
                    new ValidationResult("", ValidationResult.Type.SUCCESS);
                handleValidationResult(result);
        public TextInputValidatorPane() {
            contentProperty().addListener(new ChangeListener<C>() {
                public void changed(ObservableValue<? extends C> ov, C oldValue, C newValue) {
                    if (oldValue != null) oldValue.textProperty().removeListener(textListener);
                    if (newValue != null) newValue.textProperty().addListener(textListener);
        public TextInputValidatorPane(C field) {
            this();
            setContent(field);
    }This should also be usable as is from FXML since you can easily wrap a TextInputValidatorPane around a TextField, and CSS does all the styling, so I think it all just works. You probably need to have some library of sophisticated Validators which know how to read text from a TextField and compare against the validation annotations, but otherwise it should work well enough. Anyway, in the actual implementation I think I would omit the ValidationPane stuff completely and just build that part into the controls / skins. Like I said, this was a quick hack but seemed to get the "how do I visualize validation errors" part of the problem solved.
    Richard

  • Passing View accessor parameter using a bean.

    Hi i am working on LOV's I am passing parameter value as mentioned by this article Decompiling ADF Binaries: Initializing the bind variables used for an LOV query
    I tried this.. when i am testing using application module tester, it is working fine...but when running the app ,i am getting this error.
    and in middle i am getting this error.
    <ViewHandlerImpl> <_checkTimestamp> Apache Trinidad is running with time-stamp checking enabled. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
    <GlobalConfiguratorImpl> <_startConfiguratorServiceRequest>
    weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/Application5-ViewController-context-root/faces/untitled1.jspx'
      at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:2144)
      at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:2024)
      at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getQueryParams(ServletRequestImpl.java:1918)
      at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getParameter(ServletRequestImpl.java:1995)
      at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.access$800(ServletRequestImpl.java:1817)
      at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:804)
      at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:169)
      at org.apache.myfaces.trinidadinternal.context.external.ServletRequestParameterMap.getAttribute(ServletRequestParameterMap.java:43)
      at org.apache.myfaces.trinidadinternal.context.external.ServletRequestParameterMap.getAttribute(ServletRequestParameterMap.java:31)
      at org.apache.myfaces.trinidadinternal.context.external.AbstractAttributeMap.get(AbstractAttributeMap.java:73)
      at oracle.adfinternal.controller.state.ControllerState.getRootViewPortFromRequest(ControllerState.java:788)
      at oracle.adfinternal.controller.state.AdfcContext.initialize(AdfcContext.java:185)
      at oracle.adfinternal.controller.state.AdfcContext.initialize(AdfcContext.java:79)
      at oracle.adfinternal.controller.application.AdfcConfigurator.beginRequest(AdfcConfigurator.java:53)
      at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl._startConfiguratorServiceRequest(GlobalConfiguratorImpl.java:562)
      at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.beginRequest(GlobalConfiguratorImpl.java:212)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:174)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.net.ProtocolException: EOF after reading only: '0' of: '16' promised bytes, out of which at least: '0' were already buffered
      at weblogic.servlet.internal.PostInputStream.complain(PostInputStream.java:93)
      at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:179)
      at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:228)
      at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:2118)
      ... 39 more
    <UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
    how to resolve this

    Hi,
    maybe the solution that used to initializing the bind variables in Decompiling ADF Binaries: Initializing the bind variables used for an LOV query
    can help you
    Habib

  • Another Validation Question

    While validation seems to be much covered in this forum, I can't seem to find the solution for my problem which is as follows:
    To start off, I'm using custom validation for form fields in the backing bean and the messageList (in table mode) rather than individual inline messages.
    Here is my problem: validation appears to be performed on a form field only when the required property is set to true. However, when the required property is set to true JSF insists on performing an initial validation to ensure that the form field is not null. If the data passes the initial validation it is passed on to the backing bean validator which can perform additional validation, add messages etc. as needed.
    So here is the issues: how can I enable validation (i.e.. inform JSF that a field is required) but disable the initial validation (and associated error message "Validation Error: A Value is required" which is meaningless when put in the messageList and not in proximity to a field) so I can perform my own null and 0-length tests?
    Other forum discussions focus on customizing the field level inline message through message bundles but this seems neither possible or practical for message summaries.
    Any help appreciated as I appear to be stuck...

    Hi,
    This issue had been reported earlier too by another customer. The URL to the forum thread is:
    http://swforum.sun.com/jive/thread.jspa?threadID=50206
    Below is the response that was given by our senior engineer
    "JSF validators are *not* invoked on empty fields. The general reasoning is that, if there is no input data, then there is nothing to validate. Therefore, the components are working as they should for this use case."
    Hope this helps
    Cheers
    Giri

  • Design Time Bean Customizer validate Rule and use multiple time problem

    Hi,
    I have implement a custom validation rule ,add a design time bean customizer for my rule then register on datamodel project,i can use the graphic design time bean customizer and add my validate rule to my entity xml file,but when i add another instance to the same entity,data added to entity xml file was not correct,it may be not integrity or all data are same ,how can i do ? I found all bean validation with the same name ,it is the registered rule name "plsql rule", any suggestion are appreciative
    thank you advance
    li xin zhu 2007/09/08

    Hi,
    One thing you can do in the FOX would be to mark all fields in 'to be changed'. This will have the impact of having all data in the same data package and the FOX code will execute only once.

  • JSF 2 : dynamic required validation for different buttons ?

    Hello,
    I'm currently learning about jsf 2.0 from core jsf 2.0 book + glassfish + cdi.
    I have a question about the validation feature of JSF.
    Let's say i have a very simple login application, which has a very simple layout like :
    userid : (input field for userid - using required="true")
    password : (input secret for password - using required="true")
    loginButton + registerButton(using immediate="true") + checkUserIdAvailabilityButton
    Now, let's say the loginButton is pressed, and the userid and password are left empty, validation error would occur on both of the fields, and that's working as what i intended.
    And when the registerButton is pressed, it doesnt care whether the userid or password is filled by the user, since it's using immediate="true", thus bypassing validation and the command gets executed at the apply request value phase, and that's still working as what i intended.
    And here comes my problem .. When the checkUserIdAvailabilityButton is pressed, i only expect the userid to be filled, and i dont need to care about whether the password field is filled or not, but the password field will throw error saying that it's a required field.
    Is there anyway to resolve this kind of problem ? I know this could be a very simple application, but in my working place, i think they design lots of screens like this, like the save button along with refresh button with different required fields but the buttons are in the same page.
    Thank you !

    Hello there !
    Thank you for the response.
    I agree with the server side approach. I also find it not easy to maintain lots of uncentralized validations on many jsf pages.
    For example, validation on the my CustomerName's length could get replicated on hundreds of pages, and when the requirement changes, i have to update many pages.
    But doing this on the serverside is not easy either, i suppose, got to have a custom framework to fill the needs. Im thinking of a general validator that could validate when supplied the variable's name, and the validator will know whether the field needs validating on the correctness of the date value, or the length of the fieldname, etc, based on some external configuration that says this variable is a type of date, with max length of this, min value of that, etc.
    If i dont have this kind of tools, i'll also replicate all the validations like the CustomerName's case on many bean methods, which i think is not maintainable too.
    Do you happen to know whether this kind of validation tools exist somewhere ? I dont think that bean validation framework from jsr 303 would fill my need, am i correct ?
    Regards,
    Albert Kam

  • JSF Validator option disables my submit functionality

    Hi,
    I introduced a Validator in an InputBox, which is tied with the Backing Bean validation method. After this inclusion, the validation method is getting invoked, but the submit is not getting invoked. Before introducing this validation, the page submit was working fine. Now if I remove the validation, then also the page submit is working.
    So somewhere the validation stops the page submit.
    Please help me to resolve this issue.
    ..Thiruppathy.R

    Yes. My validation runs as expected.
    If I supply an invalid value, then I am able to see the error message in the page which is thru <h:messages/>.
    If I pass a valid value, then neither I am able to see any error message nor the page is submitted.
    My jsf code is
    <h:inputText accesskey = "true" id="Login_Name"  value="#{LoginBean.loginName}" styleClass="login_input"
         validator="#{LoginBean.defaultValidator}" required="true">
         <f:validateLength  maximum="35"/> 
    </h:inputText>
    <h:commandButton value="Submit" style="margin-left: 15px; margin-top: 8px;" action="#{LoginBean.submit}" image="../images/btn_continue.jpg"> My Backing Bean validator is
         public void defaultValidator(FacesContext context, UIComponent component, Object value) {
              System.out.println("value::"+value);
              if (value != null) {
                   if (value.equals("admin1")) {
                        System.out.println("It matches with 'admin1'");
                        return;
              ((UIInput)value).setValid(false);
              FacesMessage msg = new FacesMessage("I am a real exception");
              context.addMessage(component.getClientId(context), msg);
         }As per this code, 'admin1' is the only valid value. But even if I give the value 'admin1', the page is not getting submitted.
    Please help me to find where I am wrong.
    Thanks
    Thiruppathy.R

  • JDEV 10.1.3: Issue with Inherited public event handler methods in beans

    I have a bean validator method which it inherits from another base class.
    I am able to pick this method using the property inspector and it works fine.
    But in the jspx source view, i see a red wiggly line under the expression. Is this a bug or some bizzare way of enforcing some best practice (if using inherited event handler methods in beans is NOT a best practice)?
    The same is true for value change listeners.

    I started from scratch and the problem remains. Only one commandButton can fire an event which sets a variable that controls a af:switcher. The effect is similar to what the "blocking" attribute does but it is set to false on my components. Any ideas, time has already run out.

  • Java Bean Errors & Alerts

    Dear All
    i want to know how to make Error Message or Warning in My Bean Validation Method.
    Many Thanks

    ORA,
    No Jdev version, no technology (adf faces , struts, ...) no use case given :-(
    How should we know what you try to do? How should we give you an advise?
    Timo

  • Error while deploying a war file in Oracle Weblogic 10gr3 server

    Hi
    I am trying to deploy a web application which uses Hibernate 3 in Oracle weblogic 10gr3.But I am getting following exception.The same application gets deployed in tomcat without any problem.
    urce [WEB-INF/servicesContext.xml]: Cannot resolve reference to bean 'genericDao' while setting bean property 'genericDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericDao' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'saasHibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saasHibernateSessionFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: Tenant.byUserName, slaUsageOfTenant.bySlaCriterion, ServiceUsage.byCriterion, SLA.getSlaList, ServiceUsage.byTenantId.
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'autoMeteringInterceptor' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'validator' while setting bean property 'validator'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'tenant.tenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenant.tenantService' defined in ServletContext resource [WEB-INF/servicesContext.xml]: Cannot resolve reference to bean 'genericDao' while setting bean property 'genericDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericDao' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'saasHibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saasHibernateSessionFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: Tenant.byUserName, slaUsageOfTenant.bySlaCriterion, ServiceUsage.byCriterion, SLA.getSlaList, ServiceUsage.byTenantId
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:256)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
         at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
         at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
         at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:16)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'tenant.tenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenant.tenantService' defined in ServletContext resource [WEB-INF/servicesContext.xml]: Cannot resolve reference to bean 'genericDao' while setting bean property 'genericDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericDao' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'saasHibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saasHibernateSessionFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: Tenant.byUserName, slaUsageOfTenant.bySlaCriterion, ServiceUsage.byCriterion, SLA.getSlaList, ServiceUsage.byTenantId
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:256)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:248)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
         at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
         at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
         at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:16)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Initially this application was giving me absolute path related errors.But when I made changes to applicationContext.xml as follows,giviing absolute path for Hibernate mapping files
    <property name="mappingDirectoryLocations">
         <list>
         *<value>file:D:\saas-mappings</value>*
         </list>
    </property>
    I have extrached all the *.hbm.xml file to above location that is D:\saas-mappings.But now the application is giving me above mentioned error.The error says that it is related to Named queries.I am pasting the contents of a sample *.hbm.xml file having named query as a sample
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping package="com.psl.saas.domain">
         <class name="TenantSlaUsage" table="tenantslausage_v2">
                   <id name="tenantId" column="tenantId">
                   </id>
                   <property name="maxValue">
                        <column name="maxValue"></column>
                   </property>
                   <property name="thresholdValue">
                        <column name="thresholdValue"></column>
                   </property>
                   <property name="slaType" column="slaType" type="com.psl.saas.dataservice.SaasEnumSlaType"/>
                   <many-to-one name="slaCriterion" class="SLACriterion" column="slaCriterionName" lazy="false" unique="true" />          
                   <property name="usageCount">
                   <column name="usageCount"></column>
                   </property>
         </class>
         *<query name="slaUsageOfTenant.bySlaCriterion">
              <![CDATA[from com.psl.saas.domain.TenantSlaUsage where tenantId=:tenantId and slaCriterionName=:slaCriterionName]]>
         </query>*
    </hibernate-mapping>
    Any help on this will be greatly appreciated
    Thanks in Advance
    -Sameer Gijare

    Hi,
    For a tutorial with source on how to create and deploy a simple quickstart JEE5 JPA enterprise 3-tier application on your Oracle WebLogic 10.3 server - see the following example that uses the EclipseLink JPA provider. You should be able to transition all of your mapping information (the @ManyToOne and table/column overrides and named queries for example) using either JPA via entity annotations or native extensions if you do not want to implement EJB3.
    see...
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    We also have a similar version for Tomcat 6 except the JPA entity beans run outside a container-managed JTA transaction on the web container - for reference.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial
    thank you
    /michael
    www.eclipselink.org

Maybe you are looking for

  • GETSQL2008DBFilesFreeSpace forced to terminate because it ran past the configured timeout 300 seconds

    We have a SQL cluster that is consistantly reporting the following error: Forced to terminate the following process started at  <Time> because it ran past the configured timeout 300 seconds. Command executed: "C:\Windows\system32\cscript.exe" /nologo

  • One ITEM in multiple canvas

    All, One simple question... I am new to forms and that is why asking this question.. I have created a DATABASE... case these items be shared in 2 canvases ?? Thanks,

  • Parameter question -- core_dump_dest

    Who drops dump files here, Oracle processes, Operating System processes or both? I am gathering based on Oracle's statement: "It specifies the directory where Oracle dumps core files." that these are core dumps by Oracle processes that are running as

  • Sudden crash, no logs but "hi mem tramps at 0xffe00000"

    Hi, I just upgraded my Mini Core Duo 1.66 to 1.25GB of RAM. Retained the original 256MB, and added a Kingston 1GB module. After a few days of non-stop operation, this morning my Mini started to act strangely. It restarts itself for no apparent reason

  • Buying iPhone in Germany

    The iPhone will be available in Germany, if it is not already available now. I want to buy one and use it here in Germany , eventually I will be moving back the the U.S. When I move back will I be able to use the same iPhone granted I will have to si