[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Freeplane and latest jgoodies-forms: strange runtime error



hello Debian-Java,

I have two concerns:

1. Could someone please upload freeplane-1.5.16-3 which fixes an RC bug
(#846816):
  https://anonscm.debian.org/cgit/pkg-java/freeplane.git

2. Could someone please help analyse the underlying problem
(freeplane-1.5.16-3 might only fix a symptom)?

Here is the problem which occurs when starting Freeplane
(I believe that this only occurs at runtime) [1]:

STDERR: Exception in thread "AWT-EventQueue-1" 
STDERR: java.lang.NoSuchFieldError: DLU2
STDERR: 	at org.freeplane.features.styles.mindmapmode.StyleEditorPanel.init(StyleEditorPanel.java:845)
STDERR: 	at org.freeplane.features.styles.mindmapmode.StyleEditorPanel.access$2500(StyleEditorPanel.java:119)
STDERR: 	at org.freeplane.features.styles.mindmapmode.StyleEditorPanel$1.hierarchyChanged(StyleEditorPanel.java:582)
STDERR: 	at java.awt.Component.processHierarchyEvent(Component.java:6700)
STDERR: 	at java.awt.Component.processEvent(Component.java:6319)
STDERR: 	at java.awt.Container.processEvent(Container.java:2236)
STDERR: 	at java.awt.Component.dispatchEventImpl(Component.java:4889)
STDERR: 	at java.awt.Container.dispatchEventImpl(Container.java:2294)
STDERR: 	at java.awt.Component.dispatchEvent(Component.java:4711)
STDERR: 	at java.awt.Component.addNotify(Component.java:6969)
STDERR: 	at java.awt.Container.addNotify(Container.java:2762)
STDERR: 	at javax.swing.JComponent.addNotify(JComponent.java:4740)
STDERR: 	at java.awt.Container.addNotify(Container.java:2773)
STDERR: 	at javax.swing.JComponent.addNotify(JComponent.java:4740)
STDERR: 	at java.awt.Container.addNotify(Container.java:2773)
STDERR: 	at javax.swing.JComponent.addNotify(JComponent.java:4740)
STDERR: 	at java.awt.Container.addNotify(Container.java:2773)
STDERR: 	at javax.swing.JComponent.addNotify(JComponent.java:4740)
STDERR: 	at java.awt.Container.addNotify(Container.java:2773)
STDERR: 	at javax.swing.JComponent.addNotify(JComponent.java:4740)
STDERR: 	at java.awt.Container.addImpl(Container.java:1121)
STDERR: 	at java.awt.Container.add(Container.java:467)
STDERR: 	at org.freeplane.features.ui.FrameController.selectMode(FrameController.java:365)
STDERR: 	at org.freeplane.features.mode.Controller.selectMode(Controller.java:171)
STDERR: 	at org.freeplane.features.mode.Controller.selectMode(Controller.java:184)
STDERR: 	at org.freeplane.main.application.FreeplaneGUIStarter.loadMaps(FreeplaneGUIStarter.java:372)
STDERR: 	at org.freeplane.main.application.FreeplaneGUIStarter.loadMaps(FreeplaneGUIStarter.java:312)
STDERR: 	at org.freeplane.main.application.FreeplaneGUIStarter.access$200(FreeplaneGUIStarter.java:87)
STDERR: 	at org.freeplane.main.application.FreeplaneGUIStarter$2.run(FreeplaneGUIStarter.java:273)
STDERR: 	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
STDERR: 	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
STDERR: 	at java.awt.EventQueue.access$500(EventQueue.java:97)
STDERR: 	at java.awt.EventQueue$3.run(EventQueue.java:709)
STDERR: 	at java.awt.EventQueue$3.run(EventQueue.java:703)
STDERR: 	at java.security.AccessController.doPrivileged(Native Method)
STDERR: 	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
STDERR: 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
STDERR: 	at org.GNOME.Accessibility.AtkWrapper$5.dispatchEvent(AtkWrapper.java:700)
STDERR: 	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
STDERR: 	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
STDERR: 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
STDERR: 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
STDERR: 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
STDERR: 	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=846816

In 1.5.16-3, this is "fixed" by replacing Borders.DLU2 with
Paddings.DLU2, which is the correct way ("@deprecated Replaced by {@link
Paddings}." [2])
-->
 final DefaultFormBuilder rightBuilder = new DefaultFormBuilder(rightLayout);
-rightBuilder.border(Borders.DLU2);
+rightBuilder.border(Paddings.DLU2);

As you can see, Borders is deprecated in jgoodies-forms-1.9.0, but not
removed [2].

[2] https://anonscm.debian.org/cgit/pkg-java/libjgoodies-forms-java.git/tree/src/main/java/com/jgoodies/forms/factories/Borders.java

A little explanation: The gradle build system of freeplane generates the
classpaths (jar references) in OSGi Manifests using gradle dependency
information (converted to relative paths). For example, the jgoodies
deps look like [3]:

[...]
 /commons-codec-debian.jar, ../../../maven-repo/com/jgoodies/jgoodies-
 forms/debian/jgoodies-forms-debian.jar, ../../../java/idw.jar, ../../
 ../maven-repo/com/lightdev/app/shtm/simplyhtml/SimplyHTML/debian/Simp
 lyHTML-debian.jar, ../../../maven-repo/com/jgoodies/jgoodies-common/1
 .x/jgoodies-common-1.x.jar
[...]

which looks ok to me.

[3] /usr/share/freeplane/core/org.freeplane.core/META-INF/MANIFEST.MF

Decompilation of jgoodies-forms-debian.jar yields (on a system where
freeplane does not start due to above error):

Borders.java:
http://paste.debian.net/900749/
Paddings.java:
http://paste.debian.net/900750/

Which looks good, but in theory the static initializer of Borders could
run before the static initializer of Paddings, in which case DLU2 could
not be initialized?
(on the other hand, the problem is not reproducible upstream, and the
 upstream's maven artifact for jgoodies-forms-1.9.0 looks similar when
 decompiled)

Any hints are appreciated!

Many Thanks and Best Regards,
-- 
Felix Natter


Reply to: