http plugin exception

Sometimes the below exception appears when issuing:

var _res = plugins.http.getPageData(_url, ‘json’)

Servoy 7.4.10
I cannot figure out when or why the exception occurs…

Anybody any ideas?

Exception in thread “AWT-EventQueue-2” java.lang.NoSuchMethodError: org.apache.http.impl.client.DefaultHttpClient.execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/client/methods/CloseableHttpResponse;
at com.servoy.extensions.plugins.http.HttpProvider.getPageData(HttpProvider.java:161)
at com.servoy.extensions.plugins.http.HttpProvider.js_getPageData(HttpProvider.java:125)
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:158)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:312)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:70)
at org.mozilla.javascript.gen.svy_utilities_scopes_globals_svy_utl_jsonRequest_117._c_svy_utl_jsonRequest_0(Unknown Source)
at org.mozilla.javascript.gen.svy_utilities_scopes_globals_svy_utl_jsonRequest_117.call(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:78)
at org.mozilla.javascript.gen.glb_forms_glb_dlg_about_checkVersion_114._c_checkVersion_0(Unknown Source)
at org.mozilla.javascript.gen.glb_forms_glb_dlg_about_checkVersion_114.call(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:97)
at org.mozilla.javascript.gen.glb_forms_glb_dlg_about_onShow_111._c_onShow_0(Unknown Source)
at org.mozilla.javascript.gen.glb_forms_glb_dlg_about_onShow_111.call(Unknown Source)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:628)
at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:824)
at com.servoy.j2db.BasicFormController.executeFormMethod(BasicFormController.java:708)
at com.servoy.j2db.BasicFormController.executeOnShowMethod(BasicFormController.java:622)
at com.servoy.j2db.BasicFormController.access$2(BasicFormController.java:616)
at com.servoy.j2db.BasicFormController$1.run(BasicFormController.java:356)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at com.servoy.j2db.util.gui.JEscapeDialog.setVisible(JEscapeDialog.java:170)
at com.servoy.j2db.gui.FormDialog.setVisible(FormDialog.java:164)
at com.servoy.j2db.smart.SwingRuntimeWindow.finalizeShowWindow(SwingRuntimeWindow.java:872)
at com.servoy.j2db.smart.SwingRuntimeWindow.doOldShowInDialog(SwingRuntimeWindow.java:508)
at com.servoy.j2db.smart.SwingRuntimeWindow.doOldShow(SwingRuntimeWindow.java:417)
at com.servoy.j2db.scripting.RuntimeWindow.doShow(RuntimeWindow.java:295)
at com.servoy.j2db.scripting.RuntimeWindow.show(RuntimeWindow.java:289)
at com.servoy.j2db.scripting.RuntimeWindow.showObject(RuntimeWindow.java:276)
at com.servoy.j2db.scripting.JSWindow.js_show(JSWindow.java:155)
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:158)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:312)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:62)
at org.mozilla.javascript.gen.svy_utilities_scopes_globals_svy_utl_showFormInWindow_110._c_svy_utl_showFormInWindow_0(svy_utilities/scopes/globals/svy_utl_showFormInWindow:8152)
at org.mozilla.javascript.gen.svy_utilities_scopes_globals_svy_utl_showFormInWindow_110.call(svy_utilities/scopes/globals/svy_utl_showFormInWindow)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:78)
at org.mozilla.javascript.gen.svy_nav_navigation_forms_svy_nav_fr_home2_dtl_onActionAbout_109._c_onActionAbout_0(svy_nav_navigation/forms/svy_nav_fr_home2_dtl/onActionAbout:241)
at org.mozilla.javascript.gen.svy_nav_navigation_forms_svy_nav_fr_home2_dtl_onActionAbout_109.call(svy_nav_navigation/forms/svy_nav_fr_home2_dtl/onActionAbout)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:406)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3204)
at org.mozilla.javascript.gen.svy_nav_navigation_forms_svy_nav_fr_home2_dtl_onActionAbout_109.call(svy_nav_navigation/forms/svy_nav_fr_home2_dtl/onActionAbout)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:628)
at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:824)
at com.servoy.j2db.FormController.executeFunction(FormController.java:1277)
at com.servoy.j2db.FormController.executeFunction(FormController.java:1144)
at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:1056)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:284)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:250)
at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:218)
at com.servoy.j2db.smart.dataui.AbstractScriptLabel$5.mouseReleased(AbstractScriptLabel.java:929)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Found it!

There is a jar (class version) collision between the Servoy 7.4.10 http.jar and the httpclient-4.0.1.jar of the Google2 plugin!!

:cry: :cry:

Am I the first to encounter this one?
We would like to use the (very nice) Google2 plugin very much!

The google2 currently ships with an older version of the http library. Have you tried to simply omit that one (remove it and any reference to that one in the jnlp, where instead you should point to the one that Servoy uses)?

Thanks for this info Patrick.

But what about the “httpcore-4.0.1.jar” in the google2 plugin setup?
I have no idea about the (http) dependencies inside the google2 plugin…

neither do I without investigating. Just try?

Hi Patrick,

First tests on Application Server seems to go ok following your suggestion.

Can you update the Google2 plugin Servoy Forge page(s) with this info?!
Or update the httpclient stuff?

Thanks for responding on our issue…