NullPointerException with selfmade Plugin
cherokee
New Altair Community Member
Hi!
I've found another small bug. In a plugin manifest you can name an PluginInit-class (see whitepaper). If you don't do this rapidminer hangs with an NullPointerException. The reason is in [tt]Plugin.showAboutBox[/tt] (as of 5.0.006):
As workaround till the next update just use an initialisation class with empty methods.
Best regards,
chero
I've found another small bug. In a plugin manifest you can name an PluginInit-class (see whitepaper). If you don't do this rapidminer hangs with an NullPointerException. The reason is in [tt]Plugin.showAboutBox[/tt] (as of 5.0.006):
public boolean showAboutBox() {The problem is pluginInitClassName. If you don't supply a name for the plugin init class this variable is [tt]null[/tt] and [tt]Class.forName[/tt] issues a NullPointerException. Though you catch many exception types you forgot this one
try {
Class<?> pluginInitator = Class.forName(pluginInitClassName, false, getOriginalClassLoader());
Method initGuiMethod = pluginInitator.getMethod("showAboutBox", new Class[] {});
Boolean showAboutBox = (Boolean) initGuiMethod.invoke(null, new Object[] {});
return showAboutBox.booleanValue();
} catch (ClassNotFoundException e) {
} catch (SecurityException e) {
} catch (NoSuchMethodException e) {
} catch (IllegalArgumentException e) {
} catch (IllegalAccessException e) {
} catch (InvocationTargetException e) {
}
return true;
}
As workaround till the next update just use an initialisation class with empty methods.
Best regards,
chero
0
Answers
-
Hi,
thanks for reporting this. It is fixed.
Cheers,
Simon0