#19 can't generate barcode when output is eps and svg

jane g

Hi Jeremias,
Thanks for the answer of my last query ID: 3056438. Yes, you are right. The problem is caused by default java version on linux which is IcedTea6. I reinstalled the JDK1.5 and it works now.
But now i have other problems, it can't generate barcode if i set output to svg or eps. I am using jdk1.5.0_11 and barcode4j-2.0
I get the following exception:
588953 [RMI TCP Connection(20)-] INFO barcodeProcess.BarcodeGenerator - BufferedImage:null
588953 [RMI TCP Connection(20)-] INFO com.mhgroup.backend.barcodeProcess.BarcodeGenerator - BufferedImage:null
java.lang.IllegalArgumentException: im == null!
at javax.imageio.ImageIO.write(ImageIO.java:1429)

Could you give me some advise?


    • status: open --> closed
  • Hi Jane

    I'm afraid, there's too little information here for me to help you. A BufferedImage is passed over to ImageIO.write() it seems, but I have no way of knowing what your BarcodeGenerator class does internally. There's no indication that Barcode4J is at fault here. I suggest you run the Java debugger on your application to determine why the BufferedImage is null.
    Please come back if it turns out that Barcode4J is really at fault here. You may have to post your glue code that calls Barcode4J for me to get any idea what's going on. HTH