dimanche 21 juin 2020

No Function Found on type: org.primefaces.util.ComponentUtils with signature: java.lang.String resolveWidgetVar

I am trying to deploy a multi module ear with several war files in Wildfly container and getting the following error:

No Function Found on type: org.primefaces.util.ComponentUtils with signature: 
java.lang.String resolveWidgetVar(java.lang.String, javax.faces.component.UIComponent)

I am using prime-faces version 5.3 and I decompiled the jar from the libs deployment directory and I can find the function there.

enter image description here

Also, I have tried checking the jar file path for the class ComponentUtils, and it prints the expected path for the 5.3 version class.

Also checked the calling code for the function from the Stacktrace as below:

17:54:24,447 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 88) Critical error during deployment: : com.sun.faces.config.ConfigurationException: java.lang.Exception: No Function Found on type: org.primefaces.util.ComponentUtils with signature: java.lang.String resolveWidgetVar(java.lang.String, javax.faces.component.UIComponent)
at deployment.posa.ear//com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processFunctions(FaceletTaglibConfigProcessor.java:642)
at deployment.posa.ear//com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:325)
at deployment.posa.ear//com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:270)
at deployment.posa.ear//com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:441)

The class FaceletTaglibConfigProcessor.java comes from com.sun.faces jsf-impl library which tries to load the ComponentUtils class and call the method by parsing the method signature as below:

enter image description here

The method ReflectionUtil.forName tries to load the class with a specific class loader and I am assuming it is able to load the class (since we get the exception later) but it may be loading this from a different location then from where my code does it. I am assuming something bad happens in class loading and I ain't good at that.

How do I get around this problem. I have tried clearing .m2 cache and build targets and deployment directories but nothing works here.

ReflectionUtil.forName method code:

enter image description here





Aucun commentaire:

Enregistrer un commentaire