java.lang.IllegalArgumentException: Number of color/alpha components should be 4 but length of bits array is 1

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via webmoli.com by Unknown author, 1 year ago
Number of color/alpha components should be 4 but length of bits array is 1
via webmoli.com by Unknown author, 1 year ago
Number of color/alpha components should be 4 but length of bits array is 1
via atlassian.com by Unknown author, 1 year ago
via Oracle Community by 843799, 1 year ago
Number of color/alpha components should be 3 but length of bits array is 1
via Google Groups by Thomas Fritsch, 2 years ago
Number of color/alpha components should be 4 but length of bits array is 3
java.lang.IllegalArgumentException: Number of color/alpha components should be 4 but length of bits array is 1
at java.awt.image.ColorModel.(ColorModel.java:318)
at java.awt.image.ComponentColorModel.(ComponentColorModel.java:256)
at com.sun.pdfview.PDFImage$DecodeComponentColorModel.(PDFImage.java:564)
at com.sun.pdfview.PDFImage.getColorModel(PDFImage.java:529)
at com.sun.pdfview.PDFImage.parseData(PDFImage.java:270)
at com.sun.pdfview.PDFImage.getImage(PDFImage.java:225)
at com.sun.pdfview.PDFRenderer.drawImage(PDFRenderer.java:273)
at com.sun.pdfview.PDFImageCmd.execute(PDFPage.java:643)
at com.sun.pdfview.PDFRenderer.iterate(PDFRenderer.java:570)
at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101)
at undefined.PDFPrintPage.print(NewClass.java:42)
at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1936)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1431)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1247)
at undefined.PrintPdf.print(PrintPdf.java:99)
at undefined.PrintPdf.main(PrintPdf.java:40)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.