Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4523

PropertyDescriptorWrapper cannot be cast to class LambdaPropertyDescriptor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3-next-M7
    • 2.3-next-M8, 4.0.0-RC3
    • General
    • None
    • Java 8, PrimeFaces 11

    Description

      Executing the attached reproducer, the following exception is thrown. Setting org.apache.myfaces.USE_LAMBDA_METAFACTORY to false fixes the error.

      Caused by: java.lang.ClassCastException: class org.apache.myfaces.core.api.shared.lang.PropertyDescriptorWrapper cannot be cast to class org.apache.myfaces.core.api.shared.lang.LambdaPropertyDescriptor (org.apache.myfaces.core.api.shared.lang.PropertyDescriptorWrapper and org.apache.myfaces.core.api.shared.lang.LambdaPropertyDescriptor are in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @1c067c0d) at org.apache.myfaces.view.facelets.tag.LambdaMetadataTargetImpl.getLambdaProperty(LambdaMetadataTargetImpl.java:108) at org.apache.myfaces.view.facelets.tag.LambdaMetadataTargetImpl.getWriteMethod(LambdaMetadataTargetImpl.java:91) at org.apache.myfaces.view.facelets.tag.jsf.ComponentRule.applyRule(ComponentRule.java:102) at org.apache.myfaces.view.facelets.tag.MetaRulesetImpl.finish(MetaRulesetImpl.java:233) at javax.faces.view.facelets.MetaTagHandler.setAttributes(MetaTagHandler.java:60) at javax.faces.view.facelets.DelegatingMetaTagHandler.setAttributes(DelegatingMetaTagHandler.java:93) at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:281) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:52) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:57) at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:362) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:52) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:57) at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:362) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:52) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at org.apache.myfaces.view.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:67) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at org.apache.myfaces.view.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:49) at org.apache.myfaces.view.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:182) at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.buildView(FaceletViewDeclarationLanguage.java:435) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:83) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)

      I also tried this against 2.3-next-SNAPSHOT, where a different exception is thrown. This may be caused by the fixes for MYFACES-4465. Setting Setting org.apache.myfaces.USE_LAMBDA_METAFACTORY to false also fixes the error here.

       

      Caused by: java.lang.IllegalArgumentException: argument type mismatch at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at javax.faces.component._ComponentAttributesMap.setComponentProperty(_ComponentAttributesMap.java:690) at javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.java:584) at javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.java:58) at org.apache.myfaces.view.facelets.tag.jsf.ComponentRule$LiteralAttributeMetadata.applyMetadata(ComponentRule.java:53) at org.apache.myfaces.view.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:45) at javax.faces.view.facelets.MetaTagHandler.setAttributes(MetaTagHandler.java:63) at javax.faces.view.facelets.DelegatingMetaTagHandler.setAttributes(DelegatingMetaTagHandler.java:93) at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:281) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:52) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:57) at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:362) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:52) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:57) at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:362) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:52) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at org.apache.myfaces.view.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:67) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at org.apache.myfaces.view.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:49) at org.apache.myfaces.view.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:182) at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.buildView(FaceletViewDeclarationLanguage.java:435) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:83) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
       
      

       

      Attachments

        1. primefaces-test.zip
          14 kB
          Torsten Stolpmann

        Activity

          People

            tandraschko Thomas Andraschko
            stolp Torsten Stolpmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: