NoSuchMethodError with PF7 RC1

Forum rules
Please note that response time for technical support is within 3-5 business days.
RueKow
Posts: 331
Joined: 21 Jun 2011, 23:34
Location: Germany - Wiesbaden

18 Jan 2019, 08:22

After changing Primefaces jar file (from 6.2 to 7.0 RC1) the following exception occurs.

Code: Select all

Jan 18, 2019 7:15:34 AM org.primefaces.application.exceptionhandler.PrimeExceptionHandler logException
SCHWERWIEGEND: org.primefaces.ultima.component.menu.UltimaMenuRenderer.buildAjaxRequest(Ljavax/faces/context/FacesContext;Lorg/primefaces/component/api/AjaxSource;Ljavax/faces/component/UIComponent;)Ljava/lang/String;
java.lang.NoSuchMethodError: org.primefaces.ultima.component.menu.UltimaMenuRenderer.buildAjaxRequest(Ljavax/faces/context/FacesContext;Lorg/primefaces/component/api/AjaxSource;Ljavax/faces/component/UIComponent;)Ljava/lang/String;
	at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeMenuItem(UltimaMenuRenderer.java:256)
	at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeElement(UltimaMenuRenderer.java:72)
	at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeElements(UltimaMenuRenderer.java:51)
	at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeMarkup(UltimaMenuRenderer.java:41)
	at org.primefaces.component.menu.BaseMenuRenderer.encodeEnd(BaseMenuRenderer.java:109)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Rüdiger

PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

18 Jan 2019, 08:36

After 7.0 Final, we'll update all Premium Layouts.

Best Regards,

giorgio.primefaces
Posts: 64
Joined: 19 Apr 2011, 11:43

09 Apr 2019, 11:00

Hi,
I've just tried PF 7.0.1 and Ultima 1.1.5, I'm still getting this error, any workaround?

thanks

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

17 Apr 2019, 08:47

Hi,

The new version released. Please try it. Migration Guide; https://www.primefaces.org/ultima/docs.xhtml

Best Regards,

matthieu.valente
Posts: 12
Joined: 28 Feb 2016, 16:21

17 Apr 2019, 12:08

Hi,

I am facing the same issue after migrating in 7.0 and 1.1.6
This happens when a menuItem use an EL for action or actionListener.

In CoreRenderer we have 2 methods

Code: Select all

buildAjaxRequest(FacesContext context, AjaxSource source, UIForm form)
buildNonAjaxRequest(FacesContext context, UIComponent component, UIComponent form, String decodeParam, boolean submit)
and in UltimaMenuRenderer

Code: Select all

command = menuitem.isAjax() ? buildAjaxRequest(context, (AjaxSource) menuitem, form) : buildNonAjaxRequest(context, ((UIComponent) menuitem), form, ((UIComponent) menuitem).getClientId(context), true);
Trouble seems that the form is a UIForm that extends UIComponentBase and thus is a UIComponent and not a UIForm.

Can you confirm ?
And if so is there any plan to fix fast ?

Thanks and regards,
Matthieu

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

17 Apr 2019, 12:55

Please update UltimaMenuRenderer.java.

in 1.1.6, UltimaMenuRenderer.java

Code: Select all

UIForm form = ComponentTraversalUtils.closestForm(context, menu);
1.1.5 to 1.1.6

- Update layout.js, UltimaMenu*.java and layout css files
- Replace theme jar with new jar

matthieu.valente
Posts: 12
Joined: 28 Feb 2016, 16:21

17 Apr 2019, 13:31

Thanks for the reply,

I don't have the ultima menu java class in my project, I use the built class in the ultima-theme-1.1.6.jar\org\primefaces\ultima\component\menu\ which I expect to be the correct one ;)

I'll keep investigating and keep you posted.
in the meantime if you have any idea, I'd be glad to hear.

Best regards,
Matthieu

matthieu.valente
Posts: 12
Joined: 28 Feb 2016, 16:21

17 Apr 2019, 13:47

Ok so I deployed my war in a fresh env with primefaces 7.0 and Ultima 1.1.6 jar.
I have the same issue only on menuItem whith action or actionListener. (Url is working fine)

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

17 Apr 2019, 14:20

Unfortunately, I couldn't replicate it. Could you please try our sample project after changing PF version? Please see p:menuitem components in menu.xhtml. They have actionListener attributes.

<p:menuitem id="theme1" value="Indigo - Pink" icon="&#xE3AE;" actionListener="#{guestPreferences.setTheme('indigo')}" ajax="false" />
...

matthieu.valente
Posts: 12
Joined: 28 Feb 2016, 16:21

17 Apr 2019, 15:09

Ok thanks,

If you want to replicate, you may need to run the sample without ajax="false"
It works on my side with ajax="false" so I'll remove the ajax from menuItem with action/actionListener.

Thanks and regards,
Matthieu

Post Reply

Return to “Ultima - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests