Headless Mode Java Servlet Error

Headless Mode Java Servlet Error

You are here:
< Back

java.awt.HeadlessException at java.applet.Applet.<init>

This issue applies to the Java Barcode Servlet

Solution(s):

This issue was corrected in the June 2004 release of IDAutomation Java Barcode Products. Download the current version of this product with an active Level 1 Support & Upgrade Subscription.

If this error occurs, it may be that the JDK being used does not allow instantiation of an Applet in a headless environment. While the applet is not visible in the browser when creating barcodes with the servlet, the IDAutomation Java barcode servlet uses the applet for several processing functions.

There are 4 solutions:
  1. Obtain the latest product as described above.
  2. Use the IDAutomation secure servlet to create the barcodes without using applet. There is a working example in the Linear Source Code.zip file, which is in the Linear Java Barcode Package. The file name is IDAutomationSecureServlet.java.
  3. Obtain an update to the JDK that will allow instantiation of an applet.
  4. Run the servlet on another system that does not have this problem.