Page 1 of 1

Error with it2be Plugins on Servoy 8.4

PostPosted: Thu Dec 27, 2018 10:22 pm
by jvalencia
Error with it2be Plugins on Servoy 8.4

Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Priority

I get the below error when trying to use Data or FTP plugins on Servoy 8.4, they work fine on previous versions like 8.3

Servoy 8.4.0 rc2
Data Plug-in for Servoy (4.7-099 Released)
FTP Plug-in for Servoy (2.4-040 Released)
Java 1.8.0
Windows 10


ERROR org.sablo.eventthread.EventDispatcher - Exception in dispatch() java.lang.NoClassDefFoundError: org/apache/log4j/Priority
at com.it2be.i.a(Unknown Source) ~[?:?]
at com.it2be.h.a(Unknown Source) ~[?:?]
at com.it2be.h.a(Unknown Source) ~[?:?]
at com.it2be.h.a(Unknown Source) ~[?:?]
at com.it2be.h.a(Unknown Source) ~[?:?]
at com.it2be.data.b.<init>(Unknown Source) ~[?:?]
at com.it2be.data.plugin.a.g(Unknown Source) ~[?:?]
at com.it2be.common.plugin.a.d(Unknown Source) ~[?:?]
at com.it2be.common.plugin.e.js_register(Unknown Source) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_73]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_73]
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138) ~[org.eclipse.dltk.javascript.rhino_8.4.0.3401_rc2.jar:?]
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:292) ~[org.eclipse.dltk.javascript.rhino_8.4.0.3401_rc2.jar:?]
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1487) ~[org.eclipse.dltk.javascript.rhino_8.4.0.3401_rc2.jar:?]
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815) ~[org.eclipse.dltk.javascript.rhino_8.4.0.3401_rc2.jar:?]
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109) ~[org.eclipse.dltk.javascript.rhino_8.4.0.3401_rc2.jar:?]
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:399) ~[org.eclipse.dltk.javascript.rhino_8.4.0.3401_rc2.jar:?]
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3534) ~[org.eclipse.dltk.javascript.rhino_8.4.0.3401_rc2.jar:?]
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107) ~[org.eclipse.dltk.javascript.rhino_8.4.0.3401_rc2.jar:?]
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:665) ~[servoy_shared_8.4.0.3401_rc2.jar:?]
at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:393) ~[?:?]
at com.servoy.j2db.scripting.ScopesScope.executeGlobalFunction(ScopesScope.java:193) ~[servoy_shared_8.4.0.3401_rc2.jar:?]
at com.servoy.j2db.server.ngclient.NGFormManager.makeSolutionSettings(NGFormManager.java:188) ~[?:?]
at com.servoy.j2db.server.ngclient.NGFormManager$1.run(NGFormManager.java:366) ~[?:?]
at com.servoy.j2db.server.ngclient.NGFormManager.propertyChange(NGFormManager.java:371) ~[?:?]
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335) ~[?:1.8.0_73]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327) ~[?:1.8.0_73]
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:92) ~[?:1.8.0_73]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263) ~[?:1.8.0_73]
at com.servoy.j2db.J2DBGlobals.firePropertyChange(J2DBGlobals.java:97) ~[servoy_shared_8.4.0.3401_rc2.jar:?]
at com.servoy.j2db.server.ngclient.NGClient.lambda$1(NGClient.java:660) ~[?:?]
at com.servoy.j2db.server.ngclient.NGClient.runWhileShowingLoadingIndicator(NGClient.java:650) ~[?:?]
at com.servoy.j2db.server.ngclient.NGClient.loadSolution(NGClient.java:657) ~[?:?]
at com.servoy.j2db.server.ngclient.NGClient.loadSolution(NGClient.java:535) ~[?:?]
at com.servoy.j2db.debug.DebugNGClient.loadSolution(DebugNGClient.java:289) ~[?:?]
at com.servoy.j2db.server.ngclient.NGClientWebsocketSession$1.run(NGClientWebsocketSession.java:246) ~[?:?]
at org.sablo.eventthread.Event$1.run(Event.java:102) ~[sablo_8.4.0.3401_rc2.jar:?]
at org.sablo.websocket.CurrentWindow.runForWindow(CurrentWindow.java:77) ~[sablo_8.4.0.3401_rc2.jar:?]
at org.sablo.eventthread.Event.execute(Event.java:92) ~[sablo_8.4.0.3401_rc2.jar:?]
at org.sablo.eventthread.EventDispatcher.addEvent(EventDispatcher.java:162) ~[sablo_8.4.0.3401_rc2.jar:?]
at org.sablo.eventthread.EventDispatcher.addEvent(EventDispatcher.java:152) ~[sablo_8.4.0.3401_rc2.jar:?]
at com.servoy.j2db.server.ngclient.NGClientWebsocketSession.onOpen(NGClientWebsocketSession.java:230) ~[?:?]
at org.sablo.websocket.WebsocketEndpoint$1.run(WebsocketEndpoint.java:139) ~[sablo_8.4.0.3401_rc2.jar:?]
at org.sablo.eventthread.Event$1.run(Event.java:102) ~[sablo_8.4.0.3401_rc2.jar:?]
at org.sablo.websocket.CurrentWindow.runForWindow(CurrentWindow.java:77) ~[sablo_8.4.0.3401_rc2.jar:?]
at org.sablo.eventthread.Event.execute(Event.java:92) ~[sablo_8.4.0.3401_rc2.jar:?]
at org.sablo.eventthread.EventDispatcher.dispatch(EventDispatcher.java:125) [sablo_8.4.0.3401_rc2.jar:?]
at org.sablo.eventthread.EventDispatcher.run(EventDispatcher.java:89) [sablo_8.4.0.3401_rc2.jar:?]
at com.servoy.j2db.server.ngclient.eventthread.NGEventDispatcher.run(NGEventDispatcher.java:55) [servoy_ngclient_8.4.0.3401_rc2.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_73]
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Priority
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_73]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_73]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_73]
... 52 more

Re: Error with it2be Plugins on Servoy 8.4

PostPosted: Thu Dec 27, 2018 10:39 pm
by rgansevles
jvalencia,

In release 8.4 the logging framework has been upgraded from log4j to log4j2.

The log4j jars are no longer part of the distribution.
Please contact the plugin vendor to upgrade the plugin.
The plugin should use the slf4j api, then it would integrate nicely with the Servoy logging.

If modifying the plugin is not possible, maybe adding the log4j(1) jars to the plugin may fix this issue.
The logging from the plugin is then not integrated with Servoy logging, then.

Hope this helps,

Rob

Re: Error with it2be Plugins on Servoy 8.4

PostPosted: Thu Dec 27, 2018 10:55 pm
by jvalencia
Hi Rob

I'll contact the vendor

as work around while we get the fix on the plug-in

I download the legacy version of the log4j
https://logging.apache.org/log4j/2.0/download.html
http://www.apache.org/dyn/closer.cgi/lo ... 1.2.17.zip

I copied the file log4j-1.2.17.jar to the plugins folder e.g. C:\Servoy\Servoy84_dev\application_server\plugins

It seems to work

Thanks!

Re: Error with it2be Plugins on Servoy 8.4

PostPosted: Tue Jan 29, 2019 6:34 pm
by paul_bromwell
We have updated the it2be plugins in the "Beta" release to support log4j2 included with Servoy 8.4.

Please let us know if you have any issues with it!

Re: Error with it2be Plugins on Servoy 8.4

PostPosted: Mon Mar 11, 2019 2:19 pm
by lwjwillemsen
We have updated the it2be plugins in the "Beta" release to support log4j2 included with Servoy 8.4.


Where can I find this? I've updated the it2be plugins with their update.jar but they still reference the log4.jar.

Regards,