Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception in JasperPrint  RSS feed

Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JasperPrint is throwing a null pointer exception when i pass sql connection in its parameter but it runs fine when i pass JRResultSetDatasource. and i am using subreports.

at java.lang.Class.isAssignableFrom(Native Method)
at net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(
at Source)

when i pass connection in jasperPrint it gives exception.

jasperPrint = JasperFillManager.fillReport(jasperReport,map, reportConnection);

I am also using a subreport so that is why i am not using JRResultSetDatasource and using connection. I am just stuck into this. but when i pass JRResultSetDatasource it works fine and when i also pass connection object in a hasmap parameter it gives and error. the above exception.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!