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

CentOS: Server refused to allocate pty

The Problem
When I tried to login to my VPS using putty, It gave me message.

Server refused to allocate pty

And then I was not able to execute any commands.

The solution
Execute following two commands, and it should solve the problem.


/sbin/MAKEDEV pty
/sbin/MAKEDEV tty

I am using lxadmin, so I logged into lxadmin and run above commands from command center.
That’s it ! It works.

ubuntu: install multimedia codecs without internet connection

Problem: You can’t play certain audio/video formats, because required codecs are not installed. So you need to install this extras but again, your machine don’t have direct internet connection.

Solution:
I am still looking for solution. if you have any, let me know.

I think this can solve it http://crashsystems.net/2009/01/keryx-tutorial/
Still trying out and not sure, if it provide an alternative.