Bug#846816: java.lang.NoSuchFieldError: DLU2

Felix Natter fnatter at gmx.net
Sat Dec 3 20:32:31 UTC 2016


gregor herrmann <gregoa at debian.org> writes:

hello all,

> Control: tag -1 + confirmed
>
> On Sat, 03 Dec 2016 14:50:40 +0100, Vincent Smeets wrote:
>
>> Package: freeplane
>> Version: 1.5.16-2
>> Severity: grave
>> Justification: renders package unusable
>
>> Here I started freeplane from the command line. It shows you the log
>> output and the raised exception.
>
>> STDERR: Exception in thread "AWT-EventQueue-1" 
>> STDERR: java.lang.NoSuchFieldError: DLU2
>
> Thanks for your bug report. I can reproduce it (on unstable).
>
>> -- Package-specific info:
>> ii  freeplane                   1.5.16-2           all                Java program for working with Mind Maps
>
>> Versions of packages freeplane depends on:
>> ii  libjgoodies-forms-java               1.9.0-3
>
> Looks like we missed a part when creating the patch for
> jgoodies-forms 1.9.0 compatibility ...
>
>
> I get past this error with
>
> +--- a/freeplane/src/main/java/org/freeplane/features/styles/mindmapmode/StyleEditorPanel.java
> ++++ b/freeplane/src/main/java/org/freeplane/features/styles/mindmapmode/StyleEditorPanel.java
> +@@ -113,8 +113,8 @@
> + import org.freeplane.features.ui.IMapViewManager;
> + 
> + import com.jgoodies.forms.builder.DefaultFormBuilder;
> +-import com.jgoodies.forms.factories.Borders;
> +-import com.jgoodies.forms.layout.FormLayout;
> ++import com.jgoodies.forms.factories.*;
> ++import com.jgoodies.forms.layout.*;
> + 
> + public class StyleEditorPanel extends JPanel {
> +       private static final int FONT_SIZE = Math.round(UITools.FONT_SCALE_FACTOR * 8);
> +@@ -842,7 +842,7 @@
> +               final String form = "right:max(20dlu;p), 2dlu, p, 1dlu,right:max(20dlu;p), 4dlu, 80dlu, 7dlu";
> +               final FormLayout rightLayout = new FormLayout(form, "");
> +               final DefaultFormBuilder rightBuilder = new DefaultFormBuilder(rightLayout);
> +-              rightBuilder.border(Borders.DLU2);
> ++              rightBuilder.border(Paddings.DLU2);
> +               new SeparatorProperty("OptionPanel.separator.NodeStyle").layout(rightBuilder);
> +               if (addStyleBox) {
> +                       addAutomaticLayout(rightBuilder);

I just looked into it:

- Using Paddings instead of Borders seems correct [1]
  ("@deprecated Replaced by {@link Paddings}")

- I have fixed it using Borders->Paddings (1.5.16-3: I think we should
  upload it), but I don't understand it:

- the jgoodies documentation says
  (http://www.jgoodies.com/download/libraries/forms/RELEASE-NOTES.txt):
  CHANGES IN 1.12.0: "Removed the deprecated Borders class that has been replaced
  by the Paddings class in version 1.9.0."
--> so Borders.* is still in jgoodies-1.9
--> we use this upstream [2]
    compile 'com.jgoodies:jgoodies-forms:1.9.0',
    compile 'com.jgoodies:jgoodies-common:1.8.1'
    and I don't see any problem with this in upstream

- seems to happen only at runtime?

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

> added to debian/patches/50_jgoodies-1.9.patch, but when starting
> freeplane I then only see an empty white windows.

I could reproduce this once after updating my sid (but not previously
when updating jgoodies but not sid). Could you please try another
desktop environment?

If that does not work, you can rename ~/.config/freeplane.
This worked for me, and I can no longer reproduce the bug
even when starting with the old ~/.config/freeplane.

> But I guess that's no hard problem to fix for someone who knows Java
> :)

I don't understand this. If you don't have an expanation, I will
probably ask on debian-java.

Cheers and Best Regards,
-- 
Felix Natter



More information about the pkg-java-maintainers mailing list