Modify

Opened 2 months ago

Closed 8 weeks ago

#16666 closed defect (fixed)

ClassNotFoundException: org.GNOME.Accessibility.AtkWrapper

Reported by: anonymous Owned by: team
Priority: major Milestone: 18.09
Component: Core Version:
Keywords: template_report linux ubuntu atk gnome Cc: sebastic

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. JOSM not start Update in Ubuntu 18.04

What is the expected result?

What happens instead?

Please provide any additional information below. Attach a screenshot if possible.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-08-18 16:16:51 +0200 (Sat, 18 Aug 2018)
Revision:14163
Build-Date:2018-08-18 16:30:21
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (14163 de) Linux Ubuntu 18.04.1 LTS
Memory Usage: 170 MB / 1980 MB (134 MB allocated, but free)
Java version: 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
Java package: openjdk-11-jre:amd64-10.0.2+13-1ubuntu0.18.04.1
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-20ubuntu0.1

Plugins:
+ PicLayer
+ Tracer
+ Tracer2
+ apache-commons
+ buildings_tools
+ log4j
+ pdfimport
+ poly
+ turnlanes
+ turnrestrictions

Last errors/warnings:
- E: Handled by bug report queue: java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper. Ursache: java.lang.ClassNotFoundException: org.GNOME.Accessibility.AtkWrapper


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: main (1)
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.<init>(Window.java:549)
	at java.desktop/java.awt.Frame.<init>(Frame.java:423)
	at java.desktop/java.awt.Frame.<init>(Frame.java:388)
	at java.desktop/javax.swing.JFrame.<init>(JFrame.java:180)
	at org.openstreetmap.josm.gui.MainFrame.<init>(MainFrame.java:68)
	at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:875)
	at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:286)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:767)
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)
	... 21 more

Attachments (0)

Change History (21)

comment:1 Changed 2 months ago by Don-vip

Description: modified (diff)
Keywords: linux ubuntu atk gnome added
Summary: JOSM not start Update in Ubuntu 18.04ClassNotFoundException: org.GNOME.Accessibility.AtkWrapper

comment:2 Changed 2 months ago by Don-vip

Cc: sebastic added

@sebastic we get several duplicates of this issue on Debian derivatives (Ubuntu, Mint). Is it a known Debian issue? GNOME ATK wrapper has always been problematic, is there a way to completely get rid of it?

comment:3 Changed 2 months ago by sebastic

The known workaround is to disable the AtkWrapper in /etc/java-<N>-openjdk/accessibility.properties, e.g.:

$ cat /etc/java-8-openjdk/accessibility.properties 
#
# The following line specifies the assistive technology classes 
# that should be loaded into the Java VM when the AWT is initailized.
# Specify multiple classes by separating them with commas.
# Note: the line below cannot end the file (there must be at
# a minimum a blank line following it).
#
#assistive_technologies=org.GNOME.Accessibility.AtkWrapper

This conffile is part of the openjdk-<N>-jre-headless packages, so you can't get rid of it.

JOSM could maybe catch this exception and show a notification about how to disable this property. Or have the josm launcher check the config file for the JRE in question and warn if the setting is not disabled.

The former is probably preferred, because it seems that JDK 9 and later no longer have this issue when the property is not disabled (I haven't encountered it on Debian unstable at least since that moved away from JDK 8). And a warning by the launcher may only be visible to users starting josm from the CLI.

comment:4 Changed 2 months ago by Don-vip

Ticket #16665 has been marked as a duplicate of this ticket.

comment:5 in reply to:  3 Changed 2 months ago by Don-vip

Replying to sebastic:

The known workaround is to disable the AtkWrapper in /etc/java-<N>-openjdk/accessibility.properties, e.g.:

$ cat /etc/java-8-openjdk/accessibility.properties 
#
# The following line specifies the assistive technology classes 
# that should be loaded into the Java VM when the AWT is initailized.
# Specify multiple classes by separating them with commas.
# Note: the line below cannot end the file (there must be at
# a minimum a blank line following it).
#
#assistive_technologies=org.GNOME.Accessibility.AtkWrapper

This conffile is part of the openjdk-<N>-jre-headless packages, so you can't get rid of it.

JOSM could maybe catch this exception and show a notification about how to disable this property.

Thanks, we will do that. Although the Debian package should be updated to either make sure the org.GNOME.Accessibility.AtkWrappercan be found at runtime, or that this line is disabled by default (my preference, given the very bad experience we have with this library, see #12022).

Last edited 2 months ago by Don-vip (previous) (diff)

comment:6 Changed 2 months ago by sebastic

If I understand correctly, libatk-wrapper-java should provide org.GNOME.Accessibility.AtkWrapper and this package is part of the jre dependency chain (openjdk-8-jre depends on openjdk-8-jre-headless, which depends on libatk-wrapper-java-jni, which depends on libatk-wrapper-java).

The problem seems to be that there is no accessibility device configured. This should probably not throw an exception so easily, as most systems won't have them.

The package that should most likely be fixed is the java-atk-wrapper source package from which the libatk-wrapper-java & libatk-wrapper-java-jni binary packages are built.

In Debian Bug #813143 - openjdk-7-jre-headless: Please re-disable atk bridge Samuel Thibault indicated that he wanted issues like these to be reported so that java-atk-wrapper can be fixed instead of working around the issues by disabling the bridge. Perhaps you should get him directly involved in these issues.

comment:7 in reply to:  6 Changed 2 months ago by Don-vip

Replying to sebastic:

If I understand correctly, libatk-wrapper-java should provide org.GNOME.Accessibility.AtkWrapper and this package is part of the jre dependency chain (openjdk-8-jre depends on openjdk-8-jre-headless, which depends on libatk-wrapper-java-jni, which depends on libatk-wrapper-java).

This bug report is on Ubuntu bionic so the chain of dependencies is directly: openjdk-11-jre > libatk-wrapper-java-jni > libatk-wrapper-java

The problem seems to be that there is no accessibility device configured. This should probably not throw an exception so easily, as most systems won't have them.

How do you see that? The ClassNotFoundException makes me think about a classloader issue or something linked to the module path of Java >= 9 (the bug occurs with Java 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)

In Debian Bug #813143 - openjdk-7-jre-headless: Please re-disable atk bridge Samuel Thibault indicated that he wanted issues like these to be reported so that java-atk-wrapper can be fixed instead of working around the issues by disabling the bridge. Perhaps you should get him directly involved in these issues.

The problem is that we don't need it, so I don't want to spend time to debug a library useless for us, I already have too many subjects to deal with. I'm only concerned about having a stable environment for JOSM. Disabling it sounds the more practical solution for us.

comment:8 Changed 2 months ago by sebastic

You don't have to debug the ATK issues if you have its maintainer take care of that. Hence my suggestion to directly involve Samuel Thibault in those issue. Suggest the user to disable ATK for the time being to work around the issue that affects their use of JOSM, and forward the issue to Samuel to have the underlying issue resolved.

With JNI between the JRE and the java library I wouldn't be surprised that it translates GTK accessibility events incorrectly in the context of Java. It's out of my area of expertise, so I can't say anything authoritative about it.

comment:9 Changed 2 months ago by Don-vip

Ticket #16668 has been marked as a duplicate of this ticket.

comment:10 Changed 2 months ago by Don-vip

Ticket #16672 has been marked as a duplicate of this ticket.

comment:11 Changed 2 months ago by Don-vip

Ticket #16673 has been marked as a duplicate of this ticket.

comment:12 Changed 2 months ago by Don-vip

Priority: normalmajor

comment:13 Changed 2 months ago by Don-vip

I don't even know if we can display an error popup? The exception occurs in java.awt.Toolkit.getDefaultToolkit I doubt we would be able to display anything outside the console.

comment:15 Changed 2 months ago by Don-vip

In 14176/josm:

see #16666 - extract DefaultBugReportSendingHandler to its own class in order to control AWT loading. Having it defined as a public static field of BugReportDialog class makes Java load AWT way too early.

comment:16 Changed 2 months ago by Don-vip

In 14177/josm:

see #16666 - add workaround against ATK wrapper failure on Debian, Ubuntu and Mint

comment:17 Changed 2 months ago by Don-vip

Milestone: 18.09

Leaving the ticket open a few days to handle future duplicates, but the workaround seems to work.

comment:18 Changed 2 months ago by stoecker

Ticket #16677 has been marked as a duplicate of this ticket.

comment:19 Changed 2 months ago by Don-vip

Ticket #16678 has been marked as a duplicate of this ticket.

comment:20 Changed 2 months ago by Don-vip

hotfix r14178 just promoted as new tested version.

comment:21 Changed 8 weeks ago by Don-vip

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.