Ubuntu

Scripting plugin does not work (classpath problem)

Reported by Adrian Wilkins on 2012-11-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
FreeMind
Unknown
Unknown
freemind (Ubuntu)
Undecided
Unassigned

Bug Description

Reproduce:

Install

* freemind
* freemind-plugins-script

Open Freemind, create a new map, create a node, open the script editor via

Tools > Script Editor

Create a new script

Actions > New Script

Enter a very basic script (this one should set the node text to "Test Value")

 = "Test Value"

And run it

Actions > Run

What should happen : the node text changes to "Test Value"
What does happen : Nothing visible in UI
Stack trace is logged to STDERR (see below)

Problem is a classpath issue : package `groovy` correctly depends on the libasm3-java package which contains the interface listed as NoClassDefFoundError

Classpath obtained from installed freemind starter script ==

::/usr/share/freemind/lib/freemind.jar:/usr/share/java/SimplyHTML.jar:/usr/share/java/gnu-regexp.jar:/usr/share/java/jibx-run-1.1.6a.jar:/usr/share/java/xpp3.jar:/usr/share/freemind/lib/bindings.jar:/usr/share/java/forms.jar:/usr/share/freemind

Suggestion : starter script should construct additional classpath entries from a file installed with the plugins, e.g. put entries in files in /etc/freemind/classpath.d/ or /usr/share/freemind/plugins/classpath.d/ (or wherever is most appropriate for debian pacakges)

Is there a standard way of constructing classpaths based on this sort of thing in Debian? If not, there probably should be.

Adding the following entries to the classpath renders the test above functional ; the "full" versions of these jars may be overkill, I suppose.

/usr/share/java/asm3-all.jar
/usr/share/java/antlrall.jar

-----

STDERR: Exception in thread "AWT-EventQueue-0"
STDERR: java.lang.NoClassDefFoundError: org/objectweb/asm/Opcodes
STDERR: at java.lang.ClassLoader.defineClass1(Native Method)
STDERR: at java.lang.ClassLoader.defineClass(ClassLoader.java:787)
STDERR: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
STDERR: at java.net.URLClassLoader.defineClass(URLClassLoader.java:447)
STDERR: at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
STDERR: at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
STDERR: at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
STDERR: at java.security.AccessController.doPrivileged(Native Method)
STDERR: at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
STDERR: at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
STDERR: at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
STDERR: at java.lang.Class.getDeclaredConstructors0(Native Method)
STDERR: at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
STDERR: at java.lang.Class.getConstructor0(Class.java:2714)
STDERR: at java.lang.Class.newInstance0(Class.java:343)
STDERR: at java.lang.Class.newInstance(Class.java:325)
STDERR: at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:51)
STDERR: at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:89)
STDERR: at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:61)
STDERR: at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:29)
STDERR: at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:49)
STDERR: at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
STDERR: at groovy.lang.Binding.<init>(Binding.java:34)
STDERR: at plugins.script.ScriptingEngine.executeScript(ScriptingEngine.java:169)
STDERR: at plugins.script.ScriptEditor$NodeScriptModel.executeScript(ScriptEditor.java:79)
STDERR: at plugins.script.ScriptEditorPanel$RunAction.actionPerformed(ScriptEditorPanel.java:128)
STDERR: at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
STDERR: at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
STDERR: at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
STDERR: at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
STDERR: at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
STDERR: at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
STDERR: at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
STDERR: at java.awt.Component.processMouseEvent(Component.java:6505)
STDERR: at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
STDERR: at java.awt.Component.processEvent(Component.java:6270)
STDERR: at java.awt.Container.processEvent(Container.java:2229)
STDERR: at java.awt.Component.dispatchEventImpl(Component.java:4861)
STDERR: at java.awt.Container.dispatchEventImpl(Container.java:2287)
STDERR: at java.awt.Component.dispatchEvent(Component.java:4687)
STDERR: at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
STDERR: at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
STDERR: at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
STDERR: at java.awt.Container.dispatchEventImpl(Container.java:2273)
STDERR: at java.awt.Window.dispatchEventImpl(Window.java:2719)
STDERR: at java.awt.Component.dispatchEvent(Component.java:4687)
STDERR: at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
STDERR: at java.awt.EventQueue.access$200(EventQueue.java:103)
STDERR: at java.awt.EventQueue$3.run(EventQueue.java:682)
STDERR: at java.awt.EventQueue$3.run(EventQueue.java:680)
STDERR: at java.security.AccessController.doPrivileged(Native Method)
STDERR: at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
STDERR: at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
STDERR: at java.awt.EventQueue$4.run(EventQueue.java:696)
STDERR: at java.awt.EventQueue$4.run(EventQueue.java:694)
STDERR: at java.security.AccessController.doPrivileged(Native Method)
STDERR: at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
STDERR: at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
STDERR: at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
STDERR: at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
STDERR: at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:155)
STDERR: at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
STDERR: at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
STDERR: at java.security.AccessController.doPrivileged(Native Method)
STDERR: at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
STDERR: at java.awt.Dialog.show(Dialog.java:1077)
STDERR: at java.awt.Component.show(Component.java:1651)
STDERR: at java.awt.Component.setVisible(Component.java:1603)
STDERR: at java.awt.Window.setVisible(Window.java:1014)
STDERR: at java.awt.Dialog.setVisible(Dialog.java:1003)
STDERR: at plugins.script.ScriptEditor.startupMapHook(ScriptEditor.java:172)
STDERR: at freemind.modes.mindmapmode.MindMapController.invokeHook(MindMapController.java:1722)
STDERR: at freemind.modes.mindmapmode.actions.MindMapControllerHookAction.actionPerformed(MindMapControllerHookAction.java:48)
STDERR: at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
STDERR: at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
STDERR: at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
STDERR: at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
STDERR: at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
STDERR: at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
STDERR: at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
STDERR: at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
STDERR: at java.awt.Component.processMouseEvent(Component.java:6505)
STDERR: at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
STDERR: at java.awt.Component.processEvent(Component.java:6270)
STDERR: at java.awt.Container.processEvent(Container.java:2229)
STDERR: at java.awt.Component.dispatchEventImpl(Component.java:4861)
STDERR: at java.awt.Container.dispatchEventImpl(Container.java:2287)
STDERR: at java.awt.Component.dispatchEvent(Component.java:4687)
STDERR: at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
STDERR: at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
STDERR: at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
STDERR: at java.awt.Container.dispatchEventImpl(Container.java:2273)
STDERR: at java.awt.Window.dispatchEventImpl(Window.java:2719)
STDERR: at java.awt.Component.dispatchEvent(Component.java:4687)
STDERR: at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
STDERR: at java.awt.EventQueue.access$200(EventQueue.java:103)
STDERR: at java.awt.EventQueue$3.run(EventQueue.java:682)
STDERR: at java.awt.EventQueue$3.run(EventQueue.java:680)
STDERR: at java.security.AccessController.doPrivileged(Native Method)
STDERR: at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
STDERR: at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
STDERR: at java.awt.EventQueue$4.run(EventQueue.java:696)
STDERR: at java.awt.EventQueue$4.run(EventQueue.java:694)
STDERR: at java.security.AccessController.doPrivileged(Native Method)
STDERR: at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
STDERR: at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
STDERR: at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
STDERR: at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
STDERR: at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
STDERR: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
STDERR: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
STDERR: at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
STDERR: Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Opcodes
STDERR: at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
STDERR: at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
STDERR: at java.security.AccessController.doPrivileged(Native Method)
STDERR: at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
STDERR: at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
STDERR: at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
STDERR: ... 112 more

Duncan Lithgow (duncan-lithgow) wrote :

I don't think that the freemind developers watch launchpad. Would you please add the bug to their tracker at http://sourceforge.net/tracker/?atid=107118&group_id=7118&func=browse and link it to this one?

Duncan Lithgow (duncan-lithgow) wrote :

Thanks Adrian. I've linked that to this one via the 'Also affects project' button.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.