Barcode creation in Jasper report: n is not a valid character for Standard 2 of 5 encoding
<p>Got the below error while i'm trying to create Barcode using Ireport 1.2.3</p>

<p>Error filling print... </p>

<blockquote>
  <p>java.lang.RuntimeException: n is not a valid character for Standard 2 of 5 encoding
      at it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(BcImage.java:73)
      at PrintIDCardreport_1452662388727_145783.evaluate(PrintIDCardreport_1452662388727_145783:198)
      at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172)
      at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:556)
      at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:524)
      at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:952)
      at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:420)
      at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:403)
      at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275)
      at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:399)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1289)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:631)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:228)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:750)
      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:666)
      at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89)
      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)
      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:517)
      at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:680)
      at java.lang.Thread.run(Unknown Source)</p>
</blockquote>

<p>Code for barcode creation:</p>

<pre><code>&lt;image  scaleImage="FillFrame" vAlign="Middle" hAlign="Center" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" &gt;
    &lt;reportElement
        mode="Opaque"
        x="32"
        y="123"
        width="50"
        height="10"
        forecolor="#000000"
        backcolor="#FFFFFF"
        key="barcode-1"/&gt;
        &lt;box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/&gt;
        &lt;graphicElement stretchType="NoStretch" pen="None" fill="Solid" /&gt;
&lt;imageExpression class="java.awt.Image"&gt;&lt;![CDATA[it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(13,$F{subjectno1},false,false,null,0,0)]]&gt;&lt;/imageExpression&gt;
&lt;/image&gt;
</code></pre>

<p>Used jar files: barbecue-1.1.jar, ireport.jar.</p>

<p>I can able print barcode for static barcode expression.</p>