java.net.SocketException: Broken pipe

The error java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105) at java.io.FilterOutputStream.write(FilterOutputStream.java:80) The above error comes up from a servlet, or a controller when you try to write any thing to response. In most cases, this happens when writing a file to response output stream Reason The reason of the above … Continue reading java.net.SocketException: Broken pipe

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 Another error which comes up when generating a pdf report 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 … Continue reading java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper – when running jasper reports

The future of Java servlets and web applications – JSR 340

You must be aware of the Servlet 3.0 spec,  and what cool things it brings to the java web development. If not, you can read it here Introduction to servlet 3.0 new features. Servlet 3.0 was released as part of the JavaEE6 and brings many exciting features like Annotations, web framework playability, built in file upload … Continue reading The future of Java servlets and web applications – JSR 340

Freemarker sucks, dependency on javax.swing, Wouldn’t run on GAE

I would say freemarker sucks. Yes it does. A template engine has dependency on javax.swing !! Isnt that surprising? Today, I was trying to deploy a Stripe/Freemarker hello world app on GAE and I got following. java.lang.NoClassDefFoundError: javax.swing.tree.TreeNode is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51) … Continue reading Freemarker sucks, dependency on javax.swing, Wouldn’t run on GAE

SSLHandshakeException: When trying trying to access a HTTPS URL

I was trying to access a HTTPS URL using java.net.HttpURLConnection and got following error. Error javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Most of the time, this exception occurs when you are using selfsigned certificate. Reason:  The host that you are trying to connect has an … Continue reading SSLHandshakeException: When trying trying to access a HTTPS URL