Bug #4978
openCreate additional 'module' property for any menu entries that are inserted by non-core modules
0%
Description
As of revision r24221 and r24222-3 on the branch, there's a way to avoid those errors that look like:
[run] ERROR (org.kepler.gui.MenuMapper:getActionFor:271) Exception trying to create an Action for classname: <org.kepler.tagging.TagManagerAction>:
[run] null (java.lang.ClassNotFoundException: org.kepler.tagging.TagManagerAction)
Those come from modules inserting menu entry information into the persistent gui module configuration and then the user removing that module from their active configuration. The system still tries to create that entry, which references a class that is no longer available. If a property named 'module' is created as a peer to 'name' and 'value', then the menu entry will only be generated if a module by that name is in the active configuration. See org.kepler.module.tagging.Initialize from the tagging module for an example of how to do this without hardwiring the module name.
So in order to eliminate error messages like the above, these additional properties need to be created when the menu entry is added to the gui configuration.
Updated by Daniel Crawl over 14 years ago
The configuration system already has a mechanism to remove properties when the module that added them is no longer present. I don't know how it works, but I often see the following on startup:
[run] not loading property tabPane because it was added from an inactive module.
[run] not loading property tabPane because it was added from an inactive module.
[run] not loading property tabPane because it was added from an inactive module.
[run] not loading property tabPane because it was added from an inactive module.
Updated by Aaron Aaron over 13 years ago
I went ahead and added the Tag Manager menu item via resources/configuration/uiMenuMappings_en_US.xml and removed the ConfigurationProperty creation code from the Initialize class. This seems to resolve the error:
[run] ERROR (org.kepler.gui.MenuMapper:getActionFor:271) Exception trying
to create an Action for classname: <org.kepler.tagging.TagManagerAction>:
[run] null (java.lang.ClassNotFoundException:
org.kepler.tagging.TagManagerAction)
which I have still been seeing when running from Eclipse.
I don't see it anymore (rev27563).
You may need to delete .kepler after updating to notice the difference.
Closing this bug.
Updated by Derik Barseghian about 13 years ago
This can still occur.
We have many bugs relating these MenuMapper errors, it has been an issue for a long time. It continues to confuse users and developers. It would be nice to fix.
Updated by Daniel Crawl about 13 years ago
I suspect this is the same problem described in bug 5290. What are the steps to reproduce it?
Updated by Derik Barseghian over 12 years ago
I briefly tried to reproduce this and was unable (changing to sensor-view suite, changing various add-on module settings, and then changing back to and starting kepler suite).
I think during last call I said I had just recently seen it though, so I'm going to leave this open for further testing...
Updated by Derik Barseghian over 12 years ago
Ok, I did just see this when starting sensor-view from cmd line:
[run] * Attempting to get ResourceBundle for SVG defaults
[run] svgRenderingMethod = SVG_BATIK_RENDERING *
[run] ERROR (org.kepler.gui.MenuMapper:getActionFor:300) Exception trying to create an Action for classname: <org.kepler.sensor.gui.ExportSiteToKMLAction>:
[run] java.lang.ClassCastException: ptolemy.actor.gui.TextEditor cannot be cast to ptolemy.actor.gui.PtolemyFrame (java.lang.reflect.InvocationTargetException)
[run] 279 ms. Memory: 154108K Free: 56133K (36%)
Updated by Daniel Crawl almost 12 years ago
In the last 2.4 meeting, we decided to fix this in a later release.
Updated by Daniel Crawl about 9 years ago
- Target version changed from 2.5.0 to 2.X.Y