1

I just did a minor upgrade, and then I suddenly started having Java Problems.

The stack trace looks like:

java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
    at java.desktop/java.awt.Toolkit.newAWTError(Toolkit.java:472)
    at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:488)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
    at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1608)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
    at java.desktop/java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:532)
    at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:613)
    at java.desktop/java.awt.Window.getToolkit(Window.java:1375)
    at java.desktop/java.awt.Window.init(Window.java:518)
    at java.desktop/java.awt.Window.(Window.java:549)
    at java.desktop/java.awt.Frame.(Frame.java:423)
    at java.desktop/java.awt.Frame.(Frame.java:388)
    at java.desktop/javax.swing.JFrame.(JFrame.java:180)
    at rga.hack.SlideShow.(SlideShow.java:293)
    at rga.hack.SlideShow.main(SlideShow.java:674)
Caused by: java.lang.ClassNotFoundException: org.GNOME.Accessibility.AtkWrapper
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:374)
    at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:485)
    ... 19 more

I have both openjdk-11-jre and openjdk-11-jre-headless installed as well as libatk-wrapper-java and libatk-wrapper-java-jni installed.

The java code I'm using is an old program I wrote myself, but it was working fine until the last update.

I can make the problem go away by commenting out the line in /etc/java-11-openjdk/accessibility.properites, but I suspect that there is a broken dependency in one of the packages I recently installed.

The following packages were installed in the update:

Upgraded the following packages:
accountsservice (0.6.45-1ubuntu1) to 0.6.45-1ubuntu1pop2
console-setup (1.178ubuntu2.3) to 1.178ubuntu2.6
console-setup-linux (1.178ubuntu2.3) to 1.178ubuntu2.6
gir1.2-accountsservice-1.0 (0.6.45-1ubuntu1) to 0.6.45-1ubuntu1pop2
gnome-initial-setup (3.28.0-2ubuntu6.16.04.1) to 3.28.0-2ubuntu6.16.04.2system76.1
keyboard-configuration (1.178ubuntu2.3) to 1.178ubuntu2.6
libaccountsservice0 (0.6.45-1ubuntu1) to 0.6.45-1ubuntu1pop2
palemoon (27.9.4~binaryrepack-1) to 28.0.0~repack-3

As the error is gnome related, I'm blaming the gnome-initial-setup package, but I'm wondering if anybody knows more about this than I do.

0

1 Answer 1

-1

There is a known bug with the openjdk atk wrapper, so it's not really a gnome problem. The openjdk bug says it was introduced in openjdk9, though a google search shows it as early as openjdk8. The bug has been closed, with a external classification, requiring the ATK to be re-engineered as a service.

The workarounds are either comment out the assistive technology line in the accessibility properties file, as you stated, or add the wrapper to the classpath

export CLASSPATH=/usr/share/java/java-atk-wrapper.jar

The openjdk bug reference is https://bugs.openjdk.java.net/browse/JDK-8204862

5
  • Does not work for logisim.
    – N0rbert
    Aug 22, 2018 at 7:01
  • @N0rbert My answer had 2 potential workarounds, the classpath action and accessibility properties file action. You stated in askubuntu.com/questions/1067569/cant-open-logisim-in-lubuntu that the accessibility properties workaround works, so your comment is a bit broad, implying that everything I said will not work for logisim. And what has this to do with logisim, the op said the bug was in a program they wrote themself, they made no mention of logisim that I saw. Aug 22, 2018 at 12:30
  • Thanks for the information about the openJDK issue. However, if I read that bug description correctly, this issue should have appeared for me around 2018-06 instead of 2018-08. In particular, my code was working just before I applied the update listed above and then stopped working immediately after, so something done by one of those packages changed the class loading path (or to cause the atk to be a dependency, because I don't explicitly reference it in the code, it is pulled in by the AWT classes.
    – ralmond
    Aug 23, 2018 at 0:31
  • Thanks for the tip about the classpath. That seems to be a more robust solution that commenting out the atk in the accessibilities.properties file. Especially, as I can simply add this to my launch script. So it is now working.
    – ralmond
    Aug 23, 2018 at 0:34
  • Cool I'm glad it's working for you now. Perhaps you can mark my answer as the answer for your question, to correct the erroneous downvote someone chose to do. Aug 23, 2018 at 0:57

Not the answer you're looking for? Browse other questions tagged .