java.lang.NoClassDefFoundError

Ran into this in my developer application server.log. Can’t seem to get this resolved.

2014-10-22 15:13:25,255 ERROR [Thread-3] com.servoy.j2db.util.Debug - Error occured loading client class com.myplugin.servoy.plugin from plugin.
java.lang.NoClassDefFoundError: com/servoy/j2db/scripting/IScriptable
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.servoy.j2db.plugins.PluginManager.loadClientPlugin(PluginManager.java:455)
at com.servoy.j2db.plugins.PluginManager.loadClientPlugins(PluginManager.java:265)
at com.servoy.j2db.server.ApplicationServer.initStandalone(ApplicationServer.java:624)
at com.servoy.j2db.server.starter.StandaloneServerStarter.initFromDeveloper(StandaloneServerStarter.java:2)
at com.servoy.j2db.server.starter.EclipseServerStarter.startApplicationServer(EclipseServerStarter.java:1)
at com.servoy.eclipse.appserver.Activator.startAppServer(Activator.java:153)
at com.servoy.eclipse.core.ServoyModel.startAppServer(ServoyModel.java:464)
at com.servoy.eclipse.core.util.SplashHandler$1.run(SplashHandler.java:52)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.servoy.j2db.scripting.IScriptable
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 14 more
2014-10-22 15:13:29,296 ERROR [pool-4-thread-1] com.servoy.j2db.util.Debug - Error occured loading client class com.myplugin.servoy.plugin from plugin.
java.lang.NoClassDefFoundError: com/servoy/j2db/scripting/IScriptable
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.servoy.j2db.plugins.PluginManager.loadClientPlugin(PluginManager.java:455)
at com.servoy.j2db.plugins.PluginManager.loadClientPlugins(PluginManager.java:265)
at com.servoy.j2db.plugins.PluginManager.initClientPlugins(PluginManager.java:241)
at com.servoy.j2db.smart.J2DBClient$14.run(J2DBClient.java:1090)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.servoy.j2db.scripting.IScriptable
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 12 more
2014-10-22 15:13:29,296 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Error occured loading client class com.myplugin.servoy.plugin from plugin.
java.lang.NoClassDefFoundError: com/servoy/j2db/scripting/IScriptable
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.servoy.j2db.plugins.PluginManager.loadClientPlugin(PluginManager.java:455)
at com.servoy.j2db.plugins.PluginManager.loadClientPlugins(PluginManager.java:265)
at com.servoy.eclipse.core.DesignApplication.getPluginManager(DesignApplication.java:547)
at com.servoy.eclipse.core.DesignApplication.getFoundSetManager(DesignApplication.java:336)
at com.servoy.j2db.component.ComponentFactory.createDesignComponent(ComponentFactory.java:276)
at com.servoy.eclipse.designer.internal.core.PersistImageNotifier$1.run(PersistImageNotifier.java:124)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.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)
Caused by: java.lang.ClassNotFoundException: com.servoy.j2db.scripting.IScriptable
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 25 more

there is some weird classloading issues there, is this problem only reported by your own plugin?
so if you remove the plugin “com.myplugin.servoy.plugin” it works fine?
So all servoy default plugins are created?

I removed the plugin and all issues went away. Now I need to figure out the issue with the plugin I am using. Can’t seem to get this resolved. Tried resigning all jars with overwrite options with no success. Made sure jnlp and all jars are in place. The plugin actually works in servoy, but is still throwing the original log message.

What version of Servoy are you using? com/servoy/j2db/scripting/IScriptable was not there before 6.1 I think, it was IScriptObject.
Quite a pain this one TBH!

That makes sense because I’m running servoy 5.2.16. We haven’t upgraded to 7 yet. However, the plugin I’m using seems to be functioning properly just throwing the error in the servoy log.

Your plugin provider should implement IScriptObject instead of IScriptable, then the exception will disappear.