According to Barcode4J documentation (http://barcode4j.sourceforge.net/1.0/barcode-xml.html#EAN-13) EAN-13 barcode must have a message length between 12 and 13. However, if you accidentally entr a message whose length is outside this range Barcoe4J throws the following error:
.lang.IllegalArgumentException: Message must be 11 or 12 characters long. Message: 1
at org.krysalis.barcode4j.impl.upcean.EAN13LogicImpl.validateMessage(EAN13LogicImpl.java:60)
at org.krysalis.barcode4j.impl.upcean.EAN13LogicImpl.generateBarcodeLogic(EAN13LogicImpl.java:115)
The attached patch corrects the misleading error message
Proposed patch
Applied to CVS HEAD. Thanks a lot for spotting that, Chris! I wonder how that crept in.