Am using Weblogic 12.2.1.4 and on deploying my ear file am getting the following error. My ear is done with JSF 2.2.
Caused by: java.lang.NoSuchMethodError: javax.faces.application.Application.addSearchKeywordResolver(Ljavax/faces/component/search/SearchKeywordResolver;)V at org.primefaces.util.Jsf23Helper.addSearchKeywordResolvers(Jsf23Helper.java:27) at org.primefaces.webapp.PostConstructApplicationEventListener.processEvent(PostConstructApplicationEventListener.java:48) at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169) at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:294) at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:739) at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:704) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:270) at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:719) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:344) at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197) at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203) at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71) at weblogic.servlet.internal.EventsManager.executeContextListener(EventsManager.java:251) at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:204) at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:191) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1929) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3191) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1864) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:919) at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360) at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)`enter code here`
Advertisement
Answer
Method “addSearchKeywordResolver” is part of JSF 2.3 specification. https://javaee.github.io/javaee-spec/javadocs/javax/faces/component/search/SearchKeywordResolver.html
Therefore, if you want to use it, you will have to include the dependencies for JSF 2.3 in your ear file.