java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper – when running jasper reports

The problem

When filling the jasper reports error java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper occurs.

Full stacktrace when generating HTML report


java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)
at javax.swing.RepaintManager.<clinit>(RepaintManager.java:238)
at javax.swing.JComponent.repaint(JComponent.java:4792)
at java.awt.Component.repaint(Component.java:3311)
at javax.swing.text.JTextComponent.setEditable(JTextComponent.java:1758)
at javax.swing.text.JTextComponent.<init>(JTextComponent.java:309)
at javax.swing.JEditorPane.<init>(JEditorPane.java:196)
at javax.swing.JEditorPane.<init>(JEditorPane.java:288)
at net.sf.jasperreports.engine.util.JEditorPaneHtmlMarkupProcessor.convert(JEditorPaneHtmlMarkupProcessor.java:79)
at net.sf.jasperreports.engine.fill.JRFillTextElement.processMarkupText(JRFillTextElement.java:1065)
at net.sf.jasperreports.engine.fill.JRFillStaticText.<init>(JRFillStaticText.java:51)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.visitStaticText(JRFillObjectFactory.java:654)
at net.sf.jasperreports.engine.base.JRBaseStaticText.visit(JRBaseStaticText.java:94)
at net.sf.jasperreports.engine.JRAbstractObjectFactory.getVisitResult(JRAbstractObjectFactory.java:88)
at net.sf.jasperreports.engine.fill.JRFillElementGroup.<init>(JRFillElementGroup.java:82)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.<init>(JRFillElementContainer.java:89)
at net.sf.jasperreports.engine.fill.JRFillBand.<init>(JRFillBand.java:91)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getBand(JRFillObjectFactory.java:514)
at net.sf.jasperreports.engine.fill.JRBaseFiller.createFillBand(JRBaseFiller.java:313)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:266)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:73)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61)
at net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:186)
at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:201)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:82)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:456)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:863)

Another error which comes up when generating a pdf report


Caused by: java.lang.NoClassDefFoundError: Could not initialize class javax.swing.RepaintManager
at javax.swing.JComponent.repaint(JComponent.java:4792)
at java.awt.Component.repaint(Component.java:3311)
at javax.swing.text.JTextComponent.setEditable(JTextComponent.java:1758)
at javax.swing.text.JTextComponent.<init>(JTextComponent.java:309)
at javax.swing.JEditorPane.<init>(JEditorPane.java:196)
at javax.swing.JEditorPane.<init>(JEditorPane.java:288)
at net.sf.jasperreports.engine.util.JEditorPaneHtmlMarkupProcessor.convert(JEditorPaneHtmlMarkupProcessor.java:79)
at net.sf.jasperreports.engine.fill.JRFillTextElement.processMarkupText(JRFillTextElement.java:1065)
at net.sf.jasperreports.engine.fill.JRFillStaticText.<init>(JRFillStaticText.java:51)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.visitStaticText(JRFillObjectFactory.java:654)
at net.sf.jasperreports.engine.base.JRBaseStaticText.visit(JRBaseStaticText.java:94)
at net.sf.jasperreports.engine.JRAbstractObjectFactory.getVisitResult(JRAbstractObjectFactory.java:88)
at net.sf.jasperreports.engine.fill.JRFillElementGroup.<init>(JRFillElementGroup.java:82)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.<init>(JRFillElementContainer.java:89)
at net.sf.jasperreports.engine.fill.JRFillBand.<init>(JRFillBand.java:91)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getBand(JRFillObjectFactory.java:514)
at net.sf.jasperreports.engine.fill.JRBaseFiller.createFillBand(JRBaseFiller.java:313)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:266)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:73)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61)
at net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:186)
at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:201)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:82)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:456)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:863)

Environment:

  • Jasper reports 6.0.3
  • Open Jdk 8
  • Tomcat 8 on docker

Solution

Run following command from command prompt.

sed -i ‘s/^assistive_technologies=/#&/’ /etc/java-8-openjdk/accessibility.properties

Or just comment out below line in  /etc/java-8-openjdk/accessibility.properties

assistive_technologies=org.GNOME.Accessibility.AtkWrapper

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: