java.awt.AWTError: Assistive Technology failure after Ubuntu / Debain Upgrade
Luke Benes
lukebenes at hotmail.com
Wed Aug 29 18:36:29 UTC 2018
Subsequent Java Unit tests are failing after the Ubuntu 16.04 to 18.04 upgrade.
According to a Debian bug report, multiple Java apps are experiencing this issue after a Debian testing upgrade including Minecraft and draw9patch.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=798794
Ubuntu:
https://askubuntu.com/questions/695560/assistive-technology-not-found-awterror
The problem is caused by a change in openjdk-8-jre, which now depends on openjdk-8-jre-headless. Java sees the presence of headless and assumes accessibility should be unavailable.
Since you cannot easily remove headless, the workaround that worked for me was:
Comment out "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" in file /etc/java-8-openjdk/accessibility.properties or /etc/java-11-openjdk/accessibility.properties
LibreOffice build log error:
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 mod._toolkit.UnoScrollBarControl.initialize(UnoScrollBarControl.java:65)
at lib.TestCase.initializeTestCase(TestCase.java:67)
at base.java_fat.executeTest(java_fat.java:138)
at org.openoffice.Runner.run(Runner.java:175)
at org.openoffice.test.UnoApiTest.test(UnoApiTest.java:41)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:52)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77)
at org.junit.runner.JUnitCore.main(JUnitCore.java:36)
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)
... 47 more
FAILURES!!!
Tests run: 1, Failures: 1
to rerun just this failed test without all others, run:
make JunitTest_toolkit_unoapi_4
cd into the module dir to run the tests faster
Or to do interactive debugging, run two shells with:
make debugrun
make gb_JunitTest_DEBUGRUN=T JunitTest_toolkit_unoapi_4
/solenv/gbuild/JunitTest.mk:38: recipe for target '/workdir/JunitTest/toolkit_unoapi_4/done' failed
make[1]: *** [/workdir/JunitTest/toolkit_unoapi_4/done] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:286: recipe for target 'build' failed
make: *** [build] Error 2
More information about the LibreOffice
mailing list