server errors on popupMenu.show()

I’m using a webclient of version 6.0.4, when I look into the server log I see a lot of the errors below.

I used the popupmenu of the window plugin to show some navigation items to the user.
As soon as the popupmenu.show(source) is called the error below is thrown.
In developer I don’t see those errors, this is only in the production environment.

Any idea where this comes from?

The code:

var _popupMenu = plugins.window.createPopupMenu();
	
// here is a lot of code for populating the popupmenu

// then I come to the end: line 1007 = the 'show' line.
		
	var source = event.getSource()
	if (source != null) {
		_popupMenu.show(source);
		//or you can set the coordinates popupmenu.show(10, 10);
	}

Error:

org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: Behavior [RequestCycle@1b94d62 thread=http-80-11] was not registered with this component: [MarkupContainer [Component id = contribution]] (onNavigate#1007) 
    	at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1828) 
    	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:199) 
    	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:367) 
    	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666) 
    	at script.onNavigate(onNavigate:1007) 
    	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680) 
    	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166) 
    	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387) 
    	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3134) 
    	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165) 
    	at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:528) 
    	at com.servoy.j2db.FormController.executeFunction(FormController.java:4058) 
    	at com.servoy.j2db.FormController.executeFunction(FormController.java:3937) 
    	at com.servoy.j2db.FormController.executeFunction(FormController.java:3859) 
    	at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:3714) 
    	at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:271) 
    	at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:217) 
    	at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor.onEvent(WebEventExecutor.java:402) 
    	at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor$2.onEvent(WebEventExecutor.java:174) 
    	at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177) 
    	at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:302) 
    	at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157) 
    	at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) 
    	at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1252) 
    	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331) 
    	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438) 
    	at org.apache.wicket.RequestCycle.request(RequestCycle.java:546) 
    	at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) 
    	at com.servoy.j2db.server.servlets.Zl.doGet(Zl.java:14) 
    	at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138) 
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
    	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) 
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) 
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) 
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 
    	at java.lang.Thread.run(Unknown Source) 
    Caused by: java.lang.IllegalArgumentException: Behavior [RequestCycle@1b94d62 thread=http-80-11] was not registered with this component: [MarkupContainer [Component id = contribution]] 
    	at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:857) 
    	at org.apache.wicket.Component.urlFor(Component.java:3427) 
    	at org.apache.wicket.behavior.AbstractAjaxBehavior.getCallbackUrl(AbstractAjaxBehavior.java:124) 
    	at org.apache.wicket.behavior.AbstractAjaxBehavior.getCallbackUrl(AbstractAjaxBehavior.java:93) 
    	at com.servoy.extensions.plugins.window.menu.wicket.MenuExecutorBehavior.getUrlForMenuItem(Unknown Source) 
    	at com.servoy.extensions.plugins.window.menu.wicket.ScriptableWicketPopupMenu.getCallBackUrl(Unknown Source) 
    	at com.servoy.extensions.plugins.window.menu.wicket.ScriptableWicketMenu.generateMenuJS(Unknown Source) 
    	at com.servoy.extensions.plugins.window.menu.wicket.ScriptableWicketPopupMenu.showPopup(Unknown Source) 
    	at com.servoy.extensions.plugins.window.menu.wicket.WicketMenuHandler.showPopup(Unknown Source) 
    	at com.servoy.extensions.plugins.window.menu.Popup.js_show(Unknown Source) 
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
    	at java.lang.reflect.Method.invoke(Unknown Source) 
    	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179) 
    	... 42 more

This code works for me:

popMenu.show(event.getSource(), event.getX(), event.getY());

can you reproduce this?
somehow in the browser something is tried to be shown on the wrong component.
It seems to be a configuration problem or something like that of the popup plugin.

jcompagner:
can you reproduce this?

unfortunately: no

didn’t see any problem in developer, that’s why I am surprised.
This is also not happening continuously, but I haven’t got a clue when it can happen.

This element is on the layout throughout the whole session.
The reference to ‘Component id = contribution’ is always the same, maybe that does help?

no that is just our general component one on every mainpage/browser window
Do you have this when you have multiply tabs open in the browser? Because then we are getting multiply of the “contribution” components (if you just always have just one browser window then you really only have 1)
So i guess it has something to do with more then one tab

jcompagner:
So i guess it has something to do with more then one tab

That would explain why I never noticed it… I’m always dedicated using 1 browserwindow to test my Solution
Will try if I can reproduce it using multiple windows…

Anyway: if that’s the case, how do I solve it?

then it is something the plugin doesn’t do correctly…
So if you have a reproduce able test case, then i think you need to make a case with that so that we fix the plugin.

Maybe the issue is related to the object type the popupmenu is linked to: I was having a similar issue with a label used as a button. Using a button seems to solve the problem.