Jump to content
Changes to the Jaspersoft community edition download ×

JasperFillManager.fillReport NullpointerExcep


2004 IR Help

Recommended Posts

By: Alexandre Gomes - alegomes

JasperFillManager.fillReport NullpointerExcep

2006-01-26 05:43

When I try to run the code

 

---------

System.out.println("reportFileName = " + reportFileName);

System.out.println("parameters = " + parameters);

System.out.println("con = " + con);

JasperPrint printer = JasperFillManager.fillReport(reportFileName, parameters, con);

 

I get

 

reportFileName = C:capesJColetaAPPrelatoriocol_rel_producao_intelectual_conf.jasper

parameters = {natureza=B, tipoproducao=3, anobase=2004, idprograma=33002010125P7}

con = org.hsqldb.jdbc.jdbcConnection@e48e1b

Exception in thread "main" java.lang.NullPointerException

at java.util.Hashtable.put(Hashtable.java:396)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:603)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:519)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:120)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:291)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:207)

at br.gov.capes.coleta.apresentacao.relatorios.TestJasperPerformance.testDataSourceConnection(TestJasperPerformance.java:53)

at br.gov.capes.coleta.apresentacao.relatorios.TestJasperPerformance.main(TestJasperPerformance.java:32)

 

 

Where is the null pointer cause?

 

thank you all.

 

 

 

 

By: Lucian Chirita - lucianc

RE: JasperFillManager.fillReport NullpointerE

2006-01-26 05:49

Which JR version are you using?

 

 

 

 

By: Alexandre Gomes - alegomes

RE: JasperFillManager.fillReport NullpointerE

2006-01-26 11:06

JasperReports 0.6.4, java version 1.5.0_06

 

 

 

 

By: Lucian Chirita - lucianc

RE: JasperFillManager.fillReport NullpointerE

2006-01-27 00:13

Are you using Hashtable for the parameters map? If so, switch to HashMap because the code assumes that the map supports null values.

 

HTH,

Lucian

 

 

 

 

By: Alexandre Gomes - alegomes

RE: JasperFillManager.fillReport NullpointerE

2006-01-27 01:23

BINGO!

 

thanks a lot

Post edited by: tcloonan, at: 2006/08/26 09:32

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...