Headless Mode Java Servlet Error
java.awt.HeadlessException at java.applet.Applet.<init>
This issue applies to the Java Barcode Servlet
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 2 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:
- Obtain the latest product as described above.
- 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.
- Obtain an update to the JDK that will allow instantiation of an applet.
- Run the servlet on another system that does not have this problem.