How do I resolve sun.print.CUPSPrinter class initialization errors in JBoss?

Solution Verified - Updated -

Issue

  • The following stacktrace appears on the console or in log/server.log:

    java.lang.NoClassDefFoundError: Could not initialize class sun.print.CUPSPrinter
            at sun.print.UnixPrintServiceLookup.getDefaultPrintService(UnixPrintServiceLookup.java:503)
            at sun.print.UnixPrintServiceLookup.refreshServices(UnixPrintServiceLookup.java:186)
            at sun.print.UnixPrintServiceLookup.getPrintServices(UnixPrintServiceLookup.java:170)
    

Environment

  • any JBoss product release

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content