Scheduler Plugin Crashes Client

My client is running Servoy 4.1 build 651 and using the rich client. On certain (not all) machines, the client crashes as soon as it makes it’s first call to the scheduler plugin. I have confirmed that on these machines Servoy ‘sees’ the plugin, i.e. it is in the allnames array, but the moment any of its methods are called, the client hangs. This has happened on Macs & WinXP machines, on and off the LAN.

Any idea what might be going on?

Did you enable logging (to the console) for java on the client machines so that you have some logging info?

Crashing scheduler plug-ins sound strange to me. I would search in the method that is executed…

Marcel,

Below is the log from the console. It looks like the client isn’t loading the plugins successfully. You will see SEVERE errors after calls to loadClientPlugins which I’ve marked with an arrow (<====) in the log. The call to the Scheduler is the first plugin call in the app and that’s where it crashes.

Any idea why this client is having trouble loading the plugins?

Thanks for your help.

Java Web Start 1.5.0
Using JRE version 1.5.0_07 Java HotSpot(TM) Client VM
User home directory = /Users/marynichols
...
Feb 6, 2009 2:33:23 PM com.servoy.j2db.util.Debug log
INFO: Starting Servoy from /Users/marynichols/Desktop
Feb 6, 2009 2:33:23 PM com.servoy.j2db.util.Debug log
INFO: Servoy 4.1.0 build-651 on Mac OS X using Java 1.5.0_07
Feb 6, 2009 2:33:23 PM com.servoy.j2db.util.Debug log
INFO: About to attempt auto proxy detection under Java version:1.5.0_07-164
Feb 6, 2009 2:33:23 PM com.servoy.j2db.util.Debug log
INFO: Using failover proxy detection...
Feb 6, 2009 2:33:23 PM com.servoy.j2db.util.Debug log
INFO: Plugin Proxy Config List Property: null
Feb 6, 2009 2:33:23 PM com.servoy.j2db.util.Debug log
INFO: No configured plugin proxy list
Feb 6, 2009 2:33:23 PM com.servoy.j2db.util.Debug log
INFO: webstart: proxyHost=null proxyPort=null
Feb 6, 2009 2:33:23 PM com.sebster.tunnel.impl.hc a
INFO: jcifs library found; NTLM support enabled
Feb 6, 2009 2:33:23 PM com.sebster.tunnel.impl.hc a
INFO: using direct connection
Feb 6, 2009 2:33:24 PM com.servoy.j2db.util.Debug error
SEVERE: Error occured loading client plugin class     <======================================
com.servoy.extensions.plugins.spellcheck.SpellCheckerPlugin, error:
java.lang.NoClassDefFoundError: com/keyoti/rapidSpell/desktop/
RapidSpellGUIDialog
Feb 6, 2009 2:33:24 PM com.servoy.j2db.util.Debug error
SEVERE: Throwable
java.lang.NoClassDefFoundError: com/keyoti/rapidSpell/desktop/
RapidSpellGUIDialog
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.servoy.j2db.plugins.PluginManager.loadClientPlugins
(PluginManager.java:163)
at com.servoy.j2db.plugins.PluginManager.initClientPlugins
(PluginManager.java:62)
at com.servoy.j2db.Zsc.run(Zsc.java:1)
at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:28)
at java.lang.Thread.run(Thread.java:613)
Feb 6, 2009 2:33:24 PM com.servoy.j2db.util.Debug error
SEVERE: Error occured loading client plugin class
com.servoy.extensions.plugins.serialize.SerializePlugin, error:
java.lang.NoClassDefFoundError: org/jabsorb/JSONSerializer
Feb 6, 2009 2:33:24 PM com.servoy.j2db.util.Debug error
SEVERE: Throwable
java.lang.NoClassDefFoundError: org/jabsorb/JSONSerializer
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.servoy.j2db.plugins.PluginManager.loadClientPlugins
(PluginManager.java:163)
at com.servoy.j2db.plugins.PluginManager.initClientPlugins
(PluginManager.java:62)
at com.servoy.j2db.Zsc.run(Zsc.java:1)
at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:28)
at java.lang.Thread.run(Thread.java:613)
Feb 6, 2009 2:33:24 PM com.servoy.j2db.util.Debug error
SEVERE: Error ocured initializing plugin: Log , error: com/drmaison/plugin/support/
IPluginEssentials
Feb 6, 2009 2:33:24 PM com.servoy.j2db.util.Debug error
SEVERE: Throwable
java.lang.NoClassDefFoundError: com/drmaison/plugin/support/IPluginEssentials
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)
at com.sun.jnlp.JNLPClassLoader.defineClass(JNLPClassLoader.java:314)
at com.sun.jnlp.JNLPClassLoader.access$100(JNLPClassLoader.java:53)
at com.sun.jnlp.JNLPClassLoader$1.run(JNLPClassLoader.java:254)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:247)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at com.sun.jnlp.JNLPClassLoader.loadClass(JNLPClassLoader.java:600)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at com.drmaison.plugin.log.Log.getScriptObject(Log.java:47)
at com.drmaison.plugin.log.Log.initialize(Log.java:54)
at com.servoy.j2db.plugins.PluginManager.initClientPluginsEx
(PluginManager.java:230)
at com.servoy.j2db.plugins.PluginManager.initClientPlugins
(PluginManager.java:94)
at com.servoy.j2db.Zsc.run(Zsc.java:1)
at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:28)
at java.lang.Thread.run(Thread.java:613)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/
quartz/SchedulerException
at
com.servoy.extensions.plugins.scheduler.SchedulerPlugin.getScriptObject
(SchedulerPlugin.java:84)
at com.servoy.j2db.scripting.PluginScope.get(PluginScope.java:19)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:
1641)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:
1429)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:
1418)
at org.mozilla.javascript.gen.c9._c0(loadUpdateTimeJob:4)
at org.mozilla.javascript.gen.c9.call(loadUpdateTimeJob)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:
111)
at org.mozilla.javascript.gen.c4._c0(_initialize:112)
at org.mozilla.javascript.gen.c4.call(_initialize)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction
(ScriptEngine.java:11)
at com.servoy.j2db.FormManager.Za(FormManager.java:279)
at com.servoy.j2db.SwingFormManager.Za(SwingFormManager.java:85)
at com.servoy.j2db.FormManager.Za(FormManager.java:341)
at com.servoy.j2db.ClientState.clearLoginForm(ClientState.java:396)
at com.servoy.j2db.J2DBClient.clearLoginForm(J2DBClient.java:471)
at com.servoy.j2db.scripting.JSSecurity.js_login(JSSecurity.java:400)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:
347)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:81)
at org.mozilla.javascript.gen.c3._c0(btnLogin:115)
at org.mozilla.javascript.gen.c3.call(btnLogin)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3122)
at org.mozilla.javascript.gen.c3.call(btnLogin)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction
(ScriptEngine.java:11)
at com.servoy.j2db.FormController.Za(FormController.java:23)
at com.servoy.j2db.FormController.executeFunction(FormController.java:
117)
at com.servoy.j2db.Zfb.Za(Zfb.java:11)
at com.servoy.j2db.dataui.EventExecutor.Za(EventExecutor.java:94)
at com.servoy.j2db.dataui.EventExecutor.fireActionCommand
(EventExecutor.java:6)
at com.servoy.j2db.dataui.Zzd.notifyLastNewValueWasChange(Zzd.java:
105)
at com.servoy.j2db.dataprocessing.Zib.commitEdit(Zib.java:50)
at com.servoy.j2db.dataui.Znc.actionPerformed(Znc.java:22)
at javax.swing.JTextField.fireActionPerformed(JTextField.java:487)
at javax.swing.JTextField.postActionEvent(JTextField.java:668)
at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:
783)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1576)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2763)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2798)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
at java.awt.Component.processEvent(Component.java:5331)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4021)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3869)
at java.awt.KeyboardFocusManager.redispatchEvent
(KeyboardFocusManager.java:1810)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent
(DefaultKeyboardFocusManager.java:672)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent
(DefaultKeyboardFocusManager.java:920)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions
(DefaultKeyboardFocusManager.java:798)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent
(DefaultKeyboardFocusManager.java:636)
at java.awt.Component.dispatchEventImpl(Component.java:3907)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3869)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:
184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:
176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Just to be sure, have you tried cleared the java cache for the client?

Just to be sure, have you tried cleared the java cache for the client?

Yes. In some cases it solved the problem, but in others it didn’t. In one case it wasn’t until we restarted the machine completely (and reset file permissions on all files, just to be safe) that it started working again. It has happened on 4 different machines, including Macs and WinXPs.

Is it surprising to you that even though the trace shows that the loading of the plugins failed, the solution ‘sees’ all the plugins in the plugins allnames array?

No, that bit does not surprise me (the rest does though).
The plug-ins use classes, most likely in separate library jars, that can not be found.

Another thing that helps quite often is to clear the cache on the server install (something like ~/server/work/Catalina

Another thing that helps quite often is to clear the cache on the server install (something like ~/server/work/Catalina

That dir currently contains:

  • localhost
  • _
  • beans
  • lafs
  • lib
  • plugins

So it is safe to clear all of this? Even while app server is running?

Yes, it is save to clear it (plugins folder is most important in this case though) but not while the server is running.

Did anyone ever find a resolution to this problem? I’m seeing it all over the place in 4.1 & 4.1.1. The smart client will be working fine for a few hours, but when a user goes out of Servoy and reopens it then all of a sudden all the third-party libraries related to plugins don’t load. This includes the “jabsorb” library for Serialize plugin, a few IT2Be plugin libraries, the RapidSpell .jars for the spellchecker plugin and so on. All show up with a “classDefNotFoundError” in the log right at the part of load process where the client checks security and creates a sandbox for each plugin which leads me to believe this is some kind of signing problem. Of course after this happens the entire solution is messed up because these plugins are used throughout. Clearing the client cache (and the .servoy folder and the contents of the ~/Library/Cache/Java/) and re-downloading does nothing. Clearing the server cache - described earlier in this thread - works temporarily, but the error quickly returns.

Server is Windows 2003, Java 1.6, Servoy 4.1.1
Clients are mostly Macs running Java 1.6, some Java 1.5, errors on both versions

which leads me to believe this is some kind of signing problem

Hmm, there could be another problem.
If I am correct (this at least applies to our components) the libs are mostly stored in a 2nd level libs folder.
Maybe that is the cause of the issue.
It can be tested easily. Move a library to the plugins folder, adjust the .jnlp file accordingly and see what happens with that plugin/library.

But it remains to be strange, we don’t have this or any report of it (at least not as a persistent issue)…

do you see that behavior on all your clients?
For example do you also have windows clients that demonstrate that behavior?

Hi all- just wondering if this has ever gotten resolved. I am experiencing this problem too on several different machines and not on others where the machines are all configured identically (same JRE, same Windows & patch rev). I have been doing pretty detailed comparisons between the machines that work and the ones that don’t and am stumped. Reboots and Java cache clearing doesn’t seem to help in my instance unfortunately, so I’m kind of stuck and concerned that if one my customers runs into this I won’t have a satisfactory answer for them.

My logs look just like the one posted earlier in the thread.

Any thoughts or suggestions would be greatly appreciated.

Regards, Tony

if you clear the java cache completely
and the load the client, and when it doesnt work, what is the contents of the cache at that time?
(the files are a bit cryptic i think but do the files get download?)

For example if you have a server and you clear the ~/server/work/Catalina dir

then after that start are all jars generated into that dir?

also in the tomcat access log you could maybe see what files the client did request.

Ran into the same problem. Clearing the server cache was not enough, also clearing the client cache did the job.

SEVERE: Error occured loading client plugin class com.servoy.extensions.plugins.spellcheck.SpellCheckerPlugin, error: java.lang.NoClassDefFoundError: com/keyoti/rapidSpell/desktop/RapidSpellGUIDialog
26-nov-2009 10:26:21 com.servoy.j2db.util.Debug error
SEVERE: Throwable
java.lang.NoClassDefFoundError: com/keyoti/rapidSpell/desktop/RapidSpellGUIDialog

I share the concerns of Tony, wouldn’t want to have this problem at a customer’s site. Don’t want to get into showing java consoles, clearing client or server caches at customers sites.

Johan, is servoy aware of this problem and is a resolution planned for one of the upcoming releases?

i dont think we currently have any case against our latest releases (4 and 5) that adresses this

Somehow javaws doesnt download all the classes.
We did have some fixes in this area and those should be in the 5.0 final (dont know exactly if they are already in a release of 4.x)
But i dont think clearing the client cache does have the same affect as the above fix, even worse the latest fix in that area can or would even cause more problems if you clear the cache
Because then it really needs to load everything again and it could be that sometimes it didnt do that.

It would be nice to have full server logs (like access logs) of a client that is failing to start because some plugins dont load.
Maybe we then can see what it does request and what the server response with.

Created a case for this (258019), attached servoy, sybase and webserver log.